o
    tBh@                     @   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                   @   sH  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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 )+	Messaginga  
    Messaging SP-API Client
    :link: 

    With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
    z/messaging/v1/orders/{}GET)methodreturnc                 K      | j t|d||dS )a  
        get_messaging_actions_for_order(self, order_id, **kwargs) -> ApiResponse

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

        **Usage Plan:**

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

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

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

        Returns:
            ApiResponse:
        pathparams_requestr   popselforder_idkwargs r   u/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/sp_api/api/messaging/messaging.pyget_messaging_actions_for_order   s   z)Messaging.get_messaging_actions_for_orderz</messaging/v1/orders/{}/messages/confirmCustomizationDetailsPOSTc                 K   0   | j t|d||d| j|dddS )a(  
        confirm_customization_details(self, order_id, **kwargs) -> ApiResponse

        Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "text": "string",
              "attachments": [
                {
                  "uploadDestinationId": "string",
                  "fileName": "string"
                }
              ]
            }

        Returns:
            ApiResponse:
        r   bodyr   marketplaceIdsr   datar   r   r   r   marketplace_idr   r   r   r   confirm_customization_details)      !&z'Messaging.confirm_customization_detailsz7/messaging/v1/orders/{}/messages/confirmDeliveryDetailsc                 K   r   )ao  
        create_confirm_delivery_details(self, order_id, **kwargs) -> ApiResponse

        Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "text": "string"
            }


        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_confirm_delivery_detailsN      &z)Messaging.create_confirm_delivery_detailsz0/messaging/v1/orders/{}/messages/legalDisclosurec                 K   r   )aH  
        create_legal_disclosure(self, order_id, **kwargs) -> ApiResponse

        Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "attachments": [
                {
                  "uploadDestinationId": "string",
                  "fileName": "string"
                }
              ]
            }


        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_legal_disclosuren   r"   z!Messaging.create_legal_disclosurez8/messaging/v1/orders/{}/messages/negativeFeedbackRemovalc                 K   r   )aj  
        create_negative_feedback_removal(self, order_id, **kwargs) -> ApiResponse

        Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer's problem.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r    create_negative_feedback_removal   s   &z*Messaging.create_negative_feedback_removalz4/messaging/v1/orders/{}/messages/confirmOrderDetailsc                 K   r   )aX  
        create_confirm_order_details(self, order_id, **kwargs) -> ApiResponse

        Sends a message to ask a buyer an order-related question prior to shipping their order.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body:{
              "text": "string"
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_confirm_order_details      &z&Messaging.create_confirm_order_detailsz6/messaging/v1/orders/{}/messages/confirmServiceDetailsc                 K   r   )a  
        create_confirm_service_details(self, order_id, **kwargs) -> ApiResponse

        Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "text": "string"
            }


        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_confirm_service_details   r$   z(Messaging.create_confirm_service_detailsz-/messaging/v1/orders/{}/messages/amazonMotorsc                 K   r   )a  
        create_amazon_motors(self, order_id, **kwargs) -> ApiResponse

        Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "attachments": [
                {
                  "uploadDestinationId": "string",
                  "fileName": "string"
                }
              ]
            }


        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_amazon_motors   r"   zMessaging.create_amazon_motorsz)/messaging/v1/orders/{}/messages/warrantyc                 K   r   )a_  
        create_warranty(self, order_id, **kwargs) -> ApiResponse

        Sends a message to a buyer to provide details about warranty information on a purchase in their order.

        **Usage Plan:**


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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "attachments": [
                {
                  "uploadDestinationId": "string",
                  "fileName": "string"
                }
              ],
              "coverageStartDate": "2019-08-24T14:15:22Z",
              "coverageEndDate": "2019-08-24T14:15:22Z"
            }


        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_warranty  s   $&zMessaging.create_warrantyz"/messaging/v1/orders/{}/attributesc                 K   r
   )a  
        get_attributes(self, order_id, **kwargs) -> ApiResponse

        Returns a response containing attributes related to an order. This includes buyer preferences.

        **Usage Plan:**

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   get_attributes;  s   zMessaging.get_attributesz1/messaging/v1/orders/{}/messages/digitalAccessKeyc                 K   r   )a  
        create_digital_access_key(self, order_id, **kwargs) -> ApiResponse

        Sends a message to a buyer to share a digital access key needed to utilize digital content in their order.

        **Usage Plan:**


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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "text": "string",
              "attachments": [
                {
                  "uploadDestinationId": "string",
                  "fileName": "string"
                }
              ]
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_digital_access_keyS  s   "&z#Messaging.create_digital_access_keyz2/messaging/v1/orders/{}/messages/unexpectedProblemc                 K   r   )at  
        create_unexpected_problem(self, order_id, **kwargs) -> ApiResponse

        Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order.

        **Usage Plan:**

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

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

        Args:
            order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
            body: {
              "text": "string"
            }

        Returns:
            ApiResponse:
        r   r   r   r   r   r   r   r   r   r   create_unexpected_problemy  r(   z#Messaging.create_unexpected_problemN)__name__
__module____qualname____doc__r   r   r   r!   r#   r%   r&   r'   r)   r*   r+   r,   r-   r.   r   r   r   r   r      s4    


$

$



$
'

%r   )urllib.parseurllibsp_api.baser   r   r   r   r   r   r   r   r   <module>   s    