def get_order_items(self, order_id: str, **kwargs) -> ApiResponse:
        """
        get_order_items(self, order_id: str, **kwargs) -> ApiResponse

        Returns detailed order item information for the order indicated by the specified order ID.
        If NextToken is provided, it's used to retrieve the next page of order items.

        Note: When an order is in the Pending state (the order has been placed but payment has not been authorized),
        the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or
        promotions for the order items in the order.
        After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped,
        Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes,
        shipping charges, gift status and promotions for the order items in the order.


        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       1
        ======================================  ==============



        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Examples:
            literal blocks::

                Orders().get_order_items('TEST_CASE_200')

        Args:
            order_id: str
            key RestrictedResources: [str]
            **kwargs:

        Returns:
            ApiResponse:

        """
        if 'RestrictedResources' in kwargs:
            kwargs.update({
                'original_path':
                fill_query_params(kwargs.get('path'), order_id)
            })
            return self._access_restricted(kwargs)
        return self._request(fill_query_params(kwargs.pop('path'), order_id),
                             params={**kwargs})
Exemple #2
0
    def complete_service_job_by_service_job_id(self, serviceJobId,
                                               **kwargs) -> ApiResponse:
        """
        complete_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse

        Completes the service job indicated by the service job identifier you specify.

        **Usage Plan:**


        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        5                                       20
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            serviceJobId:string | * REQUIRED An Amazon defined service job identifier.

        Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               serviceJobId),
                             data=kwargs)
Exemple #3
0
    def post_content_document_suspend_submission(self, contentReferenceKey,
                                                 **kwargs) -> ApiResponse:
        """
        post_content_document_suspend_submission(self, contentReferenceKey, **kwargs) -> ApiResponse

        Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 10 | 10 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
        
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
        

         Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             data=kwargs)
Exemple #4
0
    def update_content_document(self, contentReferenceKey,
                                **kwargs) -> ApiResponse:
        """
        update_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse

        Updates an existing A+ Content document.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 10 | 10 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
        
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
        
            postContentDocumentRequest: | * REQUIRED {'properties': {'contentDocument': {'$ref': '#/definitions/ContentDocument'}}, 'required': ['contentDocument'], 'type': 'object'}
        

         Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             data=kwargs)
    def delete_report_schedule(self, schedule_id, **kwargs) -> ApiResponse:
        """
        delete_report_schedule(self, schedule_id, **kwargs) -> ApiResponse
        Cancels the report schedule that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0222                                  10
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            schedule_id: str
            kwargs:

        Returns:
            ApiResponse
        """
        return self._request(fill_query_params(kwargs.pop('path'),
                                               schedule_id),
                             params=kwargs)
Exemple #6
0
    def list_content_document_asin_relations(self, contentReferenceKey,
                                             **kwargs) -> ApiResponse:
        """
        list_content_document_asin_relations(self, contentReferenceKey, **kwargs) -> ApiResponse

        Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document.


        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        10                                      10
        ======================================  ==============

        The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
            key includedDataSet:array |  The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.
            key asinSet:array |  The set of ASINs.
            key pageToken:string |  A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

        Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             params=kwargs)
