Update DiscountPromotion

        Update attributes of DiscountPromotion
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_discount_promotion_by_id(discount_promotion_id, discount_promotion, async=True)
        >>> result = thread.get()

        :param async bool
        :param str discount_promotion_id: ID of discountPromotion to update. (required)
        :param DiscountPromotion discount_promotion: Attributes of discountPromotion to update. (required)
        :return: DiscountPromotion
                 If the method is called asynchronously,
                 returns the request thread.

def update_discount_promotion_by_id(cls, discount_promotion_id, discount_promotion, **kwargs):
        """Update DiscountPromotion

        Update attributes of DiscountPromotion
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.update_discount_promotion_by_id(discount_promotion_id, discount_promotion, async=True)
        >>> result = thread.get()

        :param async bool
        :param str discount_promotion_id: ID of discountPromotion to update. (required)
        :param DiscountPromotion discount_promotion: Attributes of discountPromotion to update. (required)
        :return: DiscountPromotion
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return cls._update_discount_promotion_by_id_with_http_info(discount_promotion_id, discount_promotion, **kwargs)
        else:
            (data) = cls._update_discount_promotion_by_id_with_http_info(discount_promotion_id, discount_promotion, **kwargs)
            return data