def update_cash_on_delivery_payment_by_id(cls, cash_on_delivery_payment_id, cash_on_delivery_payment, **kwargs):
        """Update CashOnDeliveryPayment

        Update attributes of CashOnDeliveryPayment
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_cash_on_delivery_payment_by_id(cash_on_delivery_payment_id, cash_on_delivery_payment, async=True)
        >>> result = thread.get()

        :param async bool
        :param str cash_on_delivery_payment_id: ID of cashOnDeliveryPayment to update. (required)
        :param CashOnDeliveryPayment cash_on_delivery_payment: Attributes of cashOnDeliveryPayment to update. (required)
        :return: CashOnDeliveryPayment
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return cls._update_cash_on_delivery_payment_by_id_with_http_info(cash_on_delivery_payment_id, cash_on_delivery_payment, **kwargs)
        else:
            (data) = cls._update_cash_on_delivery_payment_by_id_with_http_info(cash_on_delivery_payment_id, cash_on_delivery_payment, **kwargs)
            return data