diff --git a/README.md b/README.md index 23e276ba..6ec7093a 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,10 @@ You can find general information about the Amazon Selling Partner API on [the of # Notes -If you're looking for a complete Repricing & FBA-Reimbursement solution, you might want to consider giving [ClouSale.com](https://www.clousale.com) a shot. \ No newline at end of file +If you're looking for a complete Repricing & FBA-Reimbursement solution, you might want to consider giving [ClouSale.com](https://www.clousale.com) a shot. + +# Thanks + +Thanks go out to everybody who added PRs and worked on this package: + +- [rodrigojob](https://www.github.com/rodrigojob) diff --git a/docs/Api/CatalogApi.md b/docs/Api/CatalogApi.md index 805eadd4..d442bc3b 100644 --- a/docs/Api/CatalogApi.md +++ b/docs/Api/CatalogApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > \Swagger\Client\Models\GetCatalogItemResponse getCatalogItem($marketplace_id, $asin) - Returns a specified item and its attributes. **Usage Plan:** @@ -26,10 +25,17 @@ Returns a specified item and its attributes. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\CatalogApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for the item. $asin = "asin_example"; // string | The Amazon Standard Identification Number (ASIN) of the item. @@ -83,10 +89,17 @@ Returns the parent categories to which an item belongs, based on the specified A setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\CatalogApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for the item. $asin = "asin_example"; // string | The Amazon Standard Identification Number (ASIN) of the item. @@ -142,10 +155,17 @@ Returns a list of items and their attributes, based on a search query or item id setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\CatalogApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for which items are returned. $query = "query_example"; // string | Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. diff --git a/docs/Api/DefaultApi.md b/docs/Api/DefaultApi.md index 180b4a58..56be65fc 100644 --- a/docs/Api/DefaultApi.md +++ b/docs/Api/DefaultApi.md @@ -27,10 +27,17 @@ Returns financial event groups for a given date range. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $max_results_per_page = 100; // int | The maximum number of results to return per page. $financial_event_group_started_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. @@ -88,10 +95,17 @@ Returns financial events for the specified data range. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $max_results_per_page = 100; // int | The maximum number of results to return per page. $posted_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. @@ -149,10 +163,17 @@ Returns all financial events for the specified financial event group. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $event_group_id = "event_group_id_example"; // string | The identifier of the financial event group to which the events belong. $max_results_per_page = 100; // int | The maximum number of results to return per page. @@ -208,10 +229,17 @@ Returns all financial events for the specified order. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An Amazon-defined order identifier, in 3-7-7 format. $max_results_per_page = 100; // int | The maximum number of results to return per page. diff --git a/docs/Api/FbaInboundApi.md b/docs/Api/FbaInboundApi.md index e32d973e..b5126dfd 100644 --- a/docs/Api/FbaInboundApi.md +++ b/docs/Api/FbaInboundApi.md @@ -40,10 +40,17 @@ Returns information needed to confirm a shipment for pre-order. Call this operat setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. $need_by_date = new \DateTime("2013-10-20"); // \DateTime | Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value. @@ -99,10 +106,17 @@ Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -154,10 +168,17 @@ Returns a new inbound shipment based on the specified shipmentId that was return setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\InboundShipmentRequest(); // \Swagger\Client\Models\InboundShipmentRequest | $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -211,10 +232,17 @@ Returns one or more inbound shipment plans, which provide the information you ne setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateInboundShipmentPlanRequest(); // \Swagger\Client\Models\CreateInboundShipmentPlanRequest | @@ -266,10 +294,17 @@ Initiates the process of estimating the shipping cost for an inbound shipment by setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -321,10 +356,17 @@ Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) ship setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -376,10 +418,17 @@ Returns information that lets a seller know if Amazon recommends sending an item setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace where the product would be stored. $seller_sku_list = array("seller_sku_list_example"); // string[] | A list of SellerSKU values. Used to identify items for which you want inbound guidance for shipment to Amazon's fulfillment network. Note: SellerSKU is qualified by the SellerId, which is included with every Selling Partner API operation that you submit. If you specify a SellerSKU that identifies a variation parent ASIN, this operation returns an error. A variation parent ASIN represents a generic product that cannot be sold. Variation child ASINs represent products that have specific characteristics (such as size and color) and can be sold. @@ -435,10 +484,17 @@ Returns package/pallet labels for faster and more accurate shipment processing a setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. $page_type = "page_type_example"; // string | The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error. @@ -500,10 +556,17 @@ Returns pre-order information, including dates, that a seller needs before confi setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace the shipment is tied to. @@ -557,10 +620,17 @@ Returns labeling requirements and item preparation instructions to help prepare setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $ship_to_country_code = "ship_to_country_code_example"; // string | The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country. $seller_sku_list = array("seller_sku_list_example"); // string[] | A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon's fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon's retail website. If you include a seller SKU that you have never used to list an item on Amazon's retail website, the seller SKU is returned in the InvalidSKUList property in the response. @@ -616,10 +686,17 @@ Returns a list of items in a specified inbound shipment, or a list of items that setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $query_type = "query_type_example"; // string | Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request. $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace where the product would be stored. @@ -679,10 +756,17 @@ Returns a list of items in a specified inbound shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier used for selecting items in a specific inbound shipment. $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace where the product would be stored. @@ -736,10 +820,17 @@ Returns a list of inbound shipments based on criteria that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $query_type = "query_type_example"; // string | Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request. $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace where the product would be stored. @@ -803,10 +894,17 @@ Returns current transportation information about an inbound shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -858,10 +956,17 @@ Sends transportation information to Amazon about an inbound shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\PutTransportDetailsRequest(); // \Swagger\Client\Models\PutTransportDetailsRequest | $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -915,10 +1020,17 @@ Adds, updates, or removes items from the inbound shipment identified by the spec setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\InboundShipmentRequest(); // \Swagger\Client\Models\InboundShipmentRequest | $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. @@ -972,10 +1084,17 @@ Cancels a previously-confirmed request to ship an inbound shipment using an Amaz setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | A shipment identifier originally returned by the createInboundShipmentPlan operation. diff --git a/docs/Api/FbaInventoryApi.md b/docs/Api/FbaInventoryApi.md index 344fe9b1..604e19e5 100644 --- a/docs/Api/FbaInventoryApi.md +++ b/docs/Api/FbaInventoryApi.md @@ -24,10 +24,17 @@ Returns a list of inventory summaries. The summaries returned depend on the pres setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FbaInventoryApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $granularity_type = "granularity_type_example"; // string | The granularity type for the inventory aggregation level. $granularity_id = "granularity_id_example"; // string | The granularity ID for the inventory aggregation level. diff --git a/docs/Api/FbaOutboundApi.md b/docs/Api/FbaOutboundApi.md index 2265e820..fbd69b8d 100644 --- a/docs/Api/FbaOutboundApi.md +++ b/docs/Api/FbaOutboundApi.md @@ -32,10 +32,18 @@ Requests that Amazon stop attempting to fulfill the fulfillment order indicated setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_fulfillment_order_id = "seller_fulfillment_order_id_example"; // string | The identifier assigned to the item by the seller when the fulfillment order was created. @@ -87,10 +95,18 @@ Requests that Amazon ship items from the seller's inventory in Amazon's fulfillm setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateFulfillmentOrderRequest(); // \Swagger\Client\Models\CreateFulfillmentOrderRequest | @@ -142,10 +158,18 @@ Creates a fulfillment return. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateFulfillmentReturnRequest(); // \Swagger\Client\Models\CreateFulfillmentReturnRequest | $seller_fulfillment_order_id = "seller_fulfillment_order_id_example"; // string | An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct SellerFulfillmentOrderId value based on the buyer's request to return items. @@ -199,10 +223,18 @@ Returns the fulfillment order indicated by the specified order identifier. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_fulfillment_order_id = "seller_fulfillment_order_id_example"; // string | The identifier assigned to the item by the seller when the fulfillment order was created. @@ -254,10 +286,18 @@ Returns a list of fulfillment order previews based on shipping criteria that you setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetFulfillmentPreviewRequest(); // \Swagger\Client\Models\GetFulfillmentPreviewRequest | @@ -309,10 +349,18 @@ Returns delivery tracking information for a package in an outbound shipment for setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $package_number = 56; // int | The unencrypted package identifier returned by the getFulfillmentOrder operation. @@ -364,10 +412,18 @@ Returns a list of fulfillment orders fulfilled after (or at) a specified date-ti setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $query_start_date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | A date and time used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order. $fulfillment_method = array("fulfillment_method_example"); // string[] | Indicates the intended recipient channel for the order. @@ -423,10 +479,18 @@ Returns a list of return reason codes for a seller SKU in a given marketplace. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_sku = "seller_sku_example"; // string | The seller SKU for which return reason codes are required. $language = "language_example"; // string | The language that the TranslatedDescription property of the ReasonCodeDetails response object should be translated into. @@ -484,10 +548,18 @@ Updates and/or requests shipment for a fulfillment order with an order hold on i setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + + $apiInstance = new Swagger\Client\Api\FbaOutboundApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\UpdateFulfillmentOrderRequest(); // \Swagger\Client\Models\UpdateFulfillmentOrderRequest | $seller_fulfillment_order_id = "seller_fulfillment_order_id_example"; // string | The identifier assigned to the item by the seller when the fulfillment order was created. diff --git a/docs/Api/FeedsApi.md b/docs/Api/FeedsApi.md index 2a18fee7..27749256 100644 --- a/docs/Api/FeedsApi.md +++ b/docs/Api/FeedsApi.md @@ -29,10 +29,17 @@ Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $feed_id = "feed_id_example"; // string | The identifier for the feed. This identifier is unique only in combination with a seller ID. @@ -84,10 +91,17 @@ Creates a feed. Encrypt and upload the contents of the feed document before call setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateFeedSpecification(); // \Swagger\Client\Models\CreateFeedSpecification | @@ -139,10 +153,17 @@ Creates a feed document for the feed type that you specify. This operation retur setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateFeedDocumentSpecification(); // \Swagger\Client\Models\CreateFeedDocumentSpecification | @@ -194,10 +215,17 @@ Returns feed details (including the resultDocumentId, if available) for the feed setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $feed_id = "feed_id_example"; // string | The identifier for the feed. This identifier is unique only in combination with a seller ID. @@ -249,10 +277,17 @@ Returns the information required for retrieving a feed document's contents. This setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $feed_document_id = "feed_document_id_example"; // string | The identifier of the feed document. @@ -304,10 +339,17 @@ Returns feed details for the feeds that match the filters that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeedsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $feed_types = array("feed_types_example"); // string[] | A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. $marketplace_ids = array("marketplace_ids_example"); // string[] | A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. diff --git a/docs/Api/FeesApi.md b/docs/Api/FeesApi.md index a834738b..6c42d4f0 100644 --- a/docs/Api/FeesApi.md +++ b/docs/Api/FeesApi.md @@ -25,10 +25,17 @@ Returns the estimated fees for the item indicated by the specified Asin in the m setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetMyFeesEstimateRequest(); // \Swagger\Client\Models\GetMyFeesEstimateRequest | $asin = "asin_example"; // string | The Amazon Standard Identification Number (ASIN) of the item. @@ -82,10 +89,17 @@ Returns the estimated fees for the item indicated by the specified seller SKU in setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\FeesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetMyFeesEstimateRequest(); // \Swagger\Client\Models\GetMyFeesEstimateRequest | $seller_sku = "seller_sku_example"; // string | Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. diff --git a/docs/Api/MerchantFulfillmentApi.md b/docs/Api/MerchantFulfillmentApi.md index befdcbc3..0eb8beed 100644 --- a/docs/Api/MerchantFulfillmentApi.md +++ b/docs/Api/MerchantFulfillmentApi.md @@ -31,10 +31,17 @@ Cancel the shipment indicated by the specified shipment identifier. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | The Amazon-defined shipment identifier for the shipment to cancel. @@ -86,10 +93,17 @@ Cancel the shipment indicated by the specified shipment identifer. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | The Amazon-defined shipment identifier for the shipment to cancel. @@ -141,10 +155,17 @@ Create a shipment with the information provided. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateShipmentRequest(); // \Swagger\Client\Models\CreateShipmentRequest | @@ -196,10 +217,17 @@ Gets a list of additional seller inputs required for a ship method. This is gene setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetAdditionalSellerInputsRequest(); // \Swagger\Client\Models\GetAdditionalSellerInputsRequest | @@ -251,10 +279,17 @@ Get a list of additional seller inputs required for a ship method. This is gener setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetAdditionalSellerInputsRequest(); // \Swagger\Client\Models\GetAdditionalSellerInputsRequest | @@ -306,10 +341,17 @@ Returns a list of shipping service offers that satisfy the specified shipment re setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetEligibleShipmentServicesRequest(); // \Swagger\Client\Models\GetEligibleShipmentServicesRequest | @@ -361,10 +403,17 @@ Returns a list of shipping service offers that satisfy the specified shipment re setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetEligibleShipmentServicesRequest(); // \Swagger\Client\Models\GetEligibleShipmentServicesRequest | @@ -416,10 +465,17 @@ Returns the shipment information for an existing shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\MerchantFulfillmentApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | The Amazon-defined shipment identifier for the shipment. diff --git a/docs/Api/NotificationsApi.md b/docs/Api/NotificationsApi.md index c3265915..d4e9a21a 100644 --- a/docs/Api/NotificationsApi.md +++ b/docs/Api/NotificationsApi.md @@ -31,10 +31,17 @@ Creates a destination resource to receive notifications. The createDestination A setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateDestinationRequest(); // \Swagger\Client\Models\CreateDestinationRequest | @@ -86,10 +93,17 @@ Creates a subscription for the specified notification type to be delivered to th setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateSubscriptionRequest(); // \Swagger\Client\Models\CreateSubscriptionRequest | $notification_type = "notification_type_example"; // string | The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. @@ -143,10 +157,17 @@ Deletes the destination that you specify. The deleteDestination API is grantless setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $destination_id = "destination_id_example"; // string | The identifier for the destination that you want to delete. @@ -198,10 +219,17 @@ Deletes the subscription indicated by the subscription identifier and notificati setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $subscription_id = "subscription_id_example"; // string | The identifier for the subscription that you want to delete. $notification_type = "notification_type_example"; // string | The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. @@ -255,10 +283,17 @@ Returns information about the destination that you specify. The getDestination A setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $destination_id = "destination_id_example"; // string | The identifier generated when you created the destination. @@ -310,10 +345,17 @@ Returns information about all destinations. The getDestinations API is grantless setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); try { @@ -361,10 +403,17 @@ Returns information about subscriptions of the specified notification type. You setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $notification_type = "notification_type_example"; // string | The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. @@ -416,10 +465,17 @@ Returns information about a subscription for the specified notification type. Th setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\NotificationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $subscription_id = "subscription_id_example"; // string | The identifier for the subscription that you want to get. $notification_type = "notification_type_example"; // string | The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide. diff --git a/docs/Api/OrdersV0Api.md b/docs/Api/OrdersV0Api.md index d33c1ba6..5d5cef6d 100644 --- a/docs/Api/OrdersV0Api.md +++ b/docs/Api/OrdersV0Api.md @@ -28,11 +28,17 @@ Returns the order indicated by the specified order ID. ```php setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An Amazon-defined order identifier, in 3-7-7 format. @@ -84,10 +90,17 @@ Returns the shipping address for the order indicated by the specified order ID. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An orderId is an Amazon-defined order identifier, in 3-7-7 format. @@ -139,10 +152,17 @@ Returns buyer information for the order indicated by the specified order ID. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An orderId is an Amazon-defined order identifier, in 3-7-7 format. @@ -194,10 +214,17 @@ Returns detailed order item information for the order indicated by the specified setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An Amazon-defined order identifier, in 3-7-7 format. $next_token = "next_token_example"; // string | A string token returned in the response of your previous request. @@ -251,10 +278,17 @@ Returns buyer information in the order items of the order indicated by the speci setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $order_id = "order_id_example"; // string | An Amazon-defined order identifier, in 3-7-7 format. $next_token = "next_token_example"; // string | A string token returned in the response of your previous request. @@ -308,10 +342,17 @@ Returns orders created or updated during the time frame indicated by the specifi setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\OrdersV0Api( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_ids = array("marketplace_ids_example"); // string[] | A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. $created_after = "created_after_example"; // string | A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. diff --git a/docs/Api/ProductPricingApi.md b/docs/Api/ProductPricingApi.md index 82a78368..00a55b52 100644 --- a/docs/Api/ProductPricingApi.md +++ b/docs/Api/ProductPricingApi.md @@ -27,10 +27,17 @@ Returns competitive pricing information for a seller's offer listings based on s setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ProductPricingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for which prices are returned. $item_type = "item_type_example"; // string | Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. @@ -88,10 +95,17 @@ Returns the lowest priced offers for a single item based on ASIN. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ProductPricingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for which prices are returned. $item_condition = "item_condition_example"; // string | Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. @@ -147,10 +161,17 @@ Returns the lowest priced offers for a single SKU listing. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ProductPricingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for which prices are returned. $item_condition = "item_condition_example"; // string | Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. @@ -206,10 +227,17 @@ Returns pricing information for a seller's offer listings based on seller SKU or setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ProductPricingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_id = "marketplace_id_example"; // string | A marketplace identifier. Specifies the marketplace for which prices are returned. $item_type = "item_type_example"; // string | Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. diff --git a/docs/Api/ReportsApi.md b/docs/Api/ReportsApi.md index 061800f8..b5eb5f86 100644 --- a/docs/Api/ReportsApi.md +++ b/docs/Api/ReportsApi.md @@ -32,10 +32,17 @@ Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_id = "report_id_example"; // string | The identifier for the report. This identifier is unique only in combination with a seller ID. @@ -87,10 +94,17 @@ Cancels the report schedule that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_schedule_id = "report_schedule_id_example"; // string | The identifier for the report schedule. This identifier is unique only in combination with a seller ID. @@ -142,10 +156,17 @@ Creates a report. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateReportSpecification(); // \Swagger\Client\Models\CreateReportSpecification | @@ -197,10 +218,17 @@ Creates a report schedule. If a report schedule with the same report type and ma setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateReportScheduleSpecification(); // \Swagger\Client\Models\CreateReportScheduleSpecification | @@ -252,10 +280,17 @@ Returns report details (including the reportDocumentId, if available) for the re setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_id = "report_id_example"; // string | The identifier for the report. This identifier is unique only in combination with a seller ID. @@ -307,10 +342,17 @@ Returns the information required for retrieving a report document's contents. Th setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_document_id = "report_document_id_example"; // string | The identifier for the report document. @@ -362,10 +404,17 @@ Returns report schedule details for the report schedule that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_schedule_id = "report_schedule_id_example"; // string | The identifier for the report schedule. This identifier is unique only in combination with a seller ID. @@ -417,10 +466,17 @@ Returns report schedule details that match the filters that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_types = array("report_types_example"); // string[] | A list of report types used to filter report schedules. @@ -472,10 +528,17 @@ Returns report details for the reports that match the filters that you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ReportsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $report_types = array("report_types_example"); // string[] | A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. $processing_statuses = array("processing_statuses_example"); // string[] | A list of processing statuses used to filter reports. diff --git a/docs/Api/SalesApi.md b/docs/Api/SalesApi.md index b764341a..be025b1a 100644 --- a/docs/Api/SalesApi.md +++ b/docs/Api/SalesApi.md @@ -24,10 +24,17 @@ Returns aggregated order metrics for given interval, broken down by granularity, setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SalesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_ids = array("marketplace_ids_example"); // string[] | A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. $interval = "interval_example"; // string | A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. diff --git a/docs/Api/SellersApi.md b/docs/Api/SellersApi.md index 15c7fbe2..6e52eeee 100644 --- a/docs/Api/SellersApi.md +++ b/docs/Api/SellersApi.md @@ -24,10 +24,17 @@ Returns a list of marketplaces that the seller submitting the request can sell i setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SellersApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); try { diff --git a/docs/Api/ServiceApi.md b/docs/Api/ServiceApi.md index 3613cdf0..26edefdd 100644 --- a/docs/Api/ServiceApi.md +++ b/docs/Api/ServiceApi.md @@ -29,10 +29,17 @@ Adds an appointment to the service job indicated by the service job identifier y setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\AddAppointmentRequest(); // \Swagger\Client\Models\AddAppointmentRequest | Add appointment operation input details. $service_job_id = "service_job_id_example"; // string | An Amazon defined service job identifier. @@ -86,10 +93,17 @@ Cancels the service job indicated by the service job identifier you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $service_job_id = "service_job_id_example"; // string | An Amazon defined service job identifier. $cancellation_reason_code = "cancellation_reason_code_example"; // string | A cancel reason code that specifies the reason for cancelling a service job. @@ -143,10 +157,17 @@ Completes the service job indicated by the service job identifier you specify. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $service_job_id = "service_job_id_example"; // string | An Amazon defined service job identifier. @@ -198,10 +219,17 @@ Gets service job details for the service job indicated by the service job identi setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $service_job_id = "service_job_id_example"; // string | A service job identifier. @@ -253,10 +281,17 @@ Gets service job details for the specified filter query. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $marketplace_ids = array("marketplace_ids_example"); // string[] | Used to select jobs that were placed in the specified marketplaces. $service_order_ids = array("service_order_ids_example"); // string[] | List of service order ids for the query you want to perform.Max values supported 20. @@ -332,10 +367,17 @@ Reschedules an appointment for the service job indicated by the service job iden setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ServiceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\RescheduleAppointmentRequest(); // \Swagger\Client\Models\RescheduleAppointmentRequest | Reschedule appointment operation input details. $service_job_id = "service_job_id_example"; // string | An Amazon defined service job identifier. diff --git a/docs/Api/ShippingApi.md b/docs/Api/ShippingApi.md index facda1a0..5d8de6bf 100644 --- a/docs/Api/ShippingApi.md +++ b/docs/Api/ShippingApi.md @@ -32,10 +32,17 @@ Cancel a shipment by the given shipmentId. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | @@ -87,10 +94,17 @@ Create a new shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\CreateShipmentRequest(); // \Swagger\Client\Models\CreateShipmentRequest | @@ -142,10 +156,17 @@ Verify if the current account is valid. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); try { @@ -193,10 +214,17 @@ Get service rates. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\GetRatesRequest(); // \Swagger\Client\Models\GetRatesRequest | @@ -248,10 +276,17 @@ Return the entire shipment object for the shipmentId. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $shipment_id = "shipment_id_example"; // string | @@ -303,10 +338,17 @@ Return the tracking information of a shipment. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $tracking_id = "tracking_id_example"; // string | @@ -358,10 +400,17 @@ Purchase shipping labels based on a given rate. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\PurchaseLabelsRequest(); // \Swagger\Client\Models\PurchaseLabelsRequest | $shipment_id = "shipment_id_example"; // string | @@ -415,10 +464,17 @@ Purchase shipping labels. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\PurchaseShipmentRequest(); // \Swagger\Client\Models\PurchaseShipmentRequest | @@ -470,10 +526,17 @@ Retrieve shipping label based on the shipment id and tracking id. setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\ShippingApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\RetrieveShippingLabelRequest(); // \Swagger\Client\Models\RetrieveShippingLabelRequest | $shipment_id = "shipment_id_example"; // string | diff --git a/docs/Api/SmallAndLightApi.md b/docs/Api/SmallAndLightApi.md index 1808ce67..e255aa52 100644 --- a/docs/Api/SmallAndLightApi.md +++ b/docs/Api/SmallAndLightApi.md @@ -28,10 +28,17 @@ Removes the item indicated by the specified seller SKU from the Small and Light setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SmallAndLightApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_sku = "seller_sku_example"; // string | The seller SKU that identifies the item. $marketplace_ids = array("marketplace_ids_example"); // string[] | The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only. @@ -84,10 +91,17 @@ Returns the Small and Light program eligibility status of the item indicated by setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SmallAndLightApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_sku = "seller_sku_example"; // string | The seller SKU that identifies the item. $marketplace_ids = array("marketplace_ids_example"); // string[] | The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only. @@ -141,10 +155,17 @@ Returns the Small and Light enrollment status for the item indicated by the spec setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SmallAndLightApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_sku = "seller_sku_example"; // string | The seller SKU that identifies the item. $marketplace_ids = array("marketplace_ids_example"); // string[] | The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only. @@ -198,10 +219,17 @@ Returns the Small and Light fee estimates for the specified items. You must incl setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SmallAndLightApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $body = new \Swagger\Client\Models\SmallAndLightFeePreviewRequest(); // \Swagger\Client\Models\SmallAndLightFeePreviewRequest | @@ -253,10 +281,17 @@ Enrolls the item indicated by the specified seller SKU in the Small and Light pr setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SmallAndLightApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $seller_sku = "seller_sku_example"; // string | The seller SKU that identifies the item. $marketplace_ids = array("marketplace_ids_example"); // string[] | The marketplace in which to enroll the item. Note: Accepts a single marketplace only. diff --git a/docs/Api/SolicitationsApi.md b/docs/Api/SolicitationsApi.md index 3eaeee88..f615f54e 100644 --- a/docs/Api/SolicitationsApi.md +++ b/docs/Api/SolicitationsApi.md @@ -25,10 +25,17 @@ Sends a solicitation to a buyer asking for seller feedback and a product review setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SolicitationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $amazon_order_id = "amazon_order_id_example"; // string | An Amazon order identifier. This specifies the order for which a solicitation is sent. $marketplace_ids = array("marketplace_ids_example"); // string[] | A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. @@ -82,10 +89,17 @@ Returns a list of solicitation types that are available for an order that you sp setAccessToken('Atza|IwEBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); //access token of Selling Partner +$config->setApiKey("accessKey", 'AKIA2xxxxxxxxxxxxx'); // Access Key of IAM +$config->setApiKey("secretKey", '94U4Gi81Tpxxxxxxxxxxxxxxx'); // Secret Key of IAM +$config->setApiKey("region", 'us-east-1'); //region of MarketPlace country + $apiInstance = new Swagger\Client\Api\SolicitationsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client() + new GuzzleHttp\Client(), + $config ); $amazon_order_id = "amazon_order_id_example"; // string | An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. $marketplace_ids = array("marketplace_ids_example"); // string[] | A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. diff --git a/lib/Api/CatalogApi.php b/lib/Api/CatalogApi.php index 69641bd1..31673659 100644 --- a/lib/Api/CatalogApi.php +++ b/lib/Api/CatalogApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * CatalogApi Class Doc Comment @@ -395,23 +396,18 @@ protected function getCatalogItemRequest($marketplace_id, $asin) } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, - $httpBody + $headersX ); } @@ -722,19 +718,20 @@ protected function listCatalogCategoriesRequest($marketplace_id, $asin = null, $ } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1096,18 +1093,20 @@ protected function listCatalogItemsRequest($marketplace_id, $query = null, $quer } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/DefaultApi.php b/lib/Api/DefaultApi.php index 80d482d2..a2427bcf 100644 --- a/lib/Api/DefaultApi.php +++ b/lib/Api/DefaultApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * DefaultApi Class Doc Comment @@ -388,19 +389,20 @@ protected function listFinancialEventGroupsRequest($max_results_per_page = '100' } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -711,19 +713,20 @@ protected function listFinancialEventsRequest($max_results_per_page = '100', $po } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1035,19 +1038,20 @@ protected function listFinancialEventsByGroupIdRequest($event_group_id, $max_res } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1359,19 +1363,20 @@ protected function listFinancialEventsByOrderIdRequest($order_id, $max_results_p } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/FbaInboundApi.php b/lib/Api/FbaInboundApi.php index f41cbb30..62b45e02 100644 --- a/lib/Api/FbaInboundApi.php +++ b/lib/Api/FbaInboundApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * FbaInboundApi Class Doc Comment @@ -409,19 +410,20 @@ protected function confirmPreorderRequest($shipment_id, $need_by_date, $marketpl } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -723,19 +725,20 @@ protected function confirmTransportRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1051,19 +1054,20 @@ protected function createInboundShipmentRequest($body, $shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1360,19 +1364,20 @@ protected function createInboundShipmentPlanRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1674,19 +1679,20 @@ protected function estimateTransportRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1988,19 +1994,20 @@ protected function getBillOfLadingRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2322,19 +2329,20 @@ protected function getInboundGuidanceRequest($marketplace_id, $seller_sku_list = } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2696,19 +2704,20 @@ protected function getLabelsRequest($shipment_id, $page_type, $label_type, $numb } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3025,19 +3034,20 @@ protected function getPreorderInfoRequest($shipment_id, $marketplace_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3359,19 +3369,20 @@ protected function getPrepInstructionsRequest($ship_to_country_code, $seller_sku } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3711,19 +3722,20 @@ protected function getShipmentItemsRequest($query_type, $marketplace_id, $last_u } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4040,19 +4052,20 @@ protected function getShipmentItemsByShipmentIdRequest($shipment_id, $marketplac } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4416,19 +4429,20 @@ protected function getShipmentsRequest($query_type, $marketplace_id, $shipment_s } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -4730,19 +4744,20 @@ protected function getTransportDetailsRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -5058,19 +5073,20 @@ protected function putTransportDetailsRequest($body, $shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -5386,19 +5402,20 @@ protected function updateInboundShipmentRequest($body, $shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -5700,19 +5717,20 @@ protected function voidTransportRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/FbaInventoryApi.php b/lib/Api/FbaInventoryApi.php index f93898cb..1d8071ea 100644 --- a/lib/Api/FbaInventoryApi.php +++ b/lib/Api/FbaInventoryApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * FbaInventoryApi Class Doc Comment @@ -439,19 +440,20 @@ protected function getInventorySummariesRequest($granularity_type, $granularity_ } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/FbaOutboundApi.php b/lib/Api/FbaOutboundApi.php index 20e5abb9..749cbd53 100644 --- a/lib/Api/FbaOutboundApi.php +++ b/lib/Api/FbaOutboundApi.php @@ -379,19 +379,20 @@ protected function cancelFulfillmentOrderRequest($seller_fulfillment_order_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -688,19 +689,20 @@ protected function createFulfillmentOrderRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1016,19 +1018,20 @@ protected function createFulfillmentReturnRequest($body, $seller_fulfillment_ord } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1330,19 +1333,20 @@ protected function getFulfillmentOrderRequest($seller_fulfillment_order_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1639,19 +1643,20 @@ protected function getFulfillmentPreviewRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1949,19 +1954,20 @@ protected function getPackageTrackingDetailsRequest($package_number) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2274,19 +2280,20 @@ protected function listAllFulfillmentOrdersRequest($query_start_date_time = null } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2617,19 +2624,20 @@ protected function listReturnReasonCodesRequest($seller_sku, $language, $marketp } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2945,19 +2953,20 @@ protected function updateFulfillmentOrderRequest($body, $seller_fulfillment_orde } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/FeedsApi.php b/lib/Api/FeedsApi.php index 2ec393c8..cd06aa0b 100644 --- a/lib/Api/FeedsApi.php +++ b/lib/Api/FeedsApi.php @@ -15,7 +15,7 @@ * The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner. * * OpenAPI spec version: 2020-09-04 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * FeedsApi Class Doc Comment @@ -241,7 +242,7 @@ public function cancelFeedWithHttpInfo($feed_id) /** * Operation cancelFeedAsync * - * + * * * @param string $feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID. (required) * @@ -261,7 +262,7 @@ function ($response) { /** * Operation cancelFeedAsyncWithHttpInfo * - * + * * * @param string $feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID. (required) * @@ -387,19 +388,20 @@ protected function cancelFeedRequest($feed_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -563,7 +565,7 @@ public function createFeedWithHttpInfo($body) /** * Operation createFeedAsync * - * + * * * @param \Swagger\Client\Models\CreateFeedSpecification $body (required) * @@ -583,7 +585,7 @@ function ($response) { /** * Operation createFeedAsyncWithHttpInfo * - * + * * * @param \Swagger\Client\Models\CreateFeedSpecification $body (required) * @@ -704,19 +706,21 @@ protected function createFeedRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -880,7 +884,7 @@ public function createFeedDocumentWithHttpInfo($body) /** * Operation createFeedDocumentAsync * - * + * * * @param \Swagger\Client\Models\CreateFeedDocumentSpecification $body (required) * @@ -900,7 +904,7 @@ function ($response) { /** * Operation createFeedDocumentAsyncWithHttpInfo * - * + * * * @param \Swagger\Client\Models\CreateFeedDocumentSpecification $body (required) * @@ -1021,19 +1025,20 @@ protected function createFeedDocumentRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1197,7 +1202,7 @@ public function getFeedWithHttpInfo($feed_id) /** * Operation getFeedAsync * - * + * * * @param string $feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID. (required) * @@ -1217,7 +1222,7 @@ function ($response) { /** * Operation getFeedAsyncWithHttpInfo * - * + * * * @param string $feed_id The identifier for the feed. This identifier is unique only in combination with a seller ID. (required) * @@ -1343,19 +1348,20 @@ protected function getFeedRequest($feed_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1519,7 +1525,7 @@ public function getFeedDocumentWithHttpInfo($feed_document_id) /** * Operation getFeedDocumentAsync * - * + * * * @param string $feed_document_id The identifier of the feed document. (required) * @@ -1539,7 +1545,7 @@ function ($response) { /** * Operation getFeedDocumentAsyncWithHttpInfo * - * + * * * @param string $feed_document_id The identifier of the feed document. (required) * @@ -1665,19 +1671,20 @@ protected function getFeedDocumentRequest($feed_document_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1853,7 +1860,7 @@ public function getFeedsWithHttpInfo($feed_types = null, $marketplace_ids = null /** * Operation getFeedsAsync * - * + * * * @param string[] $feed_types A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. (optional) * @param string[] $marketplace_ids A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. (optional) @@ -1879,7 +1886,7 @@ function ($response) { /** * Operation getFeedsAsyncWithHttpInfo * - * + * * * @param string[] $feed_types A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. (optional) * @param string[] $marketplace_ids A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. (optional) @@ -2040,19 +2047,20 @@ protected function getFeedsRequest($feed_types = null, $marketplace_ids = null, } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/FeesApi.php b/lib/Api/FeesApi.php index 350e98de..22cebe49 100644 --- a/lib/Api/FeesApi.php +++ b/lib/Api/FeesApi.php @@ -393,19 +393,20 @@ protected function getMyFeesEstimateForASINRequest($body, $asin) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -722,18 +723,20 @@ protected function getMyFeesEstimateForSKURequest($body, $seller_sku) } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/MerchantFulfillmentApi.php b/lib/Api/MerchantFulfillmentApi.php index cddf7fcf..fb53cc2c 100644 --- a/lib/Api/MerchantFulfillmentApi.php +++ b/lib/Api/MerchantFulfillmentApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * MerchantFulfillmentApi Class Doc Comment @@ -379,19 +380,20 @@ protected function cancelShipmentRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -693,19 +695,20 @@ protected function cancelShipmentOldRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1002,19 +1005,20 @@ protected function createShipmentRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1311,19 +1315,20 @@ protected function getAdditionalSellerInputsRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1620,19 +1625,20 @@ protected function getAdditionalSellerInputsOldRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1929,19 +1935,20 @@ protected function getEligibleShipmentServicesRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2238,19 +2245,20 @@ protected function getEligibleShipmentServicesOldRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2552,19 +2560,20 @@ protected function getShipmentRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/NotificationsApi.php b/lib/Api/NotificationsApi.php index 4d6f9d6e..9f4742b4 100644 --- a/lib/Api/NotificationsApi.php +++ b/lib/Api/NotificationsApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * NotificationsApi Class Doc Comment @@ -390,19 +391,20 @@ protected function createDestinationRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -734,19 +736,20 @@ protected function createSubscriptionRequest($body, $notification_type) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1064,19 +1067,20 @@ protected function deleteDestinationRequest($destination_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1413,19 +1417,20 @@ protected function deleteSubscriptionByIdRequest($subscription_id, $notification } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1743,19 +1748,20 @@ protected function getDestinationRequest($destination_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2054,19 +2060,20 @@ protected function getDestinationsRequest() } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2376,19 +2383,20 @@ protected function getSubscriptionRequest($notification_type) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2725,19 +2733,20 @@ protected function getSubscriptionByIdRequest($subscription_id, $notification_ty } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/OrdersV0Api.php b/lib/Api/OrdersV0Api.php index 021d63c9..9afcc474 100644 --- a/lib/Api/OrdersV0Api.php +++ b/lib/Api/OrdersV0Api.php @@ -15,7 +15,7 @@ * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools. * * OpenAPI spec version: v0 - * + * * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 3.0.20 */ @@ -37,7 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; - +use Swagger\Client\Signature; /** * OrdersV0Api Class Doc Comment * @@ -117,6 +117,7 @@ public function getOrderWithHttpInfo($order_id) try { $options = $this->createHttpClientOption(); + try { $response = $this->client->send($request, $options); } catch (RequestException $e) { @@ -225,7 +226,7 @@ public function getOrderWithHttpInfo($order_id) /** * Operation getOrderAsync * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -245,7 +246,7 @@ function ($response) { /** * Operation getOrderAsyncWithHttpInfo * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -371,19 +372,20 @@ protected function getOrderRequest($order_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -531,7 +533,7 @@ public function getOrderAddressWithHttpInfo($order_id) /** * Operation getOrderAddressAsync * - * + * * * @param string $order_id An orderId is an Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -551,7 +553,7 @@ function ($response) { /** * Operation getOrderAddressAsyncWithHttpInfo * - * + * * * @param string $order_id An orderId is an Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -677,19 +679,20 @@ protected function getOrderAddressRequest($order_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -837,7 +840,7 @@ public function getOrderBuyerInfoWithHttpInfo($order_id) /** * Operation getOrderBuyerInfoAsync * - * + * * * @param string $order_id An orderId is an Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -857,7 +860,7 @@ function ($response) { /** * Operation getOrderBuyerInfoAsyncWithHttpInfo * - * + * * * @param string $order_id An orderId is an Amazon-defined order identifier, in 3-7-7 format. (required) * @@ -983,19 +986,20 @@ protected function getOrderBuyerInfoRequest($order_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1145,7 +1149,7 @@ public function getOrderItemsWithHttpInfo($order_id, $next_token = null) /** * Operation getOrderItemsAsync * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @param string $next_token A string token returned in the response of your previous request. (optional) @@ -1166,7 +1170,7 @@ function ($response) { /** * Operation getOrderItemsAsyncWithHttpInfo * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @param string $next_token A string token returned in the response of your previous request. (optional) @@ -1298,19 +1302,20 @@ protected function getOrderItemsRequest($order_id, $next_token = null) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1460,7 +1465,7 @@ public function getOrderItemsBuyerInfoWithHttpInfo($order_id, $next_token = null /** * Operation getOrderItemsBuyerInfoAsync * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @param string $next_token A string token returned in the response of your previous request. (optional) @@ -1481,7 +1486,7 @@ function ($response) { /** * Operation getOrderItemsBuyerInfoAsyncWithHttpInfo * - * + * * * @param string $order_id An Amazon-defined order identifier, in 3-7-7 format. (required) * @param string $next_token A string token returned in the response of your previous request. (optional) @@ -1613,19 +1618,20 @@ protected function getOrderItemsBuyerInfoRequest($order_id, $next_token = null) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1799,7 +1805,7 @@ public function getOrdersWithHttpInfo($marketplace_ids, $created_after = null, $ /** * Operation getOrdersAsync * - * + * * * @param string[] $marketplace_ids A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. (required) * @param string $created_after A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. (optional) @@ -1832,7 +1838,7 @@ function ($response) { /** * Operation getOrdersAsyncWithHttpInfo * - * + * * * @param string[] $marketplace_ids A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. (required) * @param string $created_after A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format. (optional) @@ -2050,19 +2056,20 @@ protected function getOrdersRequest($marketplace_ids, $created_after = null, $cr } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/ProductPricingApi.php b/lib/Api/ProductPricingApi.php index 8e2caaf0..032543d0 100644 --- a/lib/Api/ProductPricingApi.php +++ b/lib/Api/ProductPricingApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * ProductPricingApi Class Doc Comment @@ -414,19 +415,20 @@ protected function getCompetitivePricingRequest($marketplace_id, $item_type, $as } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -758,19 +760,20 @@ protected function getItemOffersRequest($marketplace_id, $item_condition, $asin) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1102,19 +1105,20 @@ protected function getListingOffersRequest($marketplace_id, $item_condition, $se } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1460,19 +1464,20 @@ protected function getPricingRequest($marketplace_id, $item_type, $asins = null, } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/ReportsApi.php b/lib/Api/ReportsApi.php index 6c2f3550..8d544e77 100644 --- a/lib/Api/ReportsApi.php +++ b/lib/Api/ReportsApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * ReportsApi Class Doc Comment @@ -387,19 +388,20 @@ protected function cancelReportRequest($report_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -709,19 +711,20 @@ protected function cancelReportScheduleRequest($report_schedule_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1026,19 +1029,20 @@ protected function createReportRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1343,19 +1347,20 @@ protected function createReportScheduleRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1665,19 +1670,20 @@ protected function getReportRequest($report_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1987,19 +1993,20 @@ protected function getReportDocumentRequest($report_document_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2309,19 +2316,20 @@ protected function getReportScheduleRequest($report_schedule_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2630,19 +2638,20 @@ protected function getReportSchedulesRequest($report_types) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -3005,19 +3014,20 @@ protected function getReportsRequest($report_types = null, $processing_statuses } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/SalesApi.php b/lib/Api/SalesApi.php index 1d95e72d..22655fbd 100644 --- a/lib/Api/SalesApi.php +++ b/lib/Api/SalesApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * SalesApi Class Doc Comment @@ -470,19 +471,20 @@ protected function getOrderMetricsRequest($marketplace_ids, $interval, $granular } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/SellersApi.php b/lib/Api/SellersApi.php index d770e4b5..96338d3a 100644 --- a/lib/Api/SellersApi.php +++ b/lib/Api/SellersApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * SellersApi Class Doc Comment @@ -368,24 +369,18 @@ protected function getMarketplaceParticipationsRequest() } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, - $httpBody + $headersX ); } diff --git a/lib/Api/ServiceApi.php b/lib/Api/ServiceApi.php index c7a43918..b406145f 100644 --- a/lib/Api/ServiceApi.php +++ b/lib/Api/ServiceApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * ServiceApi Class Doc Comment @@ -409,19 +410,20 @@ protected function addAppointmentForServiceJobByServiceJobIdRequest($body, $serv } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -754,19 +756,20 @@ protected function cancelServiceJobByServiceJobIdRequest($service_job_id, $cance } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1084,19 +1087,20 @@ protected function completeServiceJobByServiceJobIdRequest($service_job_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1414,19 +1418,20 @@ protected function getServiceJobByServiceJobIdRequest($service_job_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1849,19 +1854,20 @@ protected function getServiceJobsRequest($marketplace_ids, $service_order_ids = } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2212,19 +2218,20 @@ protected function rescheduleAppointmentForServiceJobByServiceJobIdRequest($body } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/ShippingApi.php b/lib/Api/ShippingApi.php index f0463af1..01de04e6 100644 --- a/lib/Api/ShippingApi.php +++ b/lib/Api/ShippingApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * ShippingApi Class Doc Comment @@ -379,19 +380,20 @@ protected function cancelShipmentRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -688,19 +690,20 @@ protected function createShipmentRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -983,19 +986,20 @@ protected function getAccountRequest() } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1292,19 +1296,20 @@ protected function getRatesRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1606,19 +1611,20 @@ protected function getShipmentRequest($shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1920,19 +1926,20 @@ protected function getTrackingInformationRequest($tracking_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2248,19 +2255,20 @@ protected function purchaseLabelsRequest($body, $shipment_id) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2557,19 +2565,20 @@ protected function purchaseShipmentRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -2904,19 +2913,20 @@ protected function retrieveShippingLabelRequest($body, $shipment_id, $tracking_i } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/SmallAndLightApi.php b/lib/Api/SmallAndLightApi.php index e2cae8fa..81de2759 100644 --- a/lib/Api/SmallAndLightApi.php +++ b/lib/Api/SmallAndLightApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * SmallAndLightApi Class Doc Comment @@ -368,19 +369,20 @@ protected function deleteSmallAndLightEnrollmentBySellerSKURequest($seller_sku, } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'DELETE', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -708,19 +710,20 @@ protected function getSmallAndLightEligibilityBySellerSKURequest($seller_sku, $m } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1048,19 +1051,20 @@ protected function getSmallAndLightEnrollmentBySellerSKURequest($seller_sku, $ma } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1357,19 +1361,20 @@ protected function getSmallAndLightFeePreviewRequest($body) } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1697,19 +1702,20 @@ protected function putSmallAndLightEnrollmentBySellerSKURequest($seller_sku, $ma } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'PUT', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Api/SolicitationsApi.php b/lib/Api/SolicitationsApi.php index c2a89f46..34dc808e 100644 --- a/lib/Api/SolicitationsApi.php +++ b/lib/Api/SolicitationsApi.php @@ -37,6 +37,7 @@ use Swagger\Client\Configuration; use Swagger\Client\HeaderSelector; use Swagger\Client\ObjectSerializer; +use Swagger\Client\Signature; /** * SolicitationsApi Class Doc Comment @@ -405,19 +406,20 @@ protected function createProductReviewAndSellerFeedbackSolicitationRequest($amaz } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'POST', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -745,19 +747,20 @@ protected function getSolicitationActionsForOrderRequest($amazon_order_id, $mark } } + $query = \GuzzleHttp\Psr7\build_query($queryParams); - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } + $sign = new SignatureSellingPartner(); + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), + 'GET', $resourcePath, $query); $headers = array_merge( - $defaultHeaders, $headerParams, - $headers + $headers, + $headersX ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/lib/Configuration.php b/lib/Configuration.php index 9a6f7e06..051f5282 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -80,7 +80,7 @@ class Configuration * * @var string */ - protected $host = 'https://sellingpartnerapi-na.amazon.com/'; + protected $host = 'https://sellingpartnerapi-na.amazon.com'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default diff --git a/lib/Signature.php b/lib/Signature.php new file mode 100644 index 00000000..bb52fbbf --- /dev/null +++ b/lib/Signature.php @@ -0,0 +1,99 @@ +JSON Hypertext Application Language (HAL) standard. + * + * OpenAPI spec version: v1 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * Swagger Codegen version: 3.0.20 + */ +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + +namespace Swagger\Client; + +/** + * Signature Class Doc Comment + * + * @category Class + * @package Swagger\Client + * @author rodrigojob + */ +class SignatureSellingPartner { + + /** + * calculateSignature data + * + * @param string $accessKey the Selling Partner Access Key + * @param string $secretKey the IAM secret + * @param string $region the region use AWS + * @param string $accessToken the Selling Partner access-token + * @param string $userAgent the user-agent to sign + * @param string $host the host to sign + * @param string $method the method to sign + * @param string $uri the uri to sign + * @param string $queryString the queryString to sign + * @param mixed $data the data to sign + * + * @return array headers signed + */ + public static function calculateSignature($accessKey, $secretKey, $region, $accessToken, $userAgent, $host, $method, $uri = "", $queryString = "", $data = array()){ + $service = 'execute-api'; + $terminationString = 'aws4_request'; + $algorithm = 'AWS4-HMAC-SHA256'; + $amzdate = gmdate('Ymd\THis\Z'); + $date = substr($amzdate, 0, 8); + + $param = json_encode($data); + if ($param == "[]") { + $requestPayload = ""; + } else { + $requestPayload = strtolower($param); + } + $hashedPayload = hash('sha256', $requestPayload); + + $canonical_headers = "host:" . $host . "\n" . "user-agent:" . $userAgent . "\n" . "x-amz-access-token:" . $accessToken . "\n" . "x-amz-date:" . $amzdate . "\n"; + $credential_scope = $date . '/' . $region . '/' . $service . '/' . $terminationString; + $signed_headers = 'host;user-agent;x-amz-access-token;x-amz-date'; + + $canonical_request = $method . "\n" . $uri . "\n" . $queryString . "\n" . $canonical_headers . "\n" . $signed_headers . "\n" . $hashedPayload; + + $stringToSign = $algorithm . "\n" . $amzdate . "\n" . $credential_scope . "\n" . hash('sha256', $canonical_request); + + $kSecret = "AWS4" . $secretKey; + $kDate = hash_hmac('sha256', $date, $kSecret, true); + $kRegion = hash_hmac('sha256', $region, $kDate, true); + $kService = hash_hmac('sha256', $service, $kRegion, true); + $kSigning = hash_hmac('sha256', $terminationString, $kService, true); + + $signature = trim(hash_hmac('sha256', $stringToSign, $kSigning)); // Without fourth parameter passed as true, returns lowercase hexits as called for by docs + + $authorization_header = $algorithm . " Credential={$accessKey}/{$credential_scope}, SignedHeaders={$signed_headers}, Signature={$signature}"; + + $headers = array( + "host" => $host, + "Authorization" => $authorization_header, + "user-agent" => $userAgent, + "x-amz-access-token" => $accessToken, + "x-amz-date" => $amzdate + ); + + return $headers; + } + +}