├── .gitignore
├── .php_cs
├── .swagger-codegen-ignore
├── .travis.yml
├── README.md
├── autoload.php
├── codegen.sh
├── composer.json
├── config.json
├── docs
├── client.md
├── development.md
└── examples
│ ├── add-site-route.md
│ ├── add-to-cart.md
│ ├── catalog-get-products.md
│ ├── create-product.md
│ ├── create-widget.md
│ ├── oauth-token.md
│ └── update-variants.md
├── git_push.sh
├── phpunit.xml.dist
├── src
├── Api
│ ├── AbandonedCartApi.php
│ ├── CartApi.php
│ ├── CatalogApi.php
│ ├── ChannelsApi.php
│ ├── CheckoutApi.php
│ ├── CurrencyApi.php
│ ├── CustomersApi.php
│ ├── OrdersApi.php
│ ├── PriceListsApi.php
│ ├── PricingApi.php
│ ├── ScriptApi.php
│ ├── SettingsApi.php
│ ├── SitesApi.php
│ ├── ThemesApi.php
│ ├── WidgetApi.php
│ └── WishlistsApi.php
├── ApiClient.php
├── ApiException.php
├── Configuration.php
├── Model
│ ├── AVSResult.php
│ ├── AbandonedCartInfo.php
│ ├── AbandonedCartResponse.php
│ ├── Activate.php
│ ├── Address.php
│ ├── AddressForCustomer.php
│ ├── AddressProperties.php
│ ├── Adjuster.php
│ ├── AppliedCoupon.php
│ ├── AppliedDiscount.php
│ ├── BaseError.php
│ ├── BaseItem.php
│ ├── Brand.php
│ ├── BrandBase.php
│ ├── BrandCollectionResponse.php
│ ├── BrandPost.php
│ ├── BrandPut.php
│ ├── BrandResponse.php
│ ├── BulkPricingRule.php
│ ├── BulkPricingRuleBase.php
│ ├── BulkPricingRuleCollectionResponse.php
│ ├── BulkPricingRulePost.php
│ ├── BulkPricingRulePut.php
│ ├── BulkPricingRuleResponse.php
│ ├── BulkPricingTier.php
│ ├── CVVResult.php
│ ├── Cart.php
│ ├── CartCreateRequestData.php
│ ├── CartRedirectUrls.php
│ ├── CartRedirectUrlsResponse.php
│ ├── CartRequestData.php
│ ├── CartResponse.php
│ ├── CartUpdateRequest.php
│ ├── CartUpdateRequestData.php
│ ├── CatalogSummary.php
│ ├── CatalogSummaryResponse.php
│ ├── Category.php
│ ├── CategoryBase.php
│ ├── CategoryCollectionResponse.php
│ ├── CategoryNode.php
│ ├── CategoryPost.php
│ ├── CategoryPut.php
│ ├── CategoryResponse.php
│ ├── CategoryTreeCollectionResponse.php
│ ├── Channel.php
│ ├── ChannelCollectionResponse.php
│ ├── ChannelConfigMeta.php
│ ├── ChannelConfigMetaApp.php
│ ├── ChannelConfigMetaAppSections.php
│ ├── ChannelResponse.php
│ ├── Checkout.php
│ ├── CheckoutError.php
│ ├── CheckoutResponse.php
│ ├── CollectionMeta.php
│ ├── ComplexRule.php
│ ├── ComplexRuleBase.php
│ ├── ComplexRuleCollectionResponse.php
│ ├── ComplexRuleCondition.php
│ ├── ComplexRuleConditionBase.php
│ ├── ComplexRuleConditionPost.php
│ ├── ComplexRuleConditionPut.php
│ ├── ComplexRulePost.php
│ ├── ComplexRulePut.php
│ ├── ComplexRuleResponse.php
│ ├── ConfigurableField.php
│ ├── ConfigurableFieldBase.php
│ ├── ConfigurableFieldCollectionResponse.php
│ ├── ConfigurableFieldPost.php
│ ├── ConfigurableFieldPut.php
│ ├── ConfigurableFieldResponse.php
│ ├── Consignment.php
│ ├── ConsignmentCouponDiscount.php
│ ├── ConsignmentDiscount.php
│ ├── ConsignmentLineItem.php
│ ├── ContactEntity.php
│ ├── CouponCodeRequest.php
│ ├── CreateChannelRequest.php
│ ├── CreateConsignmentRequest.php
│ ├── CreditCard.php
│ ├── Currency.php
│ ├── CurrencyAssignmentResponse.php
│ ├── CurrencyAssignments.php
│ ├── Custom.php
│ ├── CustomField.php
│ ├── CustomFieldBase.php
│ ├── CustomFieldCollectionResponse.php
│ ├── CustomFieldPost.php
│ ├── CustomFieldPut.php
│ ├── CustomFieldResponse.php
│ ├── CustomUrlBrand.php
│ ├── CustomUrlCategory.php
│ ├── CustomUrlProduct.php
│ ├── Customer.php
│ ├── CustomerAttributeValue.php
│ ├── CustomerAttributeValueForCustomer.php
│ ├── CustomerAuthentication.php
│ ├── CustomerAuthenticationBase.php
│ ├── CustomerChannelIds.php
│ ├── CustomerCollectionResponse.php
│ ├── CustomerPost.php
│ ├── CustomerPut.php
│ ├── CustomersSettings.php
│ ├── CustomersSettingsData.php
│ ├── CustomersSettingsDataCustomerGroupSettings.php
│ ├── CustomersSettingsDataPrivacySettings.php
│ ├── DetailedErrors.php
│ ├── ErrorDetail.php
│ ├── ErrorResponse.php
│ ├── GQL_Term_Model.php
│ ├── GiftCertificate.php
│ ├── GiftWrapping.php
│ ├── ImageResponse.php
│ ├── ItemDigital.php
│ ├── ItemGiftCertificate.php
│ ├── ItemPhysical.php
│ ├── ItemPricing.php
│ ├── Job.php
│ ├── JobErrors.php
│ ├── JobId.php
│ ├── JobResponse.php
│ ├── JobWarnings.php
│ ├── Layout.php
│ ├── LayoutCollectionResponse.php
│ ├── LayoutRequest.php
│ ├── LayoutResponse.php
│ ├── LineItemGiftCertificateRequestData.php
│ ├── LineItemRequestData.php
│ ├── LineItems.php
│ ├── Listing.php
│ ├── ListingCollectionResponse.php
│ ├── ListingResponse.php
│ ├── ListingVariant.php
│ ├── Meta.php
│ ├── MetaFieldCollectionResponse.php
│ ├── Metafield.php
│ ├── MetafieldBase.php
│ ├── MetafieldPost.php
│ ├── MetafieldPut.php
│ ├── MetafieldResponse.php
│ ├── Modifier.php
│ ├── ModifierBase.php
│ ├── ModifierCollectionResponse.php
│ ├── ModifierPost.php
│ ├── ModifierPut.php
│ ├── ModifierResponse.php
│ ├── ModifierValue.php
│ ├── ModifierValueBase.php
│ ├── ModifierValueBaseAdjusters.php
│ ├── ModifierValueBaseAdjustersPurchasingDisabled.php
│ ├── ModifierValueCollectionResponse.php
│ ├── ModifierValuePost.php
│ ├── ModifierValuePut.php
│ ├── ModifierValueResponse.php
│ ├── NoContent.php
│ ├── NotFound.php
│ ├── Offline.php
│ ├── Option.php
│ ├── OptionBase.php
│ ├── OptionCollectionResponse.php
│ ├── OptionConfig.php
│ ├── OptionPost.php
│ ├── OptionPut.php
│ ├── OptionResponse.php
│ ├── OptionValue.php
│ ├── OptionValueBase.php
│ ├── OptionValueCollectionResponse.php
│ ├── OptionValuePost.php
│ ├── OptionValueProductBase.php
│ ├── OptionValueProductPost.php
│ ├── OptionValuePut.php
│ ├── OptionValueResponse.php
│ ├── OptionValueVariant.php
│ ├── OptionValueVariantPost.php
│ ├── Order.php
│ ├── OrderResponse.php
│ ├── Pagination.php
│ ├── PaginationLinks.php
│ ├── Placement.php
│ ├── PlacementRequest.php
│ ├── PlacementResponse.php
│ ├── PlacementsCollectionResponse.php
│ ├── PriceList.php
│ ├── PriceListAssignment.php
│ ├── PriceListBase.php
│ ├── PriceListCollectionAssignmentsResponse.php
│ ├── PriceListCollectionResponse.php
│ ├── PriceListPost.php
│ ├── PriceListPut.php
│ ├── PriceListResponse.php
│ ├── PriceRange.php
│ ├── PriceRecord.php
│ ├── PriceRecordBase.php
│ ├── PriceRecordBatchErrorResponse.php
│ ├── PriceRecordBatchErrorSet.php
│ ├── PriceRecordBatchItem.php
│ ├── PriceRecordCollectionPut.php
│ ├── PriceRecordCollectionResponse.php
│ ├── PriceRecordIdentifiers.php
│ ├── PriceRecordPut.php
│ ├── PriceRecordResponse.php
│ ├── PricingRequest.php
│ ├── PricingRequestItem.php
│ ├── PricingRequestItemOption.php
│ ├── PricingResponse.php
│ ├── Product.php
│ ├── ProductBase.php
│ ├── ProductCollectionResponse.php
│ ├── ProductImage.php
│ ├── ProductImageBase.php
│ ├── ProductImageCollectionResponse.php
│ ├── ProductImagePost.php
│ ├── ProductImagePut.php
│ ├── ProductImageResponse.php
│ ├── ProductOption.php
│ ├── ProductOptionSelection.php
│ ├── ProductPost.php
│ ├── ProductPut.php
│ ├── ProductResponse.php
│ ├── ProductReview.php
│ ├── ProductReviewBase.php
│ ├── ProductReviewCollectionResponse.php
│ ├── ProductReviewPost.php
│ ├── ProductReviewPut.php
│ ├── ProductReviewResponse.php
│ ├── ProductVideo.php
│ ├── ProductVideoBase.php
│ ├── ProductVideoCollectionResponse.php
│ ├── ProductVideoPost.php
│ ├── ProductVideoPut.php
│ ├── ProductVideoResponse.php
│ ├── ResourceImage.php
│ ├── Route.php
│ ├── RouteCollectionResponse.php
│ ├── RouteResponse.php
│ ├── Script.php
│ ├── ScriptPost.php
│ ├── ScriptPut.php
│ ├── ScriptResponse.php
│ ├── ScriptsResponse.php
│ ├── SelectedShippingOption.php
│ ├── Site.php
│ ├── SiteCreateRequest.php
│ ├── SiteResponse.php
│ ├── StoreCredit.php
│ ├── StoreCreditAmounts.php
│ ├── StoreCreditAmountsInner.php
│ ├── Subscriber.php
│ ├── SubscriberBase.php
│ ├── SubscriberCollectionResponse.php
│ ├── SubscriberPost.php
│ ├── SubscriberPut.php
│ ├── SubscriberResponse.php
│ ├── SuccessBatchResponse.php
│ ├── Tax.php
│ ├── TaxPrice.php
│ ├── Theme.php
│ ├── ThemeRegion.php
│ ├── ThemeRegionsCollectionResponse.php
│ ├── ThemeResponse.php
│ ├── ThemesCollectionResponse.php
│ ├── Transaction.php
│ ├── TransactionCollectionResponse.php
│ ├── TransactionPost.php
│ ├── TransactionResponse.php
│ ├── UpdateChannelRequest.php
│ ├── UpdateConsignmentRequest.php
│ ├── UpdateListingRequest.php
│ ├── Variant.php
│ ├── VariantBase.php
│ ├── VariantCollectionResponse.php
│ ├── VariantPost.php
│ ├── VariantProductPost.php
│ ├── VariantProductPut.php
│ ├── VariantPut.php
│ ├── VariantResponse.php
│ ├── Variation.php
│ ├── WhichThemeToDownload.php
│ ├── Widget.php
│ ├── WidgetCollectionResponse.php
│ ├── WidgetRequest.php
│ ├── WidgetResponse.php
│ ├── WidgetTemplate.php
│ ├── WidgetTemplateRequest.php
│ ├── WidgetTemplateResponse.php
│ ├── WidgetTemplatesCollectionResponse.php
│ ├── Wishlist.php
│ ├── WishlistAddItemsRequest.php
│ ├── WishlistCollectionResponse.php
│ ├── WishlistItem.php
│ ├── WishlistRequest.php
│ └── WishlistResponse.php
└── ObjectSerializer.php
└── swagger
├── abandoned_cart.yaml
├── cart.yaml
├── channels.yaml
├── checkout.yaml
├── pricing.yaml
├── sites.yaml
├── swagger.yaml
├── templates
├── api.mustache
├── configuration.mustache
├── model.mustache
├── model_enum.mustache
└── model_generic.mustache
├── widgets.yaml
└── wishlist.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .DS_Store
3 | *.settings
4 | *.project
5 | LICENSE
6 | .swagger-codegen
7 | /swagger-codegen
--------------------------------------------------------------------------------
/.php_cs:
--------------------------------------------------------------------------------
1 | level(Symfony\CS\FixerInterface::PSR2_LEVEL)
5 | ->setUsingCache(true)
6 | ->fixers(
7 | [
8 | 'ordered_use',
9 | 'phpdoc_order',
10 | 'short_array_syntax',
11 | 'strict',
12 | 'strict_param'
13 | ]
14 | )
15 | ->finder(
16 | Symfony\CS\Finder\DefaultFinder::create()
17 | ->in(__DIR__)
18 | );
19 |
--------------------------------------------------------------------------------
/.swagger-codegen-ignore:
--------------------------------------------------------------------------------
1 | # Swagger Codegen Ignore
2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | dist: trusty
3 | sudo: false
4 | php:
5 | - 5.4
6 | - 5.5
7 | - 5.6
8 | - 7.0
9 | - 7.1
10 | - 7.2
11 | - 7.3
12 | before_install: "composer install"
13 | script: ""
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | PHP client for connecting to the Bigcommerce V3 REST API.
4 |
5 | ## System Requirements
6 |
7 | PHP 5.4.0 and later
8 |
9 | ## Documentation
10 |
11 |
12 | * [Usage](/docs/client.md)
13 | * [Contributing](/docs/development.md)
14 |
15 |
--------------------------------------------------------------------------------
/autoload.php:
--------------------------------------------------------------------------------
1 | =5.4",
20 | "ext-curl": "*",
21 | "ext-json": "*",
22 | "ext-mbstring": "*"
23 | },
24 | "require-dev": {
25 | "phpunit/phpunit": "~4.8",
26 | "satooshi/php-coveralls": "~1.0",
27 | "squizlabs/php_codesniffer": "~2.6"
28 | },
29 | "autoload": {
30 | "psr-4": { "BigCommerce\\Api\\v3\\" : "src/" }
31 | },
32 | "autoload-dev": {
33 | "psr-4": { "BigCommerce\\Api\\v3\\" : "test/" }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "variableNamingConvention": "snake_case",
3 | "invokerPackage": "BigCommerce\\Api\\v3",
4 | "apiPackage": "BigCommerce\\Api\\v3\\Api",
5 | "modelPackage": "BigCommerce\\Api\\v3\\Model",
6 | "packagePath": "Client",
7 | "srcBasePath": "src",
8 | "gitUserId": "moderntribe",
9 | "gitRepoId": "bigcommerce-api-php-v3"
10 | }
--------------------------------------------------------------------------------
/docs/client.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Instantiating the API Client
4 |
5 | The first step to instantiating the API client is to create a configuration
6 | object:
7 |
8 | ```php
9 | $config = new \BigCommerce\Api\v3\Configuration();
10 | $config->setHost( $api_url );
11 | $config->setClientId( $client_id );
12 | $config->setAccessToken( $access_token );
13 | $config->setClientSecret( $client_secret ); // not required for most requests
14 | ```
15 |
16 | You can find the required values in the BigCommerce admin when you create
17 | a new access token, or create an application that [uses OAuth to request
18 | an access token](/docs/examples/oauth-token.md).
19 |
20 | With the configuration in hand, create an instance of the ApiClient object.
21 |
22 | ```php
23 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
24 | ```
25 |
26 | There are then a number of APIs that you can instantiate using the client object:
27 |
28 | ```php
29 | $catalog = new \BigCommerce\Api\v3\Api\CatalogApi( $client );
30 | $cart = new \BigCommerce\Api\v3\Api\CartApi( $client );
31 | $channels = new \BigCommerce\Api\v3\Api\ChannelsApi( $client );
32 | $sites = new \BigCommerce\Api\v3\Api\SitesApi( $client );
33 | ```
34 |
35 | ## Usage Examples
36 |
37 | * [Request products from the catalog](/docs/examples/catalog-get-products.md)
38 | * [Add a route to a site](/docs/examples/add-site-route.md)
39 | * [Create a product with variants and a modifier](/docs/examples/create-product.md)
40 | * [Update variants for a product](/docs/examples/udate-variants.md)
41 | * [Add a product to a cart](/docs/examples/add-to-cart.md)
42 | * [Create a widget](/docs/examples/create-widget.md)
--------------------------------------------------------------------------------
/docs/development.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Development
4 |
5 | This PHP package is automatically generated by the
6 | [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project,
7 | using the YAML files in the `swagger` directory. Follow the steps below
8 | to set up and run the build process.
9 |
10 | 0. Prerequisites: docker, git
11 |
12 | 1. Clone swagger-codegen and checkout commit `3f66e27a9`
13 |
14 | ```
15 | $ git clone git@github.com:swagger-api/swagger-codegen.git swagger-codegen && cd swagger-codegen && git checkout 3f66e27a9 && cd ..
16 | ```
17 |
18 | 2. Run the build script for swagger-codegen.
19 |
20 | ```
21 | $ cd swagger-codegen
22 | $ ./run-in-docker.sh mvn clean package
23 | $ cd ..
24 | ```
25 |
26 | 3. Run the generator script.
27 |
28 | ```
29 | $ ./codegen.sh
30 | ```
31 |
32 | ## Cleaning up
33 |
34 | To clean up all files created by the build process, remove the directories
35 | `.swagger-codegen` and `~/.m2/repository`.
--------------------------------------------------------------------------------
/docs/examples/add-site-route.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Add a route to the site
4 |
5 | ```php
6 | $config = new \BigCommerce\Api\v3\Configuration();
7 | $config->setHost( $api_url );
8 | $config->setClientId( $client_id );
9 | $config->setAccessToken( $access_token );
10 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
11 | $sites = new \BigCommerce\Api\v3\Api\SitesApi( $client );
12 |
13 | $channel_id = 7;
14 |
15 | try {
16 | $site_id = $sites->getChannelSite( $channel_id )->getData()->getId();
17 | $route = new \BigCommerce\Api\v3\Model\Route( [
18 | 'type' => 'login',
19 | 'matching' => '',
20 | 'route' => 'https://www.example.com/login/',
21 | ] );
22 | $sites->postSiteRoute( $site_id, $route );
23 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
24 | $error_message = $e->getMessage();
25 | $error_body = $e->getResponseBody();
26 | $error_headers = $e->getResponseHeaders(); // do something with the error
27 | return;
28 | }
29 | ```
--------------------------------------------------------------------------------
/docs/examples/add-to-cart.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Add a product to a cart
4 |
5 | ```php
6 | use BigCommerce\Api\v3\Model\CartRequestData;
7 | use BigCommerce\Api\v3\Model\Currency;
8 | use BigCommerce\Api\v3\Model\LineItemRequestData;
9 | use BigCommerce\Api\v3\Model\ProductOptionSelection;
10 |
11 | $config = new \BigCommerce\Api\v3\Configuration();
12 | $config->setHost( $api_url );
13 | $config->setClientId( $client_id );
14 | $config->setAccessToken( $access_token );
15 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
16 | $cart = new \BigCommerce\Api\v3\Api\CartApi( $client );
17 |
18 | try {
19 | $request_data = new CartRequestData();
20 | $option_selections = [];
21 |
22 | // Both Options and Modifiers are submitted the same way
23 | foreach ( $options as $option_key => $option_value ) {
24 | $option_selections[] = new ProductOptionSelection( [
25 | 'option_id' => $option_key,
26 | 'option_value' => $option_value,
27 | ] );
28 | }
29 |
30 |
31 | $request_data->setLineItems( [
32 | new LineItemRequestData( [
33 | 'quantity' => $quantity,
34 | 'product_id' => $product_id,
35 | 'option_selections' => $option_selections,
36 | ] ),
37 | ] );
38 |
39 | // gift certificates must be present, even if an empty array
40 | $request_data->setGiftCertificates( [] );
41 |
42 | if ( $cart_id ) {
43 | // add the items to an existing cart
44 | $response = $cart->cartsCartIdItemsPost( $cart_id, $request_data );
45 | } else {
46 | // create a new cart with the items
47 |
48 | // Set optional parameters that would already be in place on an existing cart
49 |
50 | if ( $customer_id ) { // optional parameter, if we have a customer ID
51 | $request_data->setCustomerId( $customer_id );
52 | }
53 | if ( $channel_id ) { // optional parameter, if we have a channel ID
54 | $request_data->setChannelId( $channel_id );
55 | }
56 | if ( $currency ) { // optional parameter, if using a non-default currency
57 | $request_data->setCurrency( new Currency( [ 'code' => $currency ] ) );
58 | }
59 |
60 | $response = $cart->cartsPost( $request_data );
61 | $cart_id = $response->getData()->getId();
62 | }
63 |
64 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
65 | $error_message = $e->getMessage();
66 | $error_body = $e->getResponseBody();
67 | $error_headers = $e->getResponseHeaders();
68 | // do something with the error
69 | return;
70 | }
71 | ```
--------------------------------------------------------------------------------
/docs/examples/catalog-get-products.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Request products from the catalog
4 |
5 | ```php
6 | $config = new \BigCommerce\Api\v3\Configuration();
7 | $config->setHost( $api_url );
8 | $config->setClientId( $client_id );
9 | $config->setAccessToken( $access_token );
10 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
11 | $catalog = new \BigCommerce\Api\v3\Api\CatalogApi( $client );
12 |
13 | $product_ids = [ 100, 101, 102 ];
14 |
15 | try {
16 | /*
17 | * List of request parameters and response properties available at
18 | * https://developer.bigcommerce.com/api-reference/catalog/catalog-api/products/getproducts
19 | */
20 | $products_response = $catalog->getProducts( [
21 | 'id:in' => $product_ids,
22 | 'include' => [ 'variants', 'custom_fields', 'images', 'bulk_pricing_rules', 'options', 'modifiers' ],
23 | ] );
24 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
25 | $error_message = $e->getMessage();
26 | $error_body = $e->getResponseBody();
27 | $error_headers = $e->getResponseHeaders();
28 | // do something with the error
29 | return;
30 | }
31 |
32 | $product_ids = array_map( function( \BigCommerce\Api\v3\Model\Product $product ) {
33 | return $product->getId();
34 | }, $products_response->getData() );
35 | ```
--------------------------------------------------------------------------------
/docs/examples/create-product.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Create a product with variants and a modifier
4 |
5 | ```php
6 | use BigCommerce\Api\v3\Model\ModifierPost;
7 | use BigCommerce\Api\v3\Model\ProductPost;
8 |
9 | $config = new \BigCommerce\Api\v3\Configuration();
10 | $config->setHost( $api_url );
11 | $config->setClientId( $client_id );
12 | $config->setAccessToken( $access_token );
13 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
14 | $catalog = new \BigCommerce\Api\v3\Api\CatalogApi( $client );
15 |
16 | try {
17 |
18 | /*
19 | * List of request parameters and response properties available at
20 | * https://developer.bigcommerce.com/api-reference/catalog/catalog-api/products/createproduct
21 | */
22 | $product_request = new ProductPost( [
23 | 'name' => 'BigCommerce Coffee Mug',
24 | 'price' => '10.00',
25 | 'weight' => 4,
26 | 'type' => 'physical',
27 | 'variants' => [
28 | [
29 | 'sku' => 'MUG-BLUE',
30 | 'option_values' => [
31 | 'option_display_name' => 'Mug Color',
32 | 'label' => 'Blue',
33 | ],
34 | ],
35 | [
36 | 'sku' => 'MUG-GREY',
37 | 'option_values' => [
38 | 'option_display_name' => 'Mug Color',
39 | 'label' => 'Grey',
40 | ],
41 | ],
42 | ]
43 | ] );
44 |
45 | $product_response = $catalog->createProduct( $product_request );
46 |
47 | $product_id = $product_response->getData()->getId();
48 |
49 | /*
50 | * List of request parameters and response properties available at
51 | * https://developer.bigcommerce.com/api-reference/catalog/catalog-api/product-modifiers/createmodifier
52 | */
53 | $modifier_request = new ModifierPost( [
54 | 'type' => 'text',
55 | 'required' => false,
56 | 'display_name' => 'Custom Message',
57 | ] );
58 |
59 | $catalog->createModifier( $product_id, $modifier_request );
60 |
61 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
62 | $error_message = $e->getMessage();
63 | $error_body = $e->getResponseBody();
64 | $error_headers = $e->getResponseHeaders();
65 | // do something with the error
66 | return;
67 | }
68 | ```
--------------------------------------------------------------------------------
/docs/examples/create-widget.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Create a widget
4 |
5 | ```php
6 | use BigCommerce\Api\v3\Model\PlacementRequest;
7 | use BigCommerce\Api\v3\Model\WidgetRequest;
8 | use BigCommerce\Api\v3\Model\WidgetTemplateRequest;
9 |
10 | $config = new \BigCommerce\Api\v3\Configuration();
11 | $config->setHost( $api_url );
12 | $config->setClientId( $client_id );
13 | $config->setAccessToken( $access_token );
14 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
15 | $widgets = new \BigCommerce\Api\v3\Api\WidgetApi( $client );
16 |
17 | try {
18 | /*
19 | * Creat the Widget Template
20 | */
21 | $template_string = '
22 | {{#each list_items}}
23 | - {{text}}
24 | {{/each}}
25 |
';
26 |
27 | $template = $widgets->createWidgetTemplate( new WidgetTemplateRequest( [
28 | 'name' => 'Simple List',
29 | 'template' => $template_string,
30 | ] ) )->getData();
31 |
32 | $template_uuid = $template->getUuid();
33 |
34 | /*
35 | * Create a Widget to use the Widget Template
36 | */
37 | $widget = $widgets->createWidget( new WidgetRequest( [
38 | 'name' => 'Color List',
39 | 'widget_template_uuid' => $template_uuid,
40 | 'widget_configuration' => (object) [
41 | 'list_items' => [
42 | (object) [
43 | 'color' => 'blue',
44 | 'text' => 'The color is blue',
45 | ],
46 | (object) [
47 | 'color' => 'green',
48 | 'text' => 'The color is green',
49 | ],
50 | (object) [
51 | 'color' => 'red',
52 | 'text' => 'The color is red',
53 | ],
54 | ]
55 | ]
56 | ] ) )->getData();
57 |
58 | $widget_uuid = $widget->getUuid();
59 |
60 | /*
61 | * Place the widget on a page
62 | */
63 |
64 | /*
65 | * Use an arbitrary region defined in our theme
66 | * For all regions for a given theme template:
67 | * $regions = $widgets->getContentRegions( [ 'templateFile' => 'pages/home' ] )->getData();
68 | */
69 | $region_name = 'home_below_menu';
70 |
71 | $placement = $widgets->createPlacement( new PlacementRequest( [
72 | 'widget_uuid' => $widget_uuid,
73 | 'sort_order' => 1,
74 | 'region' => $region_name,
75 | 'template_file' => 'pages/home',
76 | 'status' => 'active',
77 | ] ) )->getData();
78 |
79 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
80 | $error_message = $e->getMessage();
81 | $error_body = $e->getResponseBody();
82 | $error_headers = $e->getResponseHeaders();
83 | // do something with the error
84 | return;
85 | }
86 | ```
--------------------------------------------------------------------------------
/docs/examples/oauth-token.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Requesting an OAuth Token
4 |
5 | If you create an application for the [BigCommerce Marketplace](https://www.bigcommerce.com/apps/),
6 | you will need to build an application for requesting new OAuth tokens to
7 | enable connections to the BigCommerce API.
8 |
9 | When you create your app in the [Developer Portal](https://devtools.bigcommerce.com/my/apps),
10 | it will give you a Client ID and Client Secret. Take note of these; you'll
11 | need them later.
12 |
13 | When you create your app, it will ask you for three callback URLs. You'll want
14 | to create a handler for all three of those, but of concern here is the
15 | "Auth Callback URL". When a merchant installs your application through
16 | the Marketplace, this URL will load in a frame for that user in the BigCommerce
17 | administration interface.
18 |
19 | When your application receives a GET request at the auth callback URL,
20 | the request will include the query parameters `code`, `scope`, and `context`.
21 | Using these parameters, along with your app's Client ID and Client Secret,
22 | send a `POST` request back to BigCommerce, at https://login.bigcommerce.com/oauth2/token.
23 |
24 | ```php
25 | $request_token_url = 'https://login.bigcommerce.com/oauth2/token';
26 | $request_body = [
27 | 'client_id' => $client_id,
28 | 'client_secret' => $client_secret,
29 | 'redirect_uri' => $original_auth_callback_url,
30 | 'grant_type' => 'authorization_code',
31 | 'code' => filter_input( INPUT_GET, 'code' ),
32 | 'scope' => filter_input( INPUT_GET, 'scope' ),
33 | 'context' => filter_input( INPUT_GET, 'context' ),
34 | ];
35 |
36 | $ch = curl_init();
37 | curl_setopt( $ch, CURLOPT_URL, $request_token_url );
38 | curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
39 | curl_setopt( $ch, CURLOPT_POST, 1 );
40 | curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $request_body ) );
41 | curl_setopt( $ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/x-www-form-urlencoded' ] );
42 |
43 | $response = json_decode( curl_exec($ch), true );
44 |
45 | curl_close( $ch );
46 |
47 | $access_token = $response['access_token'];
48 | $context = explode( '/', $response['context'] );
49 | $store_hash = $context[1];
50 | $api_url = sprintf( 'https://api.bigcommerce.com/stores/%s/v3/', $store_hash );
51 | ```
52 |
53 | Store your Access Token in a safe place, and use it along with the Client ID
54 | when instantiating the API client.
55 |
56 | ```php
57 | $config = new \BigCommerce\Api\v3\Configuration();
58 | $config->setHost( $api_url );
59 | $config->setClientId( $client_id );
60 | $config->setAccessToken( $access_token );
61 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
62 | ```
63 |
64 | ## Further Reading
65 |
66 | For more information about building apps and requesting OAuth tokens, see:
67 |
68 | https://developer.bigcommerce.com/api-docs/getting-started/building-apps-bigcommerce/building-apps
69 |
70 | https://developer.bigcommerce.com/api-docs/getting-started/authentication#authentication_client-id-secret
71 |
72 |
--------------------------------------------------------------------------------
/docs/examples/update-variants.md:
--------------------------------------------------------------------------------
1 | # BigCommerce API V3 Client Library
2 |
3 | ## Update variants for a product
4 |
5 | ```php
6 | use \BigCommerce\Api\v3\Model\Variant;
7 | use BigCommerce\Api\v3\Model\VariantPut;
8 | use BigCommerce\Api\v3\Model\VariantResponse;
9 |
10 | $config = new \BigCommerce\Api\v3\Configuration();
11 | $config->setHost( $api_url );
12 | $config->setClientId( $client_id );
13 | $config->setAccessToken( $access_token );
14 | $client = new \BigCommerce\Api\v3\ApiClient( $config );
15 | $catalog = new \BigCommerce\Api\v3\Api\CatalogApi( $client );
16 |
17 | $product_id = 101;
18 |
19 | try {
20 | $variants_responses = [];
21 | $page = 0;
22 | $per_page = 100;
23 |
24 | // Request all variants. There may be more than one page of results.
25 | do {
26 | $page ++;
27 | /*
28 | * List of request parameters and response properties available at
29 | * https://developer.bigcommerce.com/api-reference/catalog/catalog-api/product-variants/getvariantsbyproductid
30 | */
31 | $variants_response = $catalog->getVariantsByProductId( $product_id, [
32 | 'page' => $page,
33 | 'limit' => $per_page,
34 | ] );
35 | $max_pages = $variants_response->getMeta()->getPagination()->getTotalPages();
36 | $variants_responses[] = $variants_response;
37 | } while ( $page < $max_pages );
38 |
39 | // Merge all the responses into one array
40 | $variants = array_merge( ...array_map( function( VariantResponse $response ) {
41 | return $response->getData();
42 | }, $variants_responses ) );
43 |
44 | // Increase inventory of each variant by 5
45 | array_map( function( Variant $variant ) use ( $catalog ) {
46 | $inventory_level = $variant->getInventoryLevel() + 5;
47 |
48 | $request = new VariantPut( $variant->get() );
49 | $request->setInventoryLevel( $inventory_level );
50 |
51 | $catalog->updateVariant( $variant->getProductId(), $variant->getId(), $request );
52 | }, $variants );
53 |
54 | } catch ( \BigCommerce\Api\v3\ApiException $e ) {
55 | $error_message = $e->getMessage();
56 | $error_body = $e->getResponseBody();
57 | $error_headers = $e->getResponseHeaders();
58 | // do something with the error
59 | return;
60 | }
61 | ```
--------------------------------------------------------------------------------
/git_push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3 | #
4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
5 |
6 | git_user_id=$1
7 | git_repo_id=$2
8 | release_note=$3
9 |
10 | if [ "$git_user_id" = "" ]; then
11 | git_user_id="bigcommerce-labs"
12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
13 | fi
14 |
15 | if [ "$git_repo_id" = "" ]; then
16 | git_repo_id="api-v3-php-client"
17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
18 | fi
19 |
20 | if [ "$release_note" = "" ]; then
21 | release_note="Minor update"
22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note"
23 | fi
24 |
25 | # Initialize the local directory as a Git repository
26 | git init
27 |
28 | # Adds the files in the local repository and stages them for commit.
29 | git add .
30 |
31 | # Commits the tracked changes and prepares them to be pushed to a remote repository.
32 | git commit -m "$release_note"
33 |
34 | # Sets the new remote
35 | git_remote=`git remote`
36 | if [ "$git_remote" = "" ]; then # git remote not defined
37 |
38 | if [ "$GIT_TOKEN" = "" ]; then
39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
41 | else
42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
43 | fi
44 |
45 | fi
46 |
47 | git pull origin master
48 |
49 | # Pushes (Forces) the changes in the local repository up to the remote repository
50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
51 | git push origin master 2>&1 | grep -v 'To https'
52 |
53 |
--------------------------------------------------------------------------------
/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 | ./test/Api
11 | ./test/Model
12 |
13 |
14 |
15 |
16 |
17 | ./src
18 | ./src/Model
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/Api/AbandonedCartApi.php:
--------------------------------------------------------------------------------
1 | apiClient = $apiClient;
50 | }
51 |
52 | /**
53 | * Get API client
54 | *
55 | * @return \BigCommerce\Api\v3\ApiClient get the API client
56 | */
57 | public function getApiClient()
58 | {
59 | return $this->apiClient;
60 | }
61 |
62 | /**
63 | * Set the API client
64 | *
65 | * @param \BigCommerce\Api\v3\ApiClient $apiClient set the API client
66 | *
67 | * @return AbandonedCartApi
68 | */
69 | public function setApiClient(\BigCommerce\Api\v3\ApiClient $apiClient)
70 | {
71 | $this->apiClient = $apiClient;
72 | return $this;
73 | }
74 |
75 | /**
76 | * Operation recoverCart
77 | *
78 | *
79 | *
80 | * @param string $token Unique token. (required)
81 | * @param array $params = []
82 | * @return \BigCommerce\Api\v3\Model\AbandonedCartResponse
83 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
84 | * @throws \InvalidArgumentException
85 | */
86 | public function recoverCart($token, array $params = [])
87 | {
88 | list($response) = $this->recoverCartWithHttpInfo($token, $params);
89 | return $response;
90 | }
91 |
92 |
93 | /**
94 | * Operation recoverCartWithHttpInfo
95 | *
96 | * @see self::recoverCart()
97 | * @param string $token Unique token. (required)
98 | * @param array $params = []
99 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
100 | * @throws \InvalidArgumentException
101 | * @return array of \BigCommerce\Api\v3\Model\AbandonedCartResponse, HTTP status code, HTTP response headers (array of strings)
102 | */
103 | public function recoverCartWithHttpInfo($token, array $params = [])
104 | {
105 |
106 | // verify the required parameter 'token' is set
107 | if (!isset($token)) {
108 | throw new \InvalidArgumentException('Missing the required parameter $token when calling recoverCart');
109 | }
110 |
111 |
112 | // parse inputs
113 | $resourcePath = "/abandoned-carts/{token}";
114 | $httpBody = '';
115 | $queryParams = [];
116 | $headerParams = [];
117 | $formParams = [];
118 | $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);
119 | if (!is_null($_header_accept)) {
120 | $headerParams['Accept'] = $_header_accept;
121 | }
122 | $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);
123 |
124 | // query params
125 | foreach ( $params as $key => $param ) {
126 | $queryParams[ $key ] = $this->apiClient->getSerializer()->toQueryValue( $param );
127 | }
128 |
129 | // path params
130 |
131 |
132 | if (isset($token)) {
133 | $resourcePath = str_replace(
134 | "{" . "token" . "}",
135 | $this->apiClient->getSerializer()->toPathValue($token),
136 | $resourcePath
137 | );
138 | }
139 | // default format to json
140 | $resourcePath = str_replace("{format}", "json", $resourcePath);
141 |
142 | // for model (json/xml)
143 | if (isset($_tempBody)) {
144 | $httpBody = $_tempBody; // $_tempBody is the method argument, if present
145 | } elseif (count($formParams) > 0) {
146 | $httpBody = $formParams; // for HTTP post (form)
147 | }
148 |
149 | // make the API Call
150 | try {
151 | list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
152 | $resourcePath,
153 | 'GET',
154 | $queryParams,
155 | $httpBody,
156 | $headerParams,
157 | '\BigCommerce\Api\v3\Model\AbandonedCartResponse',
158 | '/abandoned-carts/{token}'
159 | );
160 | return [$this->apiClient->getSerializer()->deserialize($response, '\BigCommerce\Api\v3\Model\AbandonedCartResponse', $httpHeader), $statusCode, $httpHeader];
161 |
162 | } catch (ApiException $e) {
163 | switch ($e->getCode()) {
164 |
165 | case 200:
166 | $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\BigCommerce\Api\v3\Model\AbandonedCartResponse', $e->getResponseHeaders());
167 | $e->setResponseObject($data);
168 | break;
169 |
170 | }
171 |
172 | throw $e;
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/src/Api/CurrencyApi.php:
--------------------------------------------------------------------------------
1 | apiClient = $apiClient;
31 | }
32 |
33 | /**
34 | * Get API client
35 | *
36 | * @return \BigCommerce\Api\v3\ApiClient get the API client
37 | */
38 | public function getApiClient()
39 | {
40 | return $this->apiClient;
41 | }
42 |
43 | /**
44 | * Set the API client
45 | *
46 | * @param \BigCommerce\Api\v3\ApiClient $apiClient set the API client
47 | *
48 | * @return CurrencyApi
49 | */
50 | public function setApiClient( \BigCommerce\Api\v3\ApiClient $apiClient )
51 | {
52 | $this->apiClient = $apiClient;
53 |
54 | return $this;
55 | }
56 |
57 | /**
58 | * Operation getChannelCurrencyAssignments
59 | * Get Channel Currency Assignments
60 | *
61 | *
62 | * @param int $channel_id The ID of a Channel that's available through GET /channels (required)
63 | * @param array $params = []
64 | * @return CurrencyAssignmentResponse
65 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
66 | * @throws \InvalidArgumentException
67 | */
68 | public function getChannelCurrencyAssignments( $channel_id, array $params = [])
69 | {
70 | list($response) = $this->getChannelCurrencyAssignmentsHttpInfo( $channel_id, $params );
71 | return $response;
72 | }
73 |
74 | /**
75 | * Operation getChannelCurrencyAssignmentsHttpInfo
76 | *
77 | * @param int $channel_id The ID of a Channel that's available through GET /channels (required)
78 | * @param array $params = []
79 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
80 | * @throws \InvalidArgumentException
81 | * @return array of \BigCommerce\Api\v3\Model\CurrencyAssignmentResponse, HTTP status code, HTTP response headers (array of strings)
82 | */
83 | public function getChannelCurrencyAssignmentsHttpInfo( $channel_id, array $params = [] )
84 | {
85 | // verify the required parameter 'channel_id' is set
86 | if ( ! isset( $channel_id ) ) {
87 | throw new \InvalidArgumentException( 'Missing the required parameter $channel_id when calling getChannelCurrencyAssignments' );
88 | }
89 |
90 | $resourcePath = "/channels/{channelId}/currency-assignments";
91 | $httpBody = '';
92 | $queryParams = [];
93 | $headerParams = [];
94 | $formParams = [];
95 |
96 | $_header_accept = $this->apiClient->selectHeaderAccept( ['application/json'] );
97 | if ( ! is_null( $_header_accept ) ) {
98 | $headerParams['Accept'] = $_header_accept;
99 | }
100 | $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType( ['application/json'] );
101 |
102 | // query params
103 | foreach ( $params as $key => $param ) {
104 | $queryParams[ $key ] = $this->apiClient->getSerializer()->toQueryValue( $param );
105 | }
106 |
107 | if ( isset( $channel_id ) ) {
108 | $resourcePath = str_replace(
109 | "{" . "channelId" . "}",
110 | $this->apiClient->getSerializer()->toPathValue( $channel_id ),
111 | $resourcePath
112 | );
113 | }
114 |
115 | $resourcePath = str_replace( "{format}", "json", $resourcePath );
116 |
117 | // for model (json/xml)
118 | if ( isset( $_tempBody ) ) {
119 | $httpBody = $_tempBody; // $_tempBody is the method argument, if present
120 | } elseif ( count( $formParams ) > 0 ) {
121 | $httpBody = $formParams; // for HTTP post (form)
122 | }
123 |
124 | // make the API Call
125 | try {
126 | list( $response, $statusCode, $httpHeader ) = $this->apiClient->callApi(
127 | $resourcePath,
128 | 'GET',
129 | $queryParams,
130 | $httpBody,
131 | $headerParams,
132 | '\BigCommerce\Api\v3\Model\CurrencyAssignmentResponse',
133 | '/channels/{channelId}/currency-assignments'
134 | );
135 |
136 | return [
137 | $this->apiClient->getSerializer()->deserialize( $response, '\BigCommerce\Api\v3\Model\CurrencyAssignmentResponse', $httpHeader ),
138 | $statusCode,
139 | $httpHeader
140 | ];
141 |
142 | } catch ( ApiException $e ) {
143 | switch ( $e->getCode() ) {
144 |
145 | case 200:
146 | $data = $this->apiClient->getSerializer()->deserialize(
147 | $e->getResponseBody(),
148 | '\BigCommerce\Api\v3\Model\CurrencyAssignments',
149 | $e->getResponseHeaders()
150 | );
151 | $e->setResponseObject( $data );
152 | break;
153 |
154 | }
155 |
156 | throw $e;
157 | }
158 | }
159 |
160 | }
161 |
--------------------------------------------------------------------------------
/src/Api/PricingApi.php:
--------------------------------------------------------------------------------
1 | apiClient = $apiClient;
50 | }
51 |
52 | /**
53 | * Get API client
54 | *
55 | * @return \BigCommerce\Api\v3\ApiClient get the API client
56 | */
57 | public function getApiClient()
58 | {
59 | return $this->apiClient;
60 | }
61 |
62 | /**
63 | * Set the API client
64 | *
65 | * @param \BigCommerce\Api\v3\ApiClient $apiClient set the API client
66 | *
67 | * @return PricingApi
68 | */
69 | public function setApiClient(\BigCommerce\Api\v3\ApiClient $apiClient)
70 | {
71 | $this->apiClient = $apiClient;
72 | return $this;
73 | }
74 |
75 | /**
76 | * Operation getPrices
77 | * Get Prices
78 | *
79 | *
80 | * @param \BigCommerce\Api\v3\Model\PricingRequest $body (required)
81 | * @param array $params = []
82 | * @return \BigCommerce\Api\v3\Model\PricingResponse
83 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
84 | * @throws \InvalidArgumentException
85 | */
86 | public function getPrices($body, array $params = [])
87 | {
88 | list($response) = $this->getPricesWithHttpInfo( $body, $params);
89 | return $response;
90 | }
91 |
92 |
93 | /**
94 | * Operation getPricesWithHttpInfo
95 | *
96 | * @see self::getPrices()
97 | * @param \BigCommerce\Api\v3\Model\PricingRequest $body (required)
98 | * @param array $params = []
99 | * @throws \BigCommerce\Api\v3\ApiException on non-2xx response
100 | * @throws \InvalidArgumentException
101 | * @return array of \BigCommerce\Api\v3\Model\PricingResponse, HTTP status code, HTTP response headers (array of strings)
102 | */
103 | public function getPricesWithHttpInfo( $body, array $params = [])
104 | {
105 |
106 | // verify the required parameter 'body' is set
107 | if (!isset($body)) {
108 | throw new \InvalidArgumentException('Missing the required parameter $body when calling getPrices');
109 | }
110 |
111 |
112 | // parse inputs
113 | $resourcePath = "/pricing/products";
114 | $httpBody = '';
115 | $queryParams = [];
116 | $headerParams = [];
117 | $formParams = [];
118 | $_header_accept = $this->apiClient->selectHeaderAccept([]);
119 | if (!is_null($_header_accept)) {
120 | $headerParams['Accept'] = $_header_accept;
121 | }
122 | $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);
123 |
124 | // query params
125 | foreach ( $params as $key => $param ) {
126 | $queryParams[ $key ] = $this->apiClient->getSerializer()->toQueryValue( $param );
127 | }
128 |
129 | // default format to json
130 | $resourcePath = str_replace("{format}", "json", $resourcePath);
131 |
132 | // body params
133 | $_tempBody = null;
134 | if (isset($body)) {
135 | $_tempBody = $body;
136 | }
137 | // for model (json/xml)
138 | if (isset($_tempBody)) {
139 | $httpBody = $_tempBody; // $_tempBody is the method argument, if present
140 | } elseif (count($formParams) > 0) {
141 | $httpBody = $formParams; // for HTTP post (form)
142 | }
143 |
144 | // make the API Call
145 | try {
146 | list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
147 | $resourcePath,
148 | 'POST',
149 | $queryParams,
150 | $httpBody,
151 | $headerParams,
152 | '\BigCommerce\Api\v3\Model\PricingResponse',
153 | '/pricing/products'
154 | );
155 | return [$this->apiClient->getSerializer()->deserialize($response, '\BigCommerce\Api\v3\Model\PricingResponse', $httpHeader), $statusCode, $httpHeader];
156 |
157 | } catch (ApiException $e) {
158 | switch ($e->getCode()) {
159 |
160 | case 200:
161 | $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\BigCommerce\Api\v3\Model\PricingResponse', $e->getResponseHeaders());
162 | $e->setResponseObject($data);
163 | break;
164 |
165 | }
166 |
167 | throw $e;
168 | }
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/src/ApiException.php:
--------------------------------------------------------------------------------
1 | responseHeaders = $responseHeaders;
77 | $this->responseBody = $responseBody;
78 | }
79 |
80 | /**
81 | * Gets the HTTP response header
82 | *
83 | * @return string HTTP response header
84 | */
85 | public function getResponseHeaders()
86 | {
87 | return $this->responseHeaders;
88 | }
89 |
90 | /**
91 | * Gets the HTTP body of the server response either as Json or string
92 | *
93 | * @return mixed HTTP body of the server response either as Json or string
94 | */
95 | public function getResponseBody()
96 | {
97 | return $this->responseBody;
98 | }
99 |
100 | /**
101 | * Sets the deseralized response object (during deserialization)
102 | *
103 | * @param mixed $obj Deserialized response object
104 | *
105 | * @return void
106 | */
107 | public function setResponseObject($obj)
108 | {
109 | $this->responseObject = $obj;
110 | }
111 |
112 | /**
113 | * Gets the deseralized response object (during deserialization)
114 | *
115 | * @return mixed the deserialized response object
116 | */
117 | public function getResponseObject()
118 | {
119 | return $this->responseObject;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/src/Model/AbandonedCartInfo.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'cart_id' => 'cart_id'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'cart_id' => 'setCartId'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'cart_id' => 'getCartId'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['cart_id'] = array_key_exists('cart_id', $data) ? $data['cart_id'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets cart_id
144 | * @return string
145 | */
146 | public function getCartId()
147 | {
148 | return $this->container['cart_id'];
149 | }
150 |
151 | /**
152 | * Sets cart_id
153 | * @param string $cart_id Contains cart_id.
154 | * @return $this
155 | */
156 | public function setCartId($cart_id)
157 | {
158 | $this->container['cart_id'] = $cart_id;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CVVResult.php:
--------------------------------------------------------------------------------
1 | 'string',
45 | 'message' => 'string'
46 | ];
47 |
48 | public static function swaggerTypes()
49 | {
50 | return self::$swaggerTypes;
51 | }
52 |
53 | /**
54 | * Array of attributes where the key is the local name, and the value is the original name
55 | * @var string[]
56 | */
57 | protected static $attributeMap = [
58 | 'code' => 'code',
59 | 'message' => 'message'
60 | ];
61 |
62 | /**
63 | * Array of attributes to setter functions (for deserialization of responses)
64 | * @var string[]
65 | */
66 | protected static $setters = [
67 | 'code' => 'setCode',
68 | 'message' => 'setMessage'
69 | ];
70 |
71 | /**
72 | * Array of attributes to getter functions (for serialization of requests)
73 | * @var string[]
74 | */
75 | protected static $getters = [
76 | 'code' => 'getCode',
77 | 'message' => 'getMessage'
78 | ];
79 |
80 | public static function attributeMap()
81 | {
82 | return self::$attributeMap;
83 | }
84 |
85 | public static function setters()
86 | {
87 | return self::$setters;
88 | }
89 |
90 | public static function getters()
91 | {
92 | return self::$getters;
93 | }
94 |
95 |
96 |
97 |
98 |
99 | /**
100 | * Associative array for storing property values
101 | * @var mixed[]
102 | */
103 | protected $container = [];
104 |
105 | /**
106 | * Constructor
107 | * @param mixed[] $data Associated array of property values initializing the model
108 | */
109 | public function __construct(array $data = [])
110 | {
111 | $this->container['code'] = array_key_exists('code', $data) ? $data['code'] : null;
112 | $this->container['message'] = array_key_exists('message', $data) ? $data['message'] : null;
113 | }
114 |
115 | /**
116 | * returns container
117 | * @return array
118 | */
119 | public function get()
120 | {
121 | return $this->container;
122 | }
123 |
124 | /**
125 | * show all the invalid properties with reasons.
126 | *
127 | * @return array invalid properties with reasons
128 | */
129 | public function listInvalidProperties()
130 | {
131 | $invalid_properties = [];
132 | return $invalid_properties;
133 | }
134 |
135 | /**
136 | * validate all the properties in the model
137 | * return true if all passed
138 | *
139 | * @return bool True if all properteis are valid
140 | */
141 | public function valid()
142 | {
143 | return true;
144 | }
145 |
146 |
147 | /**
148 | * Gets code
149 | * @return string
150 | */
151 | public function getCode()
152 | {
153 | return $this->container['code'];
154 | }
155 |
156 | /**
157 | * Sets code
158 | * @param string $code CVV code.
159 | * @return $this
160 | */
161 | public function setCode($code)
162 | {
163 | $this->container['code'] = $code;
164 |
165 | return $this;
166 | }
167 |
168 | /**
169 | * Gets message
170 | * @return string
171 | */
172 | public function getMessage()
173 | {
174 | return $this->container['message'];
175 | }
176 |
177 | /**
178 | * Sets message
179 | * @param string $message CVV message.
180 | * @return $this
181 | */
182 | public function setMessage($message)
183 | {
184 | $this->container['message'] = $message;
185 |
186 | return $this;
187 | }
188 | /**
189 | * Returns true if offset exists. False otherwise.
190 | * @param integer $offset Offset
191 | * @return boolean
192 | */
193 | public function offsetExists($offset)
194 | {
195 | return isset($this->container[$offset]);
196 | }
197 |
198 | /**
199 | * Gets offset.
200 | * @param integer $offset Offset
201 | * @return mixed
202 | */
203 | public function offsetGet($offset)
204 | {
205 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
206 | }
207 |
208 | /**
209 | * Sets value based on offset.
210 | * @param integer $offset Offset
211 | * @param mixed $value Value to be set
212 | * @return void
213 | */
214 | public function offsetSet($offset, $value)
215 | {
216 | if (is_null($offset)) {
217 | $this->container[] = $value;
218 | } else {
219 | $this->container[$offset] = $value;
220 | }
221 | }
222 |
223 | /**
224 | * Unsets offset.
225 | * @param integer $offset Offset
226 | * @return void
227 | */
228 | public function offsetUnset($offset)
229 | {
230 | unset($this->container[$offset]);
231 | }
232 |
233 | /**
234 | * Gets the string presentation of the object
235 | * @return string
236 | */
237 | public function __toString()
238 | {
239 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
240 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
241 | }
242 |
243 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
244 | }
245 | }
246 |
247 |
248 |
--------------------------------------------------------------------------------
/src/Model/CartUpdateRequestData.php:
--------------------------------------------------------------------------------
1 | 'int'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'customer_id' => 'customer_id'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'customer_id' => 'setCustomerId'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'customer_id' => 'getCustomerId'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['customer_id'] = array_key_exists('customer_id', $data) ? $data['customer_id'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets customer_id
144 | * @return int
145 | */
146 | public function getCustomerId()
147 | {
148 | return $this->container['customer_id'];
149 | }
150 |
151 | /**
152 | * Sets customer_id
153 | * @param int $customer_id
154 | * @return $this
155 | */
156 | public function setCustomerId($customer_id)
157 | {
158 | $this->container['customer_id'] = $customer_id;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/ChannelConfigMeta.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\ChannelConfigMetaApp'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'app' => 'app'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'app' => 'setApp'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'app' => 'getApp'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['app'] = array_key_exists('app', $data) ? $data['app'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets app
144 | * @return \BigCommerce\Api\v3\Model\ChannelConfigMetaApp
145 | */
146 | public function getApp()
147 | {
148 | return $this->container['app'];
149 | }
150 |
151 | /**
152 | * Sets app
153 | * @param \BigCommerce\Api\v3\Model\ChannelConfigMetaApp $app
154 | * @return $this
155 | */
156 | public function setApp($app)
157 | {
158 | $this->container['app'] = $app;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CheckoutError.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\ErrorDetail[]'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'errors' => 'errors'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'errors' => 'setErrors'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'errors' => 'getErrors'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['errors'] = array_key_exists('errors', $data) ? $data['errors'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets errors
144 | * @return \BigCommerce\Api\v3\Model\ErrorDetail[]
145 | */
146 | public function getErrors()
147 | {
148 | return $this->container['errors'];
149 | }
150 |
151 | /**
152 | * Sets errors
153 | * @param \BigCommerce\Api\v3\Model\ErrorDetail[] $errors
154 | * @return $this
155 | */
156 | public function setErrors($errors)
157 | {
158 | $this->container['errors'] = $errors;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CheckoutResponse.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\Checkout'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'data' => 'data'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'data' => 'setData'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'data' => 'getData'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['data'] = array_key_exists('data', $data) ? $data['data'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets data
144 | * @return \BigCommerce\Api\v3\Model\Checkout
145 | */
146 | public function getData()
147 | {
148 | return $this->container['data'];
149 | }
150 |
151 | /**
152 | * Sets data
153 | * @param \BigCommerce\Api\v3\Model\Checkout $data
154 | * @return $this
155 | */
156 | public function setData($data)
157 | {
158 | $this->container['data'] = $data;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CollectionMeta.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\Pagination'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'pagination' => 'pagination'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'pagination' => 'setPagination'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'pagination' => 'getPagination'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['pagination'] = array_key_exists('pagination', $data) ? $data['pagination'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets pagination
144 | * @return \BigCommerce\Api\v3\Model\Pagination
145 | */
146 | public function getPagination()
147 | {
148 | return $this->container['pagination'];
149 | }
150 |
151 | /**
152 | * Sets pagination
153 | * @param \BigCommerce\Api\v3\Model\Pagination $pagination
154 | * @return $this
155 | */
156 | public function setPagination($pagination)
157 | {
158 | $this->container['pagination'] = $pagination;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/ConsignmentDiscount.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'id' => 'id'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'id' => 'setId'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'id' => 'getId'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['id'] = array_key_exists('id', $data) ? $data['id'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets id
144 | * @return string
145 | */
146 | public function getId()
147 | {
148 | return $this->container['id'];
149 | }
150 |
151 | /**
152 | * Sets id
153 | * @param string $id Discount rule ID that applied this discount
154 | * @return $this
155 | */
156 | public function setId($id)
157 | {
158 | $this->container['id'] = $id;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CouponCodeRequest.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'coupon_code' => 'coupon_code'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'coupon_code' => 'setCouponCode'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'coupon_code' => 'getCouponCode'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['coupon_code'] = array_key_exists('coupon_code', $data) ? $data['coupon_code'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets coupon_code
144 | * @return string
145 | */
146 | public function getCouponCode()
147 | {
148 | return $this->container['coupon_code'];
149 | }
150 |
151 | /**
152 | * Sets coupon_code
153 | * @param string $coupon_code
154 | * @return $this
155 | */
156 | public function setCouponCode($coupon_code)
157 | {
158 | $this->container['coupon_code'] = $coupon_code;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/Currency.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'code' => 'code'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'code' => 'setCode'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'code' => 'getCode'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['code'] = array_key_exists('code', $data) ? $data['code'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets code
144 | * @return string
145 | */
146 | public function getCode()
147 | {
148 | return $this->container['code'];
149 | }
150 |
151 | /**
152 | * Sets code
153 | * @param string $code ISO-4217 currency code. (See: http://en.wikipedia.org/wiki/ISO_4217.)
154 | * @return $this
155 | */
156 | public function setCode($code)
157 | {
158 | $this->container['code'] = $code;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/Custom.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'payment_method' => 'payment_method'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'payment_method' => 'setPaymentMethod'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'payment_method' => 'getPaymentMethod'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['payment_method'] = array_key_exists('payment_method', $data) ? $data['payment_method'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets payment_method
144 | * @return string
145 | */
146 | public function getPaymentMethod()
147 | {
148 | return $this->container['payment_method'];
149 | }
150 |
151 | /**
152 | * Sets payment_method
153 | * @param string $payment_method Text entered for the payment method in the control panel.
154 | * @return $this
155 | */
156 | public function setPaymentMethod($payment_method)
157 | {
158 | $this->container['payment_method'] = $payment_method;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CustomerAuthenticationBase.php:
--------------------------------------------------------------------------------
1 | 'bool'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'force_password_reset' => 'force_password_reset'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'force_password_reset' => 'setForcePasswordReset'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'force_password_reset' => 'getForcePasswordReset'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['force_password_reset'] = array_key_exists('force_password_reset', $data) ? $data['force_password_reset'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets force_password_reset
144 | * @return bool
145 | */
146 | public function getForcePasswordReset()
147 | {
148 | return $this->container['force_password_reset'];
149 | }
150 |
151 | /**
152 | * Sets force_password_reset
153 | * @param bool $force_password_reset If `true`, this customer will be forced to change password on next login.
154 | * @return $this
155 | */
156 | public function setForcePasswordReset($force_password_reset)
157 | {
158 | $this->container['force_password_reset'] = $force_password_reset;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/CustomerChannelIds.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/CustomersSettings.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\CustomersSettingsData'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'data' => 'data'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'data' => 'setData'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'data' => 'getData'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['data'] = array_key_exists('data', $data) ? $data['data'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets data
144 | * @return \BigCommerce\Api\v3\Model\CustomersSettingsData
145 | */
146 | public function getData()
147 | {
148 | return $this->container['data'];
149 | }
150 |
151 | /**
152 | * Sets data
153 | * @param \BigCommerce\Api\v3\Model\CustomersSettingsData $data
154 | * @return $this
155 | */
156 | public function setData($data)
157 | {
158 | $this->container['data'] = $data;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/DetailedErrors.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/JobId.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'job_id' => 'job_id'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'job_id' => 'setJobId'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'job_id' => 'getJobId'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['job_id'] = array_key_exists('job_id', $data) ? $data['job_id'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets job_id
144 | * @return string
145 | */
146 | public function getJobId()
147 | {
148 | return $this->container['job_id'];
149 | }
150 |
151 | /**
152 | * Sets job_id
153 | * @param string $job_id The job identifier.
154 | * @return $this
155 | */
156 | public function setJobId($job_id)
157 | {
158 | $this->container['job_id'] = $job_id;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/Meta.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/Offline.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'display_name' => 'display_name'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'display_name' => 'setDisplayName'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'display_name' => 'getDisplayName'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['display_name'] = array_key_exists('display_name', $data) ? $data['display_name'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets display_name
144 | * @return string
145 | */
146 | public function getDisplayName()
147 | {
148 | return $this->container['display_name'];
149 | }
150 |
151 | /**
152 | * Sets display_name
153 | * @param string $display_name Display name for the offline payment.
154 | * @return $this
155 | */
156 | public function setDisplayName($display_name)
157 | {
158 | $this->container['display_name'] = $display_name;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/Order.php:
--------------------------------------------------------------------------------
1 | 'int'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'id' => 'id'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'id' => 'setId'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'id' => 'getId'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['id'] = array_key_exists('id', $data) ? $data['id'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets id
144 | * @return int
145 | */
146 | public function getId()
147 | {
148 | return $this->container['id'];
149 | }
150 |
151 | /**
152 | * Sets id
153 | * @param int $id The order Id.
154 | * @return $this
155 | */
156 | public function setId($id)
157 | {
158 | $this->container['id'] = $id;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/PriceRecordBatchErrorResponse.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\PriceRecordBatchErrorSet[]'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'batch_errors' => 'batch_errors'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'batch_errors' => 'setBatchErrors'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'batch_errors' => 'getBatchErrors'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['batch_errors'] = array_key_exists('batch_errors', $data) ? $data['batch_errors'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets batch_errors
144 | * @return \BigCommerce\Api\v3\Model\PriceRecordBatchErrorSet[]
145 | */
146 | public function getBatchErrors()
147 | {
148 | return $this->container['batch_errors'];
149 | }
150 |
151 | /**
152 | * Sets batch_errors
153 | * @param \BigCommerce\Api\v3\Model\PriceRecordBatchErrorSet[] $batch_errors
154 | * @return $this
155 | */
156 | public function setBatchErrors($batch_errors)
157 | {
158 | $this->container['batch_errors'] = $batch_errors;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/PriceRecordCollectionPut.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/ResourceImage.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'image_url' => 'image_url'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'image_url' => 'setImageUrl'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'image_url' => 'getImageUrl'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['image_url'] = array_key_exists('image_url', $data) ? $data['image_url'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets image_url
144 | * @return string
145 | */
146 | public function getImageUrl()
147 | {
148 | return $this->container['image_url'];
149 | }
150 |
151 | /**
152 | * Sets image_url
153 | * @param string $image_url A public URL for a GIF, JPEG, or PNG image.
154 | * @return $this
155 | */
156 | public function setImageUrl($image_url)
157 | {
158 | $this->container['image_url'] = $image_url;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/ScriptResponse.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\Script'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'data' => 'data'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'data' => 'setData'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'data' => 'getData'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['data'] = array_key_exists('data', $data) ? $data['data'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets data
144 | * @return \BigCommerce\Api\v3\Model\Script
145 | */
146 | public function getData()
147 | {
148 | return $this->container['data'];
149 | }
150 |
151 | /**
152 | * Sets data
153 | * @param \BigCommerce\Api\v3\Model\Script $data
154 | * @return $this
155 | */
156 | public function setData($data)
157 | {
158 | $this->container['data'] = $data;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/StoreCredit.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'remaining_balance' => 'remaining_balance'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'remaining_balance' => 'setRemainingBalance'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'remaining_balance' => 'getRemainingBalance'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['remaining_balance'] = array_key_exists('remaining_balance', $data) ? $data['remaining_balance'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets remaining_balance
144 | * @return string
145 | */
146 | public function getRemainingBalance()
147 | {
148 | return $this->container['remaining_balance'];
149 | }
150 |
151 | /**
152 | * Sets remaining_balance
153 | * @param string $remaining_balance Remaining balance of shopper's store credit.
154 | * @return $this
155 | */
156 | public function setRemainingBalance($remaining_balance)
157 | {
158 | $this->container['remaining_balance'] = $remaining_balance;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/StoreCreditAmounts.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/StoreCreditAmountsInner.php:
--------------------------------------------------------------------------------
1 | 'float'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'amount' => 'amount'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'amount' => 'setAmount'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'amount' => 'getAmount'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['amount'] = array_key_exists('amount', $data) ? $data['amount'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets amount
144 | * @return float
145 | */
146 | public function getAmount()
147 | {
148 | return $this->container['amount'];
149 | }
150 |
151 | /**
152 | * Sets amount
153 | * @param float $amount
154 | * @return $this
155 | */
156 | public function setAmount($amount)
157 | {
158 | $this->container['amount'] = $amount;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/SuccessBatchResponse.php:
--------------------------------------------------------------------------------
1 | container;
116 | }
117 |
118 | /**
119 | * show all the invalid properties with reasons.
120 | *
121 | * @return array invalid properties with reasons
122 | */
123 | public function listInvalidProperties()
124 | {
125 | $invalid_properties = [];
126 | return $invalid_properties;
127 | }
128 |
129 | /**
130 | * validate all the properties in the model
131 | * return true if all passed
132 | *
133 | * @return bool True if all properteis are valid
134 | */
135 | public function valid()
136 | {
137 | return true;
138 | }
139 |
140 | /**
141 | * Returns true if offset exists. False otherwise.
142 | * @param integer $offset Offset
143 | * @return boolean
144 | */
145 | public function offsetExists($offset)
146 | {
147 | return isset($this->container[$offset]);
148 | }
149 |
150 | /**
151 | * Gets offset.
152 | * @param integer $offset Offset
153 | * @return mixed
154 | */
155 | public function offsetGet($offset)
156 | {
157 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
158 | }
159 |
160 | /**
161 | * Sets value based on offset.
162 | * @param integer $offset Offset
163 | * @param mixed $value Value to be set
164 | * @return void
165 | */
166 | public function offsetSet($offset, $value)
167 | {
168 | if (is_null($offset)) {
169 | $this->container[] = $value;
170 | } else {
171 | $this->container[$offset] = $value;
172 | }
173 | }
174 |
175 | /**
176 | * Unsets offset.
177 | * @param integer $offset Offset
178 | * @return void
179 | */
180 | public function offsetUnset($offset)
181 | {
182 | unset($this->container[$offset]);
183 | }
184 |
185 | /**
186 | * Gets the string presentation of the object
187 | * @return string
188 | */
189 | public function __toString()
190 | {
191 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
192 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
193 | }
194 |
195 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
196 | }
197 | }
198 |
199 |
200 |
--------------------------------------------------------------------------------
/src/Model/Tax.php:
--------------------------------------------------------------------------------
1 | 'string',
45 | 'amount' => 'double'
46 | ];
47 |
48 | public static function swaggerTypes()
49 | {
50 | return self::$swaggerTypes;
51 | }
52 |
53 | /**
54 | * Array of attributes where the key is the local name, and the value is the original name
55 | * @var string[]
56 | */
57 | protected static $attributeMap = [
58 | 'name' => 'name',
59 | 'amount' => 'amount'
60 | ];
61 |
62 | /**
63 | * Array of attributes to setter functions (for deserialization of responses)
64 | * @var string[]
65 | */
66 | protected static $setters = [
67 | 'name' => 'setName',
68 | 'amount' => 'setAmount'
69 | ];
70 |
71 | /**
72 | * Array of attributes to getter functions (for serialization of requests)
73 | * @var string[]
74 | */
75 | protected static $getters = [
76 | 'name' => 'getName',
77 | 'amount' => 'getAmount'
78 | ];
79 |
80 | public static function attributeMap()
81 | {
82 | return self::$attributeMap;
83 | }
84 |
85 | public static function setters()
86 | {
87 | return self::$setters;
88 | }
89 |
90 | public static function getters()
91 | {
92 | return self::$getters;
93 | }
94 |
95 |
96 |
97 |
98 |
99 | /**
100 | * Associative array for storing property values
101 | * @var mixed[]
102 | */
103 | protected $container = [];
104 |
105 | /**
106 | * Constructor
107 | * @param mixed[] $data Associated array of property values initializing the model
108 | */
109 | public function __construct(array $data = [])
110 | {
111 | $this->container['name'] = array_key_exists('name', $data) ? $data['name'] : null;
112 | $this->container['amount'] = array_key_exists('amount', $data) ? $data['amount'] : null;
113 | }
114 |
115 | /**
116 | * returns container
117 | * @return array
118 | */
119 | public function get()
120 | {
121 | return $this->container;
122 | }
123 |
124 | /**
125 | * show all the invalid properties with reasons.
126 | *
127 | * @return array invalid properties with reasons
128 | */
129 | public function listInvalidProperties()
130 | {
131 | $invalid_properties = [];
132 | return $invalid_properties;
133 | }
134 |
135 | /**
136 | * validate all the properties in the model
137 | * return true if all passed
138 | *
139 | * @return bool True if all properteis are valid
140 | */
141 | public function valid()
142 | {
143 | return true;
144 | }
145 |
146 |
147 | /**
148 | * Gets name
149 | * @return string
150 | */
151 | public function getName()
152 | {
153 | return $this->container['name'];
154 | }
155 |
156 | /**
157 | * Sets name
158 | * @param string $name Name of the tax.
159 | * @return $this
160 | */
161 | public function setName($name)
162 | {
163 | $this->container['name'] = $name;
164 |
165 | return $this;
166 | }
167 |
168 | /**
169 | * Gets amount
170 | * @return double
171 | */
172 | public function getAmount()
173 | {
174 | return $this->container['amount'];
175 | }
176 |
177 | /**
178 | * Sets amount
179 | * @param double $amount
180 | * @return $this
181 | */
182 | public function setAmount($amount)
183 | {
184 | $this->container['amount'] = $amount;
185 |
186 | return $this;
187 | }
188 | /**
189 | * Returns true if offset exists. False otherwise.
190 | * @param integer $offset Offset
191 | * @return boolean
192 | */
193 | public function offsetExists($offset)
194 | {
195 | return isset($this->container[$offset]);
196 | }
197 |
198 | /**
199 | * Gets offset.
200 | * @param integer $offset Offset
201 | * @return mixed
202 | */
203 | public function offsetGet($offset)
204 | {
205 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
206 | }
207 |
208 | /**
209 | * Sets value based on offset.
210 | * @param integer $offset Offset
211 | * @param mixed $value Value to be set
212 | * @return void
213 | */
214 | public function offsetSet($offset, $value)
215 | {
216 | if (is_null($offset)) {
217 | $this->container[] = $value;
218 | } else {
219 | $this->container[$offset] = $value;
220 | }
221 | }
222 |
223 | /**
224 | * Unsets offset.
225 | * @param integer $offset Offset
226 | * @return void
227 | */
228 | public function offsetUnset($offset)
229 | {
230 | unset($this->container[$offset]);
231 | }
232 |
233 | /**
234 | * Gets the string presentation of the object
235 | * @return string
236 | */
237 | public function __toString()
238 | {
239 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
240 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
241 | }
242 |
243 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
244 | }
245 | }
246 |
247 |
248 |
--------------------------------------------------------------------------------
/src/Model/ThemeRegion.php:
--------------------------------------------------------------------------------
1 | 'string'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'name' => 'name'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'name' => 'setName'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'name' => 'getName'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['name'] = array_key_exists('name', $data) ? $data['name'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets name
144 | * @return string
145 | */
146 | public function getName()
147 | {
148 | return $this->container['name'];
149 | }
150 |
151 | /**
152 | * Sets name
153 | * @param string $name The region name.
154 | * @return $this
155 | */
156 | public function setName($name)
157 | {
158 | $this->container['name'] = $name;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/src/Model/WishlistAddItemsRequest.php:
--------------------------------------------------------------------------------
1 | '\BigCommerce\Api\v3\Model\WishlistItem[]'
45 | ];
46 |
47 | public static function swaggerTypes()
48 | {
49 | return self::$swaggerTypes;
50 | }
51 |
52 | /**
53 | * Array of attributes where the key is the local name, and the value is the original name
54 | * @var string[]
55 | */
56 | protected static $attributeMap = [
57 | 'items' => 'items'
58 | ];
59 |
60 | /**
61 | * Array of attributes to setter functions (for deserialization of responses)
62 | * @var string[]
63 | */
64 | protected static $setters = [
65 | 'items' => 'setItems'
66 | ];
67 |
68 | /**
69 | * Array of attributes to getter functions (for serialization of requests)
70 | * @var string[]
71 | */
72 | protected static $getters = [
73 | 'items' => 'getItems'
74 | ];
75 |
76 | public static function attributeMap()
77 | {
78 | return self::$attributeMap;
79 | }
80 |
81 | public static function setters()
82 | {
83 | return self::$setters;
84 | }
85 |
86 | public static function getters()
87 | {
88 | return self::$getters;
89 | }
90 |
91 |
92 |
93 |
94 |
95 | /**
96 | * Associative array for storing property values
97 | * @var mixed[]
98 | */
99 | protected $container = [];
100 |
101 | /**
102 | * Constructor
103 | * @param mixed[] $data Associated array of property values initializing the model
104 | */
105 | public function __construct(array $data = [])
106 | {
107 | $this->container['items'] = array_key_exists('items', $data) ? $data['items'] : null;
108 | }
109 |
110 | /**
111 | * returns container
112 | * @return array
113 | */
114 | public function get()
115 | {
116 | return $this->container;
117 | }
118 |
119 | /**
120 | * show all the invalid properties with reasons.
121 | *
122 | * @return array invalid properties with reasons
123 | */
124 | public function listInvalidProperties()
125 | {
126 | $invalid_properties = [];
127 | return $invalid_properties;
128 | }
129 |
130 | /**
131 | * validate all the properties in the model
132 | * return true if all passed
133 | *
134 | * @return bool True if all properteis are valid
135 | */
136 | public function valid()
137 | {
138 | return true;
139 | }
140 |
141 |
142 | /**
143 | * Gets items
144 | * @return \BigCommerce\Api\v3\Model\WishlistItem[]
145 | */
146 | public function getItems()
147 | {
148 | return $this->container['items'];
149 | }
150 |
151 | /**
152 | * Sets items
153 | * @param \BigCommerce\Api\v3\Model\WishlistItem[] $items
154 | * @return $this
155 | */
156 | public function setItems($items)
157 | {
158 | $this->container['items'] = $items;
159 |
160 | return $this;
161 | }
162 | /**
163 | * Returns true if offset exists. False otherwise.
164 | * @param integer $offset Offset
165 | * @return boolean
166 | */
167 | public function offsetExists($offset)
168 | {
169 | return isset($this->container[$offset]);
170 | }
171 |
172 | /**
173 | * Gets offset.
174 | * @param integer $offset Offset
175 | * @return mixed
176 | */
177 | public function offsetGet($offset)
178 | {
179 | return isset($this->container[$offset]) ? $this->container[$offset] : null;
180 | }
181 |
182 | /**
183 | * Sets value based on offset.
184 | * @param integer $offset Offset
185 | * @param mixed $value Value to be set
186 | * @return void
187 | */
188 | public function offsetSet($offset, $value)
189 | {
190 | if (is_null($offset)) {
191 | $this->container[] = $value;
192 | } else {
193 | $this->container[$offset] = $value;
194 | }
195 | }
196 |
197 | /**
198 | * Unsets offset.
199 | * @param integer $offset Offset
200 | * @return void
201 | */
202 | public function offsetUnset($offset)
203 | {
204 | unset($this->container[$offset]);
205 | }
206 |
207 | /**
208 | * Gets the string presentation of the object
209 | * @return string
210 | */
211 | public function __toString()
212 | {
213 | if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
214 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
215 | }
216 |
217 | return json_encode(\BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization($this));
218 | }
219 | }
220 |
221 |
222 |
--------------------------------------------------------------------------------
/swagger/abandoned_cart.yaml:
--------------------------------------------------------------------------------
1 | swagger: '2.0'
2 | info:
3 | title: Data Model for BigCommerce's v3 Server-to-Server Abandoned Cart API
4 | version: v0.0.1
5 | host: "api.bigcommerce.com"
6 | basePath: "/stores/{store_id}/v3"
7 | tags:
8 | - name: AbandonedCart
9 | description: BigCommerce Abandoned Cart API Definition.
10 | consumes:
11 | - application/json
12 | produces:
13 | - application/json
14 | paths:
15 | /abandoned-carts/{token}:
16 | get:
17 | description: Returns abandoned cart id.
18 | operationId: recover-cart
19 | parameters:
20 | - name: token
21 | in: path
22 | required: true
23 | type: string
24 | format: UUID
25 | description: Unique token.
26 | tags:
27 | - AbandonedCart
28 | responses:
29 | 200:
30 | description: Returns Abandoned Cart Response Object.
31 | schema:
32 | $ref: "#/definitions/AbandonedCartResponse"
33 | 404:
34 | description: Cart not found.
35 | definitions:
36 | # -------------- common -----------
37 | AbandonedCartResponse:
38 | type: object
39 | properties:
40 | meta:
41 | type: object
42 | description: Empty object.
43 | data:
44 | $ref: "#/definitions/AbandonedCartInfo"
45 | AbandonedCartInfo:
46 | type: object
47 | properties:
48 | cart_id:
49 | type: string
50 | description: Contains cart_id.
51 |
--------------------------------------------------------------------------------
/swagger/templates/model.mustache:
--------------------------------------------------------------------------------
1 | partial_header}}
11 | /**
12 | * NOTE: This class is auto generated by the swagger code generator program.
13 | * https://github.com/swagger-api/swagger-codegen
14 | * Do not edit the class manually.
15 | */
16 |
17 | namespace {{modelPackage}};
18 |
19 | use \ArrayAccess;
20 |
21 | {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
22 |
23 | {{/model}}
24 | {{/models}}
25 |
--------------------------------------------------------------------------------
/swagger/templates/model_enum.mustache:
--------------------------------------------------------------------------------
1 | class {{classname}} {
2 | {{#allowableValues}}{{#enumVars}}const {{{name}}} = {{{value}}};
3 | {{/enumVars}}{{/allowableValues}}
4 |
5 | {{#vars}}{{#isEnum}}
6 | /**
7 | * Gets allowable values of the enum
8 | * @return string[]
9 | */
10 | public function {{getter}}AllowableValues()
11 | {
12 | return [
13 | {{#allowableValues}}{{#enumVars}}self::{{datatypeWithEnum}}_{{{name}}},{{^-last}}
14 | {{/-last}}{{/enumVars}}{{/allowableValues}}
15 | ];
16 | }
17 | {{/isEnum}}{{/vars}}
18 | }
19 |
--------------------------------------------------------------------------------