o
    tBh8                     @   s4   d dl Zd dlmZmZmZmZ G dd deZdS )    N)Clientsp_endpointfill_query_paramsApiResponsec                   @   s   e Zd ZdZeddddefddZedd	ddefd
dZeddddefddZeddddefddZ	eddddefddZ
eddddefddZeddddefddZedd	ddefddZedd	ddefdd Zd!S )"Shippingzg
    Shipping SP-API Client
    :link: 

    Provides programmatic access to Amazon Shipping APIs.
    z/shipping/v1/shipmentsPOST)methodreturnc                 K      | j |d|dS )a
  
        create_shipment(self, **kwargs) -> ApiResponse

        Create a new shipment.

        **Usage Plan:**

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

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

        Args:
            body: {
              "clientReferenceId": "string",
              "shipTo": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "shipFrom": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "containers": [
                {
                  "containerType": "PACKAGE",
                  "containerReferenceId": "string",
                  "value": {
                    "value": 0,
                    "unit": "str"
                  },
                  "dimensions": {
                    "length": 0,
                    "width": 0,
                    "height": 0,
                    "unit": "IN"
                  },
                  "items": [
                    {
                      "quantity": 0,
                      "unitPrice": {
                        "value": 0,
                        "unit": "str"
                      },
                      "unitWeight": {
                        "unit": "g",
                        "value": 0
                      },
                      "title": "string"
                    }
                  ],
                  "weight": {
                    "unit": "g",
                    "value": 0
                  }
                }
              ]
            }

        Returns:
            ApiResponse:
        pathdata_requestpopselfkwargs r   s/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/sp_api/api/shipping/shipping.pycreate_shipment   s   ZzShipping.create_shipmentz/shipping/v1/shipments/{}GETc                 K      | j t|d||dS )a  
        get_shipment(self, shipmentId, **kwargs) -> ApiResponse

        Return the entire shipment object for the shipmentId.

        **Usage Plan:**

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

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

        Args:
            shipmentId:string | * REQUIRED

        Returns:
            ApiResponse:
        r   paramsr   r   r   r   
shipmentIdr   r   r   r   get_shipmentk   s   zShipping.get_shipmentz /shipping/v1/shipments/{}/cancelc                 K   r   )a  
        cancel_shipment(self, shipmentId, **kwargs) -> ApiResponse

        Cancel a shipment by the given shipmentId.

        **Usage Plan:**


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

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

        Args:
            shipmentId:string | * REQUIRED

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   cancel_shipment      zShipping.cancel_shipmentz(/shipping/v1/shipments/{}/purchaseLabelsc                 K   r   )ah  
        purchase_labels(self, shipmentId, **kwargs) -> ApiResponse

        Purchase shipping labels based on a given rate.

        **Usage Plan:**


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

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

        Args:
            shipmentId:string | * REQUIRED
            body: {
              "rateId": "string",
              "labelSpecification": {
                "labelFormat": "PNG",
                "labelStockSize": "4x6"
              }
            }
        

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   purchase_labels   s   !zShipping.purchase_labelsz/shipping/v1/shipments/{}/labelc                 K   r   )a  
        retrieve_shipping_label(self, shipmentId, **kwargs) -> ApiResponse

        Retrieve shipping label based on the shipment id and tracking id.

        **Usage Plan:**

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

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

        Args:
            shipmentId:string | * REQUIRED
            trackingId:string | * REQUIRED
            body: {
              "labelSpecification": {
                "labelFormat": "PNG",
                "labelStockSize": "4x6"
              }
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   retrieve_shipping_label   s   z Shipping.retrieve_shipping_labelz/shipping/v1/purchaseShipmentc                 K   r
   )a  
        purchase_shipment(self, **kwargs) -> ApiResponse

        Purchase shipping labels.

        **Usage Plan:**

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

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

        Args:
            body: {
              "clientReferenceId": "string",
              "shipTo": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "shipFrom": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "shipDate": "2019-08-24T14:15:22Z",
              "serviceType": "Amazon Shipping Ground",
              "containers": [
                {
                  "containerType": "PACKAGE",
                  "containerReferenceId": "string",
                  "value": {
                    "value": 0,
                    "unit": "str"
                  },
                  "dimensions": {
                    "length": 0,
                    "width": 0,
                    "height": 0,
                    "unit": "IN"
                  },
                  "items": [
                    {
                      "quantity": 0,
                      "unitPrice": {
                        "value": 0,
                        "unit": "str"
                      },
                      "unitWeight": {
                        "unit": "g",
                        "value": 0
                      },
                      "title": "string"
                    }
                  ],
                  "weight": {
                    "unit": "g",
                    "value": 0
                  }
                }
              ],
              "labelSpecification": {
                "labelFormat": "PNG",
                "labelStockSize": "4x6"
              }
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   purchase_shipment   s   `zShipping.purchase_shipmentz/shipping/v1/ratesc                 K   r
   )ar  
        get_rates(self, **kwargs) -> ApiResponse

        Get service rates.

        **Usage Plan:**

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

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

        Args:
            body:{
              "shipTo": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "shipFrom": {
                "name": "string",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "stateOrRegion": "string",
                "city": "string",
                "countryCode": "st",
                "postalCode": "string",
                "email": "string",
                "copyEmails": [
                  "string"
                ],
                "phoneNumber": "string"
              },
              "serviceTypes": [
                "Amazon Shipping Ground"
              ],
              "shipDate": "2019-08-24T14:15:22Z",
              "containerSpecifications": [
                {
                  "dimensions": {
                    "length": 0,
                    "width": 0,
                    "height": 0,
                    "unit": "IN"
                  },
                  "weight": {
                    "unit": "g",
                    "value": 0
                  }
                }
              ]
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   	get_ratesJ  s   IzShipping.get_ratesz/shipping/v1/accountc                 K   r
   )aD  
        get_account(self, **kwargs) -> ApiResponse

        Verify if the current account is valid.

        **Usage Plan:**

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

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

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   get_account  s   zShipping.get_accountz/shipping/v1/tracking/{}c                 K   r   )a  
        get_tracking_information(self, trackingId, **kwargs) -> ApiResponse

        Return the tracking information of a shipment.

        **Usage Plan:**


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

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

        Args:
            trackingId:string | * REQUIRED

        Returns:
            ApiResponse:
        r   r   r   )r   
trackingIdr   r   r   r   get_tracking_information  r    z!Shipping.get_tracking_informationN)__name__
__module____qualname____doc__r   r   r   r   r   r!   r"   r#   r$   r%   r'   r   r   r   r   r      s(    

[


#
!
b
K
r   )urllib.parseurllibsp_api.baser   r   r   r   r   r   r   r   r   <module>   s    