stripe-ruby icon indicating copy to clipboard operation
stripe-ruby copied to clipboard

Inline object expansion not working again on master

Open flats opened this issue 10 years ago • 1 comments

Reprise of https://github.com/stripe/stripe-ruby/issues/206.

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?

flats avatar Jul 12 '16 20:07 flats

Apologies - duplicate of https://github.com/stripe/stripe-ruby/issues/443.

flats avatar Jul 12 '16 20:07 flats