🖥

#Stripe #API How to specify expandable fields ( example with Ruby )

2019/12/08に公開

e.g Retrieve Customer invoice setting default payment method with Ruby ( why null returns? )

not expandable

customer = Stripe::Customer.retrieve('cus_xxxxxxxxxx')

expandable

customer = Stripe::Customer.retrieve({ id: 'cus_xxxxxxxxxx', expand:  ['invoice_settings.default_payment_method'] })

Expandable Document

image

https://stripe.com/docs/api/expanding_objects?lang=ruby

How to find expandable specification

search API docs and
image

invoice_settings.default_payment_method

Japanese

Stripe API で顧客のデフォルトの支払い方法が得られない、nullになるので拡張指定をする例

Original by Github issue

https://github.com/YumaInaura/YumaInaura/issues/2822

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2019-12-08

Discussion