Stripe Customer retrieve stub and expand default_source option
eliotsykes opened this issue · 1 comments
The customer retrieve stub currently doesn't support Stripe's expand: ['default_source']
option:
customer = Stripe::Customer.retrieve(id: 'customer-id-here', expand: ['default_source'])
With fake_stripe and Stripe customer = Stripe::Customer.retrieve(id: 'customer-id-here')
(no expand option) the customer.default_source
returns a String (the id of the default payment source).
However with Stripe, but not fake_stripe customer = Stripe::Customer.retrieve(id: 'customer-id-here', expand: ['default_source])
(note the expand option) the customer.default_source
returns the populated payment source object (not just the string id of the payment source). fake_stripe only returns the String id of the payment source.
(stripe-ruby-mock has a similar issue that may be useful stripe-ruby-mock/stripe-ruby-mock#109 )
Closing this because fake_stripe has been deprecated: #154