<?php

namespace Tops\AmazonSellingPartnerAPI\Api;

class MessagingApi extends BaseApi
{
    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function getMessagingActionsForOrder($params, $amazon_order_id)
    {
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling getMessagingActionsForOrder');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling getMessagingActionsForOrder');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function confirmCustomizationDetails($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling confirmCustomizationDetails');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling confirmCustomizationDetails');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling confirmCustomizationDetails');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/confirmCustomizationDetails';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createConfirmDeliveryDetails($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createConfirmDeliveryDetails');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createConfirmDeliveryDetails');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createConfirmDeliveryDetails');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/confirmDeliveryDetails';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createLegalDisclosure($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createLegalDisclosure');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createLegalDisclosure');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createLegalDisclosure');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createNegativeFeedbackRemoval($params, $amazon_order_id)
    {
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createNegativeFeedbackRemoval');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createNegativeFeedbackRemoval');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/negativeFeedbackRemoval';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createConfirmOrderDetails($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createConfirmOrderDetails');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createConfirmOrderDetails');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createConfirmOrderDetails');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/confirmOrderDetails';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createConfirmServiceDetails($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createConfirmServiceDetails');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createConfirmServiceDetails');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createConfirmServiceDetails');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/confirmServiceDetails';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function CreateAmazonMotors($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling CreateAmazonMotors');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling CreateAmazonMotors');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling CreateAmazonMotors');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/amazonMotors';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function CreateWarranty($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling CreateWarranty');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling CreateWarranty');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling CreateWarranty');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/warranty';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function GetAttributes($params, $amazon_order_id)
    {
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling GetAttributes');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling GetAttributes');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/attributes';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createDigitalAccessKey($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createDigitalAccessKey');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createDigitalAccessKey');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createDigitalAccessKey');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/digitalAccessKey';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function createUnexpectedProblem($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createUnexpectedProblem');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling createUnexpectedProblem');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling createUnexpectedProblem');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/unexpectedProblem';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }

    /**
     * Operation List Catalog Items
     *
     * @param array $params
     * @param string $params['MarketplaceId'] A marketplace identifier. Specifies the marketplace for which items are returned. (required)
     * @param string $params['Query'] Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'.
     * @param string $params['QueryContextId'] An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items.
     * @param string $params['SellerSKU'] 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.
     * @param string $params['UPC'] A 12-digit bar code used for retail packaging.
     * @param string $params['EAN'] A European article number that uniquely identifies the catalog item, manufacturer, and its attributes.
     * @param string $params['ISBN'] The unique commercial book identifier used to identify books internationally.
     * @param string $params['JAN'] A Japanese article number that uniquely identifies the product, manufacturer, and its attributes.
     * @return json\
     *
     * @author Chetan Meena <chetan@topsinfosolutions.com>
     *
     * about more Ref: https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md#listcatalogitems
     */
    public function sendInvoice($body, $params, $amazon_order_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling sendInvoice');
        }
        if (null === $amazon_order_id) {
            throw new \InvalidArgumentException('Missing the required parameter $amazon_order_id when calling sendInvoice');
        }
        if (!array_key_exists('marketplaceIds', $params) ||  null === $params['marketplaceIds']) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplaceIds when calling sendInvoice');
        }

        $resource_path = '/messaging/v1/orders/{amazonOrderId}/messages/invoice';
        $url = $this->config->getHost() . $resource_path;
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        // path params
        if (null !== $amazon_order_id) {
            $resource_path = str_replace(
                '{' . 'amazonOrderId' . '}',
                $amazon_order_id,
                $resource_path
            );
        }
        // query params
        if (array_key_exists('marketplaceIds', $params) && $params['marketplaceIds'] !== null) {
            $query_params['marketplaceIds'] = $params['marketplaceIds'];
        }

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }
}
