Reputation: 26668
I'm trying to add a card to a customer with the following code:
cu = stripe.Customer.retrieve(customer_id)
cu.cards.create(card=token)
However, I am getting the following exception:
'ListObject' object has no attribute 'create'
It seems cu.cards does not have a "create" method.
I'm using the 1.12.0 library for python.
What am I doing wrong here?
Upvotes: 3
Views: 598
Reputation: 26668
Welp, I was dumb, and I guess I'll just leave this question and answer here in case anyone else can benefit from it.
I was not using the latest version of the api on my account. Apparently you can click on Account Settings->API Keys, and upgrade the API that your account uses. I was using a rather old version of the api.
Upvotes: 2