Exemple #7
0
    def get_feature_inventory(self, featureName, **kwargs) -> ApiResponse:
        """
        get_feature_inventory(self, featureName, **kwargs) -> ApiResponse

        Returns a list of inventory items that are eligible for the fulfillment feature you specify.

**Usage Plan:**

| Rate (requests per second) | Burst |
| ---- | ---- |
| 2 | 30 |

For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            key marketplaceId:string | * REQUIRED The marketplace for which to return a list of the inventory that is eligible for the specified feature.
        
            featureName:string | * REQUIRED The name of the feature for which to return a list of eligible inventory.
        
            key nextToken:string |  A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
        

         Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), featureName), params=kwargs)
Exemple #8
0
    def create_product_review_and_seller_feedback_solicitation(self, amazonOrderId, **kwargs) -> ApiResponse:
        """
        create_product_review_and_seller_feedback_solicitation(self, amazonOrderId, **kwargs) -> ApiResponse

        Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       5
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            amazonOrderId:string | * REQUIRED An Amazon order identifier. This specifies the order for which a solicitation is sent.
            key marketplaceIds:array | * REQUIRED A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.

        Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), amazonOrderId), params=kwargs)
    def get_order_address(self, order_id, **kwargs):
        """
        Returns the shipping address for the order indicated by the specified order ID.

        :note: To get useful information from this method, you need to have access to PII.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       1
        ======================================  ==============


        Args:
            order_id: str
            **kwargs:

        Returns:

        """
        return GetOrderAddressResponse(**self._request(
            fill_query_params(kwargs.pop('path'), order_id), params={
                **kwargs
            }).json())
    def get_feed_result_document(self, feed_id, **kwargs) -> str:
        """
        Returns the decrypted, unpacked FeedResponse

         **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0222                                  10
        ======================================  ==============


        Args:
            feed_id: str
            **kwargs:

        Returns:
            str: The feed results' contents
        """
        response = GetFeedDocumentResponse(
            **self._request(fill_query_params(kwargs.pop('path'), feed_id),
                            params=kwargs,
                            add_marketplace=False).json())
        url = response.payload.get('url')
        decrypted = decrypt_aes(
            requests.get(url).content,
            response.payload.get('encryptionDetails').get('key'),
            response.payload.get('encryptionDetails').get(
                'initializationVector'))

        if 'compressionAlgorithm' in response.payload:
            return zlib.decompress(bytearray(decrypted),
                                   15 + 32).decode('iso-8859-1')
        return decrypted.decode('iso-8859-1')
    def get_feed(self, feed_id: str, **kwargs) -> GetFeedResponse:
        """
        get_feed(self, feed_id: str, **kwargs) -> GetFeedResponse
        Returns feed details (including the resultDocumentId, if available) for the feed that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        2                                       15
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            feed_id: str
            **kwargs:

        Returns:
            GetFeedResponse:
        """
        return GetFeedResponse(
            **self._request(fill_query_params(kwargs.pop('path'), feed_id),
                            params=kwargs,
                            add_marketplace=False).json())
    def get_item_offers(self,
                        asin: str,
                        item_condition: str,
                        customer_type: str = None,
                        **kwargs) -> ApiResponse:
        """
        get_item_offers(self, asin: str, **kwargs) -> ApiResponse
        Returns the lowest priced offers for a single item based on ASIN

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        5                                       10
        ======================================  ==============

        Args:
            key MarketplaceId: Required (query) str
            item_condition: Required (query) str | ("New", "Used", "Collectible", "Refurbished", "Club") Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. Available values : New, Used, Collectible, Refurbished, Club
            asin: Required (path) str
            customer_type: Optional (query) str ("Consumer" or "Business") Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.


        Returns:
            ApiResponse

        """
        kwargs['ItemCondition'] = item_condition

        if customer_type is not None:
            kwargs['CustomerType'] = customer_type

        return self._request(fill_query_params(kwargs.pop('path'), asin),
                             params={**kwargs})
Exemple #13
0
    def get_catalog_item(self, asin, **kwargs) -> ApiResponse:
        """
        get_catalog_item(self, asin, **kwargs) -> ApiResponse

        Retrieves details for an item in the Amazon catalog.


        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        5                                       5
        ======================================  ==============

        The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            asin:string | * REQUIRED The Amazon Standard Identification Number (ASIN) of the item.
            key marketplaceIds:array | * REQUIRED A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
            key includedData:array |  A comma-delimited list of data sets to include in the response. Default: summaries.
            key locale:string |  Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.

        Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), asin), params=kwargs)
Exemple #14
0
    def get_order_items(self, order_id, **kwargs):
        """
        Returns detailed order item information for the order indicated by the specified order ID.
        If NextToken is provided, it's used to retrieve the next page of order items.

        Note: When an order is in the Pending state (the order has been placed but payment has not been authorized),
        the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or
        promotions for the order items in the order.
        After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped,
        Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes,
        shipping charges, gift status and promotions for the order items in the order.

        **Usage Plan:**

        | Rate (requests per second) | Burst |
        | ---- | ---- |
        | 1 | 1 |

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
        :param order_id:
        :param kwargs:
        :return:
        """
        return GetOrderItemsResponse(**self._request(
            fill_query_params(kwargs.pop('path'), order_id), params={
                **kwargs
            }).json())
    def submit_inventory_update(self, warehouseId, **kwargs) -> ApiResponse:
        """
        submit_inventory_update(self, warehouseId, **kwargs) -> ApiResponse

        Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 10 | 10 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            body: | * REQUIRED {'description': 'The request body for the submitInventoryUpdate operation.',
 'properties': {'inventory': {'$ref': '#/definitions/InventoryUpdate', 'description': 'Inventory details required to update some or all items for the requested warehouse.'}},
 'type': 'object'}
        
            warehouseId:string | * REQUIRED Identifier for the warehouse for which to update inventory.
        

         Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               warehouseId),
                             data=kwargs)
