You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a field on an object is assigned, the value is not persisted down to the values dict on the object. I suspect this is probably due to the fact that setattr is being used to populate the fields on initialization, so it's not able to be overloaded.
Unfortunately, this makes using the object basically useless, since they can't really be updated given the currently available methods.
Example:
subscription=chargebee.Subscription.retrieve('subscriptionId')
assertsubscription.plan_id=='oldPlanId'# this passessubscription.plan_id='newPlanId'serializedSub=json.loads(str(subscription))
assertserializedSub['plan_id'] == 'newPlanId# this fails
It would be nice to provide a way for the attributes of the object to be "serialized" into a dict that can be passed to the update call of a chargebee model, or implement some sort of update that can be called on the object itself, rather than passing in the id and update params.
The text was updated successfully, but these errors were encountered:
When a field on an object is assigned, the value is not persisted down to the
values
dict on the object. I suspect this is probably due to the fact thatsetattr
is being used to populate the fields on initialization, so it's not able to be overloaded.Unfortunately, this makes using the object basically useless, since they can't really be updated given the currently available methods.
Example:
It would be nice to provide a way for the attributes of the object to be "serialized" into a dict that can be passed to the
update
call of a chargebee model, or implement some sort ofupdate
that can be called on the object itself, rather than passing in the id and update params.The text was updated successfully, but these errors were encountered: