<?php

namespace Tops\AmazonSellingPartnerAPI\Api;

class FulfillmentInboundApi 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 getInboundGuidance($params)
    {
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling getInboundGuidance');
        }

        $resource_path = '/fba/inbound/v0/itemsGuidance';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // query params
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }
        if (array_key_exists('SellerSKUList', $params) && $params['SellerSKUList'] !== null) {
            $query_params['SellerSKUList'] = $params['SellerSKUList'];
        }
        if (array_key_exists('ASINList', $params) && $params['ASINList'] !== null) {
            $query_params['ASINList'] = $params['ASINList'];
        }

        $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 createInboundShipmentPlan($body)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createInboundShipmentPlan');
        }

        $resource_path = '/fba/inbound/v0/plans';
        $http_body = $body;
        $query_params = [];
        $method = 'POST';
        
        $url = $this->config->getHost() . $resource_path;

        $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 updateInboundShipment($body, $shipment_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling updateInboundShipment');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getReportSchedule');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}';
        $http_body = $body;
        $query_params = [];
        $method = 'PUT';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 createInboundShipment($body, $shipment_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling createInboundShipment');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling createInboundShipment');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}';
        $http_body = $body;
        $query_params = [];
        $method = 'POST';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 getPreorderInfo($params, $shipment_id)
    {
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling getPreorderInfo');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getPreorderInfo');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/preorder';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        // query params
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }

        $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 confirmPreorder($params, $shipment_id)
    {
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling confirmPreorder');
        }
        if (!array_key_exists('NeedByDate', $params) ||  null === $params['NeedByDate']) {
            throw new \InvalidArgumentException('Missing the required parameter $NeedByDate when calling confirmPreorder');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling confirmPreorder');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'PUT';

        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        // query params
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }
        if (array_key_exists('NeedByDate', $params) && $params['NeedByDate'] !== null) {
            $query_params['NeedByDate'] = $params['NeedByDate'];
        }

        $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 getPrepInstructions($params)
    {
        if (!array_key_exists('ShipToCountryCode', $params) ||  null === $params['ShipToCountryCode']) {
            throw new \InvalidArgumentException('Missing the required parameter $ShipToCountryCode when calling getPrepInstructions');
        }

        $resource_path = '/fba/inbound/v0/prepInstructions';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // query params
        if (array_key_exists('ShipToCountryCode', $params) && $params['ShipToCountryCode'] !== null) {
            $query_params['ShipToCountryCode'] = $params['ShipToCountryCode'];
        }
        if (array_key_exists('SellerSKUList', $params) && $params['SellerSKUList'] !== null) {
            $query_params['SellerSKUList'] = $params['SellerSKUList'];
        }
        if (array_key_exists('ASINList', $params) && $params['ASINList'] !== null) {
            $query_params['ASINList'] = $params['ASINList'];
        }

        $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 getTransportDetails($shipment_id)
    {
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getTransportDetails');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/transport';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $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 putTransportDetails($body, $shipment_id)
    {
        if (null === $body) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling putTransportDetails');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling putTransportDetails');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/transport';
        $http_body = $body;
        $query_params = [];
        $method = 'PUT';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 voidTransport($shipment_id)
    {
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling voidTransport');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/transport/void';
        $http_body = '';
        $query_params = [];
        $method = 'POST';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 estimateTransport($shipment_id)
    {
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling estimateTransport');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/transport/estimate';
        $http_body = '';
        $query_params = [];
        $method = 'POST';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 confirmTransport($shipment_id)
    {
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling confirmTransport');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/transport/confirm';
        $http_body = '';
        $query_params = [];
        $method = 'POST';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 getLabels($params, $shipment_id)
    {
        if (!array_key_exists('PageType', $params) ||  null === $params['PageType']) {
            throw new \InvalidArgumentException('Missing the required parameter $PageType when calling getLabels');
        }
        if (!array_key_exists('LabelType', $params) ||  null === $params['LabelType']) {
            throw new \InvalidArgumentException('Missing the required parameter $LabelType when calling getLabels');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getLabels');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/labels';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        // query params
        if (array_key_exists('PageType', $params) && $params['PageType'] !== null) {
            $query_params['PageType'] = $params['PageType'];
        }
        if (array_key_exists('LabelType', $params) && $params['LabelType'] !== null) {
            $query_params['LabelType'] = $params['LabelType'];
        }
        if (array_key_exists('NumberOfPackages', $params) && $params['NumberOfPackages'] !== null) {
            $query_params['NumberOfPackages'] = $params['NumberOfPackages'];
        }
        if (array_key_exists('PackageLabelsToPrint', $params) && $params['PackageLabelsToPrint'] !== null) {
            $query_params['PackageLabelsToPrint'] = $params['PackageLabelsToPrint'];
        }
        if (array_key_exists('NumberOfPallets', $params) && $params['NumberOfPallets'] !== null) {
            $query_params['NumberOfPallets'] = $params['NumberOfPallets'];
        }
        if (array_key_exists('PageSize', $params) && $params['PageSize'] !== null) {
            $query_params['PageSize'] = $params['PageSize'];
        }
        if (array_key_exists('PageStartIndex', $params) && $params['PageStartIndex'] !== null) {
            $query_params['PageStartIndex'] = $params['PageStartIndex'];
        }

        $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 getBillOfLading($shipment_id)
    {
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getBillOfLading');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/billOfLading';
        $http_body = '';
        $query_params = [];
        $method = 'GET';
        
        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        $url = $this->config->getHost() . $resource_path;

        $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 getShipments($params)
    {
        if (!array_key_exists('QueryType', $params) ||  null === $params['QueryType']) {
            throw new \InvalidArgumentException('Missing the required parameter $QueryType when calling getShipments');
        }
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling getShipments');
        }

        $resource_path = '/fba/inbound/v0/shipments';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // query params
        if (array_key_exists('ShipmentStatusList', $params) && $params['ShipmentStatusList'] !== null) {
            $query_params['ShipmentStatusList'] = $params['ShipmentStatusList'];
        }
        if (array_key_exists('ShipmentIdList', $params) && $params['ShipmentIdList'] !== null) {
            $query_params['ShipmentIdList'] = $params['ShipmentIdList'];
        }
        if (array_key_exists('LastUpdatedAfter', $params) && $params['LastUpdatedAfter'] !== null) {
            $query_params['LastUpdatedAfter'] = $params['LastUpdatedAfter'];
        }
        if (array_key_exists('LastUpdatedBefore', $params) && $params['LastUpdatedBefore'] !== null) {
            $query_params['LastUpdatedBefore'] = $params['LastUpdatedBefore'];
        }
        if (array_key_exists('QueryType', $params) && $params['QueryType'] !== null) {
            $query_params['QueryType'] = $params['QueryType'];
        }
        if (array_key_exists('NextToken', $params) && $params['NextToken'] !== null) {
            $query_params['NextToken'] = $params['NextToken'];
        }
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }

        $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 getShipmentItemsByShipmentId($params, $shipment_id)
    {
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling getShipmentItemsByShipmentId');
        }
        if (null === $shipment_id) {
            throw new \InvalidArgumentException('Missing the required parameter $shipment_id when calling getShipmentItemsByShipmentId');
        }

        $resource_path = '/fba/inbound/v0/shipments/{shipmentId}/items';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // path params
        if (null !== $shipment_id) {
            $resource_path = str_replace(
                '{' . 'shipmentId' . '}',
                $shipment_id,
                $resource_path
            );
        }

        // query params
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }

        $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 getShipmentItems($params)
    {
        if (!array_key_exists('QueryType', $params) ||  null === $params['QueryType']) {
            throw new \InvalidArgumentException('Missing the required parameter $QueryType when calling getShipmentItems');
        }
        if (!array_key_exists('MarketplaceId', $params) ||  null === $params['MarketplaceId']) {
            throw new \InvalidArgumentException('Missing the required parameter $MarketplaceId when calling getShipmentItems');
        }

        $resource_path = '/fba/inbound/v0/shipmentItems';
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        // query params
        if (array_key_exists('LastUpdatedAfter', $params) && $params['LastUpdatedAfter'] !== null) {
            $query_params['LastUpdatedAfter'] = $params['LastUpdatedAfter'];
        }
        if (array_key_exists('LastUpdatedBefore', $params) && $params['LastUpdatedBefore'] !== null) {
            $query_params['LastUpdatedBefore'] = $params['LastUpdatedBefore'];
        }
        if (array_key_exists('QueryType', $params) && $params['QueryType'] !== null) {
            $query_params['QueryType'] = $params['QueryType'];
        }
        if (array_key_exists('NextToken', $params) && $params['NextToken'] !== null) {
            $query_params['NextToken'] = $params['NextToken'];
        }
        if (array_key_exists('MarketplaceId', $params) && $params['MarketplaceId'] !== null) {
            $query_params['MarketplaceId'] = $params['MarketplaceId'];
        }

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

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