Closed gerbal closed 2 years ago
According to the Chargebee documentations, when a coupon with nested attributes is serialized, the path of the nested attributes should be preserved and double-nested arrays should be json encoded as arrays.
{"item_constraints": [{"item_price_ids": ["id1"]}]}
Is expected to be serialized to parameters as:
item_constraints[item_price_ids][0]=["id1"]
However when this resource is serialized using this library, the nested array is not correctly nested
ChargeBee::Util.serialize({item_constraints: [{item_price_ids: ['id1']}]}) => {"item_price_ids[0]"=>"id1"}
Closing this issue as its been resolved in latest release v2.13.1.
Hi, You should be passing this jsonarray as string '["id1","id2"]' within single quotes as this field is not list of values.
According to the Chargebee documentations, when a coupon with nested attributes is serialized, the path of the nested attributes should be preserved and double-nested arrays should be json encoded as arrays.
Is expected to be serialized to parameters as:
However when this resource is serialized using this library, the nested array is not correctly nested