- Minor updates to error messages, includes status code in the message.
- Added additional test for os environment variables.
- Rate limit status code now checked before anything else.
- Added logic to handle rate limits automatically in the
Client
class. If a rate limit is hit, the client will wait for the rate limit to reset before making the request again.
- Added missing fields to
Product
andOrder
models
- Added
AuthResponse
class that is now returned by theget_auth
method in the API. - Added additional validation methods to the
_Base
class to validatemodel_validate_json
model_dump
model_dump_json
- Added validation logic to ensure the
limit
parameter is between 1 and 100
- Fixed a few bugs in the
user_is_subscribed
method for monthly and yearly subscription intervals and UUID not being lower case. - Removed deprecated
datetime.utcnow()
call from theuser_is_subscribed
method AuthResponse
can now be passed as a parameter to the Client class constructor to skip theget_auth
method call.
- Removed
access_tokens
attribute from theClient
class constructor, it is now handled by theAuthResponse
class.
- Added
user_is_subscribed
method to the API to check if a user is currently subscribed to a product.
- Renamed the core directory for the package, instead of using
from upgrade_chat import client
you will now usefrom upchatpy import client
. Same goes for all other imports from this package.