Exemple #16
0
    def get_report_document(self,
                            reportDocumentId,
                            download: bool = False,
                            file=None,
                            character_code: str = 'iso-8859-1',
                            **kwargs) -> ApiResponse:
        """
        get_report_document(self, document_id, decrypt: bool = False, file=None, character_code: str = 'iso-8859-1', ** kwargs) -> ApiResponse
        Returns the information required for retrieving a report document's contents. This includes a presigned URL for the report document as well as the information required to decrypt the document's contents.

        If decrypt = True the report will automatically be loaded and decrypted/unpacked
        If file is set to a file (or file like object), the report's contents are written to the file


        **Usage Plan:**


        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0167                                  15
        ======================================  ==============



        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Examples:
            literal blocks::

                Reports().get_report_document('0356cf79-b8b0-4226-b4b9-0ee058ea5760', download=True, file=file)

        Args:
            reportDocumentId: str | the document to load
            download: bool | flag to automatically download a report
            file: If passed, will save the document to the file specified. Only valid if decrypt=True
            character_code: If passed, will be a file with the specified character code.  The default is 'iso-8859-1'. Only valid if decrypt=True

        Returns:
             ApiResponse
        """
        res = self._request(fill_query_params(kwargs.pop('path'),
                                              reportDocumentId),
                            add_marketplace=False)
        if download or file or ('decrypt' in kwargs and kwargs['decrypt']):
            document = requests.get(res.payload.get('url')).content
            if 'compressionAlgorithm' in res.payload:
                document = zlib.decompress(bytearray(document), 15 + 32)
            document = document.decode(character_code)
            if download:
                res.payload.update({'document': document})
            if file:
                if isinstance(file, str):
                    with open(file, "w+",
                              encoding=character_code) as text_file:
                        text_file.write(document)
                else:
                    file.write(document)
                    file.seek(0)
        return res
Exemple #17
0
    def get_solicitation_actions_for_order(self, amazonOrderId, **kwargs) -> ApiResponse:
        """
        get_solicitation_actions_for_order(self, amazonOrderId, **kwargs) -> ApiResponse

        Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       5
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            amazonOrderId:string | * REQUIRED An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.
            key marketplaceIds:array | * REQUIRED A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.

        Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), amazonOrderId), params=kwargs)
    def get_order_buyer_info(self, order_id: str,
                             **kwargs) -> GetOrderBuyerInfoResponse:
        """
        get_order_buyer_info(self, order_id: str, **kwargs) -> GetOrderBuyerInfoResponse
        Returns buyer information for the order indicated by the specified order ID.

        :note: To get useful information from this method, you need to have access to PII.


        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       1
        ======================================  ==============


        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            order_id: str
            **kwargs:

        Returns:
            GetOrderBuyerInfoResponse:

        """
        return GetOrderBuyerInfoResponse(**self._request(
            fill_query_params(kwargs.pop('path'), order_id), params={
                **kwargs
            }).json())
Exemple #19
0
    def create_fulfillment_return(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse:
        """
        create_fulfillment_return(self, sellerFulfillmentOrderId, **kwargs) -> ApiResponse

        Creates a fulfillment return. 

**Usage Plan:**

| Rate (requests per second) | Burst |
| ---- | ---- |
| 2 | 30 |

For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            body: | * REQUIRED {'description': 'The createFulfillmentReturn operation creates a fulfillment return for items that were fulfilled using the createFulfillmentOrder operation. For calls to createFulfillmentReturn, you must include ReturnReasonCode values returned by '
                'a previous call to the listReturnReasonCodes operation.',
 'properties': {'items': {'$ref': '#/definitions/CreateReturnItemList'}},
 'required': ['items'],
 'type': 'object'}
        
            sellerFulfillmentOrderId:string | * REQUIRED 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.
        

         Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), sellerFulfillmentOrderId), data=kwargs)
    def get_order_items_buyer_info(self, order_id: str,
                                   **kwargs) -> GetOrderItemsBuyerInfoResponse:
        """
        get_order_items_buyer_info(self, order_id: str, **kwargs) -> GetOrderItemsBuyerInfoResponse

        Returns buyer information in the order items of the order indicated by the specified order ID.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       1
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            order_id: str
            key NextToken: str | retrieve data by next token

        Returns:
            GetOrderItemsBuyerInfoResponse
        """
        return GetOrderItemsBuyerInfoResponse(
            **self._request(fill_query_params(kwargs.pop('path'), order_id),
                            params=kwargs).json())
Exemple #21
0
    def get_feature_s_k_u(self, featureName, **kwargs) -> ApiResponse:
        """
        get_feature_s_k_u(self, featureName, **kwargs) -> ApiResponse

        Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn't eligible, the response will contain an empty skuInfo object.

**Usage Plan:**

| Rate (requests per second) | Burst |
| ---- | ---- |
| 2 | 30 |

For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            key marketplaceId:string | * REQUIRED The marketplace for which to return the count.
        
            featureName:string | * REQUIRED The name of the feature.
        
            sellerSku:string | * REQUIRED 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.
        

         Returns:
            ApiResponse:
        """
    
        return self._request(fill_query_params(kwargs.pop('path'), featureName), params=kwargs)
    def get_order(self, order_id: str, **kwargs) -> GetOrderResponse:
        """
        get_order(self, order_id: str, **kwargs) -> GetOrderResponse
        Returns the order indicated by the specified order ID.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        1                                       1
        ======================================  ==============


        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            order_id: str
            **kwargs:

        Returns:
            GetOrderResponse:


        """
        return GetOrderResponse(
            **self._request(fill_query_params(kwargs.pop('path'), order_id),
                            params={
                                **kwargs
                            },
                            add_marketplace=False).json())
Exemple #23
0
    def post_content_document_approval_submission(self, contentReferenceKey,
                                                  **kwargs) -> ApiResponse:
        """
        post_content_document_approval_submission(self, contentReferenceKey, **kwargs) -> ApiResponse

        Submits an A+ Content document for review, approval, and publishing.


        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        10                                       10
        ======================================  ==============

        The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.

        Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             data=kwargs)
Exemple #24
0
    def cancel_report(self, reportId, **kwargs) -> ApiResponse:
        """
        cancel_report(self, reportId, **kwargs) -> ApiResponse

        Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0022                                  10
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            reportId:string | * REQUIRED The identifier for the report. This identifier is unique only in combination with a seller ID.

        Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'), reportId),
                             data=kwargs)
    def get_report(self, report_id, **kwargs) -> ApiResponse:
        """
        get_report(self, report_id, **kwargs)
        Returns report details (including the reportDocumentId, if available) for the report that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        2                                       15
        ======================================  ==============


        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Args:
            report_id: str

        Returns:
            ApiResponse

        """
        return self._request(fill_query_params(kwargs.pop('path'), report_id),
                             add_marketplace=False)
Exemple #26
0
    def get_report(self, reportId, **kwargs) -> ApiResponse:
        """
        get_report(self, report_id, **kwargs)
        Returns report details (including the reportDocumentId, if available) for the report that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        2                                       15
        ======================================  ==============


        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Examples:
            literal blocks::

                Reports().get_report('ID323')

        Args:
            reportId: str

        Returns:
            ApiResponse

        """

        return self._request(fill_query_params(kwargs.pop('path'), reportId),
                             params=kwargs)
Exemple #27
0
    def post_content_document_asin_relations(self, contentReferenceKey,
                                             **kwargs) -> ApiResponse:
        """
        post_content_document_asin_relations(self, contentReferenceKey, **kwargs) -> ApiResponse

        Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 10 | 10 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.
        
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
        
            postContentDocumentAsinRelationsRequest: | * REQUIRED {'properties': {'asinSet': {'$ref': '#/definitions/AsinSet'}}, 'required': ['asinSet'], 'type': 'object'}
        

         Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             data=kwargs)
Exemple #28
0
    def cancel_report_schedule(self, reportScheduleId,
                               **kwargs) -> ApiResponse:
        """
        cancel_report_schedule(self, reportScheduleId, **kwargs) -> ApiResponse

        Cancels the report schedule that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0222                                  10
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Examples:
            literal blocks::

                Reports().cancel_report_schedule('ID')

        Args:
            reportScheduleId: str
            kwargs:

        Returns:
            ApiResponse
        """
        return self._request(fill_query_params(kwargs.pop('path'),
                                               reportScheduleId),
                             data=kwargs)
Exemple #29
0
    def get_content_document(self, contentReferenceKey,
                             **kwargs) -> ApiResponse:
        """
        get_content_document(self, contentReferenceKey, **kwargs) -> ApiResponse

        Returns an A+ Content document, if available.

**Usage Plans:**

| Plan type | Rate (requests per second) | Burst |
| ---- | ---- | ---- |
|Default| 10 | 10 |
|Selling partner specific| Variable | Variable |

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

         Args:
        
            contentReferenceKey:string | * REQUIRED The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.
        
            key marketplaceId:string | * REQUIRED The identifier for the marketplace where the A+ Content is published.
        
            key includedDataSet:array | * REQUIRED The set of A+ Content data types to include in the response.
        

         Returns:
            ApiResponse:
        """

        return self._request(fill_query_params(kwargs.pop('path'),
                                               contentReferenceKey),
                             params=kwargs)
Exemple #30
0
    def get_report_schedule(self, reportScheduleId, **kwargs) -> ApiResponse:
        """
        get_report_schedule(self, reportScheduleId, **kwargs) -> ApiResponse

        Returns report schedule details for the report schedule that you specify.

        **Usage Plan:**

        ======================================  ==============
        Rate (requests per second)               Burst
        ======================================  ==============
        0.0222                                  10
        ======================================  ==============

        For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

        Examples:
            literal blocks::

                Reports().get_report_schedule('ID323')

        Args:
            reportScheduleId: str | required The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
            kwargs:

        Returns:
            ApiResponse
        """
        return self._request(fill_query_params(kwargs.pop('path'),
                                               reportScheduleId),
                             params=kwargs)