recurly/recurly-client-python

account.billing_info raises AttributeError

Closed this issue · 3 comments

Account.billing_info is never filled in
(using version 2.2.6)

import recurly
import time

recurlyApiKey = 'FILLIN'
recurlyPrivateKey = 'FILLIN'
recurly.API_KEY = recurlyApiKey
recurly.js.PRIVATE_KEY = recurlyPrivateKey

accountCode = "test-%s" % time.clock()

account = recurly.Account(account_code=accountCode)
account.email = 'verena@example.com'
account.first_name = 'Verena'
account.last_name = 'Example'
account.save()

account = recurly.Account.get(accountCode)
billing_info = account.billing_info  # fails with AttributeError
billing_info.token_id = 'TOKEN_ID'
billing_info.save()

Thanks for reporting this. We'll be giving it a look-through soon to get this fixed. In the meantime, if you have a particular fix in mind, we are very happy to accept PRs.

This is being reported as resolved in the latest version, 2.2.11

It seems to be happening again in 2.2.12... I was trying the same code used in the docs:

https://dev.recurly.com/docs/create-an-accounts-billing-info-token