# coding: utf-8

"""
    Order API

    The Order API provides interfaces that let shoppers pay for items (for both eBay guest and eBay member buyers). It also returns payment and shipping status of the order. It enables eBay partners to use accept payment without being <a href=\"https://www.pcisecuritystandards.org/\">PCI compliant</a> and use the <a href=\"/api-docs/buy/static/api-order.html#Post\">Post Order API</a> for returns and cancellations for eBay member buyers.   <p>The Order API has the following resources:  </p>  <ul>  <li><b>checkout_session:</b> Lets eBay members purchase items using PayPal or a credit card.</li>  <li><b>guest_checkout_session:</b> Lets eBay guests purchase items using a credit card or the <a href=\"/api-docs/buy/static/api-order.html#spb-checkout\">PayPal Smart Button</a>.</li>   <li><b>proxy_guest_checkout_session:</b> Lets eBay guests purchase items through a <a href=\"/api-docs/buy/static/api-order.html#vsp-checkout\">vault service provider</a> (VSP). &nbsp;&nbsp;<b>*Note:* </b>Due to the requirement of having a VSP, this resource is not available in the eBay <a href=\"https://developer.ebay.com/my/api_test_tool?index=0\">API Explorer</a>.</li>  <li><b>guest_purchase_order</b> and <b>purchase_order:</b> Lets eBay partners track the payment status and show the buyers their purchase order. </li> </ul>  # noqa: E501

    OpenAPI spec version: v1_beta.29.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from ...buy_order.api_client import ApiClient


class ProxyGuestCheckoutSessionApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def apply_proxy_guest_coupon(self, checkout_session_id, **kwargs):  # noqa: E501
        """apply_proxy_guest_coupon  # noqa: E501

        (Limited Release) You must be whitelisted to use this method. This method adds a coupon to an eBay proxy guest checkout session and applies it to all the eligible items in the order. The checkoutSessionId is passed in as a URI parameter and is required. The redemption code of the coupon is in the payload and is also required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/apply_coupon Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/apply_coupon Note: This method is not available in the eBay API Explorer. Restrictions Maximum: One coupon per order For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.apply_proxy_guest_coupon(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param CouponRequest body: The container for the fields used to apply a coupon to a checkout session.
        :return: CheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.apply_proxy_guest_coupon_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.apply_proxy_guest_coupon_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def apply_proxy_guest_coupon_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """apply_proxy_guest_coupon  # noqa: E501

        (Limited Release) You must be whitelisted to use this method. This method adds a coupon to an eBay proxy guest checkout session and applies it to all the eligible items in the order. The checkoutSessionId is passed in as a URI parameter and is required. The redemption code of the coupon is in the payload and is also required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/apply_coupon Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/apply_coupon Note: This method is not available in the eBay API Explorer. Restrictions Maximum: One coupon per order For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.apply_proxy_guest_coupon_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param CouponRequest body: The container for the fields used to apply a coupon to a checkout session.
        :return: CheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method apply_proxy_guest_coupon" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `apply_proxy_guest_coupon`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/apply_coupon', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_proxy_guest_checkout_session(self, checkout_session_id, **kwargs):  # noqa: E501
        """get_proxy_guest_checkout_session  # noqa: E501

        This method returns the details of the specified eBay proxy guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. This method has no request payload. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId} Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId} Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_proxy_guest_checkout_session(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_proxy_guest_checkout_session_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_proxy_guest_checkout_session_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def get_proxy_guest_checkout_session_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """get_proxy_guest_checkout_session  # noqa: E501

        This method returns the details of the specified eBay proxy guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. This method has no request payload. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId} Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId} Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_proxy_guest_checkout_session_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_proxy_guest_checkout_session" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `get_proxy_guest_checkout_session`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def initiate_proxy_guest_checkout_session(self, **kwargs):  # noqa: E501
        """initiate_proxy_guest_checkout_session  # noqa: E501

        This method creates an eBay proxy guest checkout session, which is a payment flow that requires integration with a VSP (vault service provider), such as Braintree. The VSP handles only the methods within this flow that contain payment information. This method returns the details of the order and a marketplace specific checkoutSessionId that you use as a URI parameter in subsequent proxy_guest_checkout_session resource checkout methods. For details about the VSP payment flow, see Vault service eBay guest payment flow. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/initiate Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/initiate Note: This method is not available in the eBay API Explorer. Also see Negative Testing Using Stubs for information on how to emulate error conditions for this method using stubs. TIP: To test the entire checkout flow, you might need a &quot;test&quot; credit card. You can generate a credit card number from http://www.getcreditcardnumbers.com. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.initiate_proxy_guest_checkout_session(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CheckoutSessionRequestWithoutPayment body: The container for the fields used by the initiateProxyGuestCheckoutSession method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.initiate_proxy_guest_checkout_session_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.initiate_proxy_guest_checkout_session_with_http_info(**kwargs)  # noqa: E501
            return data

    def initiate_proxy_guest_checkout_session_with_http_info(self, **kwargs):  # noqa: E501
        """initiate_proxy_guest_checkout_session  # noqa: E501

        This method creates an eBay proxy guest checkout session, which is a payment flow that requires integration with a VSP (vault service provider), such as Braintree. The VSP handles only the methods within this flow that contain payment information. This method returns the details of the order and a marketplace specific checkoutSessionId that you use as a URI parameter in subsequent proxy_guest_checkout_session resource checkout methods. For details about the VSP payment flow, see Vault service eBay guest payment flow. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/initiate Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/initiate Note: This method is not available in the eBay API Explorer. Also see Negative Testing Using Stubs for information on how to emulate error conditions for this method using stubs. TIP: To test the entire checkout flow, you might need a &quot;test&quot; credit card. You can generate a credit card number from http://www.getcreditcardnumbers.com. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.initiate_proxy_guest_checkout_session_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CheckoutSessionRequestWithoutPayment body: The container for the fields used by the initiateProxyGuestCheckoutSession method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method initiate_proxy_guest_checkout_session" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/initiate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def place_proxy_guest_order(self, checkout_session_id, **kwargs):  # noqa: E501
        """place_proxy_guest_order  # noqa: E501

        This method creates the proxy guest purchase order, pays for the items, and terminates the specified guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/place_order Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/place_order Note: This method is not available in the eBay API Explorer. Also see Negative Testing Using Stubs for information on how to emulate error conditions for this method using stubs. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.place_proxy_guest_order(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param GuestPlaceOrderRequest body: The container for the fields used by the placeProxyGuestOrder method.
        :return: PurchaseOrderSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.place_proxy_guest_order_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.place_proxy_guest_order_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def place_proxy_guest_order_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """place_proxy_guest_order  # noqa: E501

        This method creates the proxy guest purchase order, pays for the items, and terminates the specified guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/place_order Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/place_order Note: This method is not available in the eBay API Explorer. Also see Negative Testing Using Stubs for information on how to emulate error conditions for this method using stubs. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.place_proxy_guest_order_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param GuestPlaceOrderRequest body: The container for the fields used by the placeProxyGuestOrder method.
        :return: PurchaseOrderSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method place_proxy_guest_order" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `place_proxy_guest_order`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/place_order', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PurchaseOrderSummary',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def remove_proxy_guest_coupon(self, checkout_session_id, **kwargs):  # noqa: E501
        """remove_proxy_guest_coupon  # noqa: E501

        (Limited Release) You must be whitelisted to use this method. This method removes a coupon from an eBay proxy guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. The redemption code of the coupon is specified in the payload and is also required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/remove_coupon Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/remove_coupon Note: This method is not available in the eBay API Explorer. Restrictions For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_proxy_guest_coupon(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param CouponRequest body: The container for the fields used to remove a coupon from a checkout session.
        :return: CheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.remove_proxy_guest_coupon_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.remove_proxy_guest_coupon_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def remove_proxy_guest_coupon_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """remove_proxy_guest_coupon  # noqa: E501

        (Limited Release) You must be whitelisted to use this method. This method removes a coupon from an eBay proxy guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required. The redemption code of the coupon is specified in the payload and is also required. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/remove_coupon Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/remove_coupon Note: This method is not available in the eBay API Explorer. Restrictions For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.remove_proxy_guest_coupon_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param CouponRequest body: The container for the fields used to remove a coupon from a checkout session.
        :return: CheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method remove_proxy_guest_coupon" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `remove_proxy_guest_coupon`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/remove_coupon', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_proxy_guest_payment_info(self, authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_payment_info  # noqa: E501

        This method adds or changes the payment information of the specified proxy guest checkout session. This endpoint is invoked by the VSP (vault service provider) on behalf of the eBay partner. For details about the VSP payment flow, see Vault service eBay guest payment flow. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_payment_info Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_payment_info Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_payment_info(authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: The oAuth token. Note: The eBay partner must include this header in the request. (required)
        :param str x_ebay_c_date: The UTC timestamp of the request, which is generated and added to the request by the VSP. (required)
        :param str x_ebay_c_marketplace_id: The eBay marketplace ID. For a list of supported sites, see API Restrictions in the Order API overview. Note: The eBay partner must include this header in the request. (required)
        :param str x_ebay_c_request_nonce: A UUID (a 128-bit universal unique ID), which is generated and added to the request by the VSP. (required)
        :param str x_ebay_c_signature: The HMAC signature, which is generated and added to the request by the VSP. (required)
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdatePaymentInformation body: The container for the fields used by the updateProxyGuestPaymentInfo method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_proxy_guest_payment_info_with_http_info(authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_proxy_guest_payment_info_with_http_info(authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, **kwargs)  # noqa: E501
            return data

    def update_proxy_guest_payment_info_with_http_info(self, authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_payment_info  # noqa: E501

        This method adds or changes the payment information of the specified proxy guest checkout session. This endpoint is invoked by the VSP (vault service provider) on behalf of the eBay partner. For details about the VSP payment flow, see Vault service eBay guest payment flow. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_payment_info Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_payment_info Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_payment_info_with_http_info(authorization, x_ebay_c_date, x_ebay_c_marketplace_id, x_ebay_c_request_nonce, x_ebay_c_signature, checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str authorization: The oAuth token. Note: The eBay partner must include this header in the request. (required)
        :param str x_ebay_c_date: The UTC timestamp of the request, which is generated and added to the request by the VSP. (required)
        :param str x_ebay_c_marketplace_id: The eBay marketplace ID. For a list of supported sites, see API Restrictions in the Order API overview. Note: The eBay partner must include this header in the request. (required)
        :param str x_ebay_c_request_nonce: A UUID (a 128-bit universal unique ID), which is generated and added to the request by the VSP. (required)
        :param str x_ebay_c_signature: The HMAC signature, which is generated and added to the request by the VSP. (required)
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdatePaymentInformation body: The container for the fields used by the updateProxyGuestPaymentInfo method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['authorization', 'x_ebay_c_date', 'x_ebay_c_marketplace_id', 'x_ebay_c_request_nonce', 'x_ebay_c_signature', 'checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_proxy_guest_payment_info" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'authorization' is set
        if ('authorization' not in params or
                params['authorization'] is None):
            raise ValueError("Missing the required parameter `authorization` when calling `update_proxy_guest_payment_info`")  # noqa: E501
        # verify the required parameter 'x_ebay_c_date' is set
        if ('x_ebay_c_date' not in params or
                params['x_ebay_c_date'] is None):
            raise ValueError("Missing the required parameter `x_ebay_c_date` when calling `update_proxy_guest_payment_info`")  # noqa: E501
        # verify the required parameter 'x_ebay_c_marketplace_id' is set
        if ('x_ebay_c_marketplace_id' not in params or
                params['x_ebay_c_marketplace_id'] is None):
            raise ValueError("Missing the required parameter `x_ebay_c_marketplace_id` when calling `update_proxy_guest_payment_info`")  # noqa: E501
        # verify the required parameter 'x_ebay_c_request_nonce' is set
        if ('x_ebay_c_request_nonce' not in params or
                params['x_ebay_c_request_nonce'] is None):
            raise ValueError("Missing the required parameter `x_ebay_c_request_nonce` when calling `update_proxy_guest_payment_info`")  # noqa: E501
        # verify the required parameter 'x_ebay_c_signature' is set
        if ('x_ebay_c_signature' not in params or
                params['x_ebay_c_signature'] is None):
            raise ValueError("Missing the required parameter `x_ebay_c_signature` when calling `update_proxy_guest_payment_info`")  # noqa: E501
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `update_proxy_guest_payment_info`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'authorization' in params:
            header_params['Authorization'] = params['authorization']  # noqa: E501
        if 'x_ebay_c_date' in params:
            header_params['X-EBAY-C-DATE'] = params['x_ebay_c_date']  # noqa: E501
        if 'x_ebay_c_marketplace_id' in params:
            header_params['X-EBAY-C-MARKETPLACE-ID'] = params['x_ebay_c_marketplace_id']  # noqa: E501
        if 'x_ebay_c_request_nonce' in params:
            header_params['X-EBAY-C-REQUEST-NONCE'] = params['x_ebay_c_request_nonce']  # noqa: E501
        if 'x_ebay_c_signature' in params:
            header_params['X-EBAY-C-SIGNATURE'] = params['x_ebay_c_signature']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/update_payment_info', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_proxy_guest_quantity(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_quantity  # noqa: E501

        This method changes the quantity of the specified line item in an eBay proxy guest checkout session. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_quantity Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_quantity Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_quantity(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdateQuantity body: The container for the fields used by the updateProxyGuestQuantity method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_proxy_guest_quantity_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_proxy_guest_quantity_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def update_proxy_guest_quantity_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_quantity  # noqa: E501

        This method changes the quantity of the specified line item in an eBay proxy guest checkout session. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_quantity Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_quantity Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_quantity_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdateQuantity body: The container for the fields used by the updateProxyGuestQuantity method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_proxy_guest_quantity" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `update_proxy_guest_quantity`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/update_quantity', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_proxy_guest_shipping_address(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_shipping_address  # noqa: E501

        This method changes the shipping address for the order in an eBay proxy guest checkout session. All the line items in an order must be shipped to the same address, but the shipping method can be specific to the line item. Note: If the address submitted cannot be validated, a warning message will be returned. This does not prevent the method from executing, but you may want to verify the address. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_address Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_address Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_shipping_address(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param ShippingAddressImpl body: The container for the fields used by the updateProxyGuestShippingAddress method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_proxy_guest_shipping_address_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_proxy_guest_shipping_address_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def update_proxy_guest_shipping_address_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_shipping_address  # noqa: E501

        This method changes the shipping address for the order in an eBay proxy guest checkout session. All the line items in an order must be shipped to the same address, but the shipping method can be specific to the line item. Note: If the address submitted cannot be validated, a warning message will be returned. This does not prevent the method from executing, but you may want to verify the address. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_address Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_address Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_shipping_address_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param ShippingAddressImpl body: The container for the fields used by the updateProxyGuestShippingAddress method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_proxy_guest_shipping_address" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `update_proxy_guest_shipping_address`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_address', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_proxy_guest_shipping_option(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_shipping_option  # noqa: E501

        This method changes the shipping method for the specified line item in an eBay proxy guest checkout session. The shipping option can be set for each line item. This gives the shopper the ability choose the cost of shipping for each line item. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_option Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_option Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_shipping_option(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdateShippingOption body: The container for the fields used by the updateProxyGuestShippingOption method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_proxy_guest_shipping_option_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_proxy_guest_shipping_option_with_http_info(checkout_session_id, **kwargs)  # noqa: E501
            return data

    def update_proxy_guest_shipping_option_with_http_info(self, checkout_session_id, **kwargs):  # noqa: E501
        """update_proxy_guest_shipping_option  # noqa: E501

        This method changes the shipping method for the specified line item in an eBay proxy guest checkout session. The shipping option can be set for each line item. This gives the shopper the ability choose the cost of shipping for each line item. The URLs for this method are: Production URL: https://apix.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_option Sandbox URL: https://apix.sandbox.ebay.com/buy/order/v1/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_option Note: This method is not available in the eBay API Explorer. Restrictions This method is used only when the eBay partner is using a payment vault service, such as Braintree, to process payments. The Vault service eBay guest payment flow is supported only for the EBAY_US marketplace. For a list of supported sites and other restrictions, see API Restrictions in the Order API overview.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_proxy_guest_shipping_option_with_http_info(checkout_session_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str checkout_session_id: The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the initiateProxyGuestCheckoutSession method. Note: When using this ID, the X-EBAY-C-MARKETPLACE-ID value and developer App ID must be the same as what was used when this checkout session was created. See Checkout session restrictions in the Buy Integration Guide. (required)
        :param UpdateShippingOption body: The container for the fields used by the updateProxyGuestShippingOption method.
        :return: GuestCheckoutSessionResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['checkout_session_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_proxy_guest_shipping_option" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'checkout_session_id' is set
        if ('checkout_session_id' not in params or
                params['checkout_session_id'] is None):
            raise ValueError("Missing the required parameter `checkout_session_id` when calling `update_proxy_guest_shipping_option`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'checkout_session_id' in params:
            path_params['checkoutSessionId'] = params['checkout_session_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/proxy_guest_checkout_session/{checkoutSessionId}/update_shipping_option', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GuestCheckoutSessionResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
