🖥
#Stripe API / Delete all metadata key and value in Stripe object/ Rub
update and empty value. it works.
# Set metadata
Stripe::SubscriptionSchedule.update(subscription.schedule.id, metadata: { a: "1", b: "2"}).metadata
# => #<Stripe::StripeObject:0x2b194861e680> JSON: {
# "a": "1",
# "b": "2"
# }
# NG
# Update with empty Hash
Stripe::SubscriptionSchedule.update(subscription.schedule.id, metadata: { }).metadata
# => #<Stripe::StripeObject:0x2b19485d9fa8> JSON: {
# "a": "1",
# "b": "2"
# }
# NG
# Update with nil
Stripe::SubscriptionSchedule.update(subscription.schedule.id, metadata: nil).metadata
# => #<Stripe::StripeObject:0x2b19485b1f80> JSON: {
# "a": "1",
# "b": "2"
# }
# OK
# Update with empty string
Stripe::SubscriptionSchedule.update(subscription.schedule.id, metadata: "").metadata
# => #<Stripe::StripeObject:0x2b194858a32c> JSON: {
# }
deleting Metadata · Issue #637 · stripe/stripe-dotnet
Original by Github issue
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2020-02-26
Discussion