chargebee / chargebee-python

Python library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=python
MIT License
40 stars 31 forks source link

AttributeError: module 'chargebee' has no attribute 'Usage' #40

Closed jcyriac-synamedia closed 3 years ago

jcyriac-synamedia commented 3 years ago

The 'usage' model does not seem to be available in 2,8.3 version.

$ pip show chargebee
Name: chargebee
Version: 2.8.3
Summary: Python wrapper for the ChargeBee Subscription Billing API
Home-page: https://apidocs.chargebee.com/docs/api?lang=python
Author: ChargeBee
Author-email: support@chargebee.com
License: UNKNOWN
Location: /home/jcyriac/.local/lib/python3.8/site-packages
Requires:
Required-by:
SUB_ID = 'xxxxxxxxxxxxxxxxxxxx'
entries = chargebee.Usage.list({
    "subscription_id[is]" : SUB_ID
    })

output ->

Traceback (most recent call last):
  File "list_usage.py", line 12, in <module>
    entries = chargebee.Usage.list({
AttributeError: module 'chargebee' has no attribute 'Usage'
cb-goutham commented 3 years ago

This has been fixed in v2.8.4.