Inline object expansion no longer working on master
According to the docs, one should be able to inline expandable objects like so:
Stripe::Charge.retrieve(:id => "ch_15WVnGLyXYFcSpmwtX0U9GZv", :expand => ['customer'])
This is no longer working on master. Example:
[1] pry(main)> customer = Stripe::Customer.retrieve(id: "cus_5hzCdC0TpN5MOJ", expand: ['default_card'])
=> #<Stripe::Customer:0x3fea0714ff88 id=cus_5hzCdC0TpN5MOJ> JSON: {
"id": "cus_5hzCdC0TpN5MOJ",
"object": "customer",
"default_card": "card_15WZHlLyXYFcSpmwkQebO6Ip",
...
}
[2] pry(main)> customer.default_card
=> "card_15WZHlLyXYFcSpmwkQebO6Ip"
I believe this was caused by #203. Seems that there's no spec for this.
@bkrausz: You may want to address this before releasing 1.19.
Thanks for the report @jbrowning!
CC @russelldavis
I believe that this issue has cropped up again - I'm not able to get inline object expansion working on master using the following:
stripe_charge = Stripe::Charge.retrieve("ch_18WWaW4QFaGycgRKreD14QhN", :expand => ['customer'])
=> #<Stripe::Charge:0x36fe64c id=ch_18WWaW4QFaGycgRKreD14QhN> JSON: {
"id": "ch_18WWaW4QFaGycgRKreD14QhN",
"object": "charge"
...
stripe_charge.customer
=> "cus_8o8s5t5T0fqezB"
The docs cover the necessary arguments for #retrieve, but there's no example of object expansion in action. Am I perhaps missing something here? stripe_charge.customer should return a Stripe::Customer object, correct?