Skip to content

Commit

Permalink
Log de ejemplo de subscripciones
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosAlvarado committed Jul 9, 2019
1 parent 22d60ec commit 0e30b58
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/plans_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# print "All Plans"
# plans = openpay.Plan.all()
# print plans

print("Getting customer")
customer = openpay.Customer.retrieve('ancgmuvdtcvppcsfi3j4')
# print customer.cards.create(
# card_number="4111111111111111",
Expand All @@ -37,11 +39,12 @@
# "state":"Queretaro"
# })
print "Adding plan to user {0}".format(customer.name)
print('Getting subscription')
subscription = customer.subscriptions.retrieve("stxqkgt48ttknauk0xjx")

subscription.trial_end_date = "2019-01-11"
subscription.card = None
subscription.source_id = "kmfgttah2vdiyhow5x7r"

subscription.save()

print('Updating subscription')
subscription.save()

0 comments on commit 0e30b58

Please sign in to comment.