Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan not returning price as decimal #52

Closed
andymckay opened this issue Apr 28, 2015 · 1 comment
Closed

Plan not returning price as decimal #52

andymckay opened this issue Apr 28, 2015 · 1 comment

Comments

@andymckay
Copy link

In [12]: plans[0]      
Out[12]: <Plan {billing_day_of_month: None, trial_duration: None, description: u'A brick', billing_frequency: 1, trial_period: False, price: u'10.00', currency_iso_code: u'USD', updated_at: datetime.datetime(2015, 4, 3, 15, 10, 30), trial_duration_unit: u'day', number_of_billing_cycles: None, discounts: [], add_ons: [], created_at: datetime.datetime(2015, 4, 3, 15, 10, 30), merchant_id: u'tbb7hb44zx28jhsh', id: u'concrete-brick', name: u'Concrete'} at 62648720>

In [13]: plans[0].price
Out[13]: u'10.00'

Would be easier to use if it was parsed as a decimal.

@ryanjpodonnell
Copy link

Hey @andymckay,

It seems we do return Unicode while in our documentation, we say we return Decimal. We will fix this in our docs.

If you need the response to be Decimal, you can easily cast it to one.

Thanks for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants