I've been working on improving the Elixir package for interacting with the Chargebee API and have encountered some inconsistency in how the different libraries construct POST request parameters
When I try to serialize a nested nested lists, as one would use when creating coupons, the serializers produce differing output depending on the library implementation.
Chargebee-Ruby produces the following
ChargeBee::Util.serialize({item_constraints: [{item_price_ids: ['id1']}]})
=> {"item_price_ids[0]"=>"id1"}
But Chargebee-Typescript produces
Core.encodeParams({item_constraints: [{price_item_ids: ['id1']}]})
// "item_constraints[item_price_ids][0][0]=id1"
According to Chargebee Engineers the encoding of this parameter should instead be
{ "item_constraints[item_price_ids][0]" => ["id1"] }
If this is the case, then neither the Ruby nor the Typescript libraries are correct