stripe_utils: Add set_subscription_metadata method

This commit is contained in:
PCoder 2018-04-19 00:51:55 +02:00
parent bd875ffe7d
commit 1a7412f8ff

View file

@ -233,6 +233,12 @@ class StripeUtils(object):
)
return subscription_result
@handleStripeError
def set_subscription_metadata(self, subscription_id, metadata):
subscription = stripe.Subscription.retrieve(subscription_id)
subscription.metadata = metadata
subscription.save()
@handleStripeError
def unsubscribe_customer(self, subscription_id):
"""