#petertle_code

1 messages ¡ Page 1 of 1 (latest)

rare jewelBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1420424685220532306

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tame blade
#

From reading the documentation, I believe that the javascript code is trying to get a list of paymentMethod objects for a specfied customer, right?
Yes

From reading the API reference for the flutter stripe package, the PaymentMethod.fromJson is suppose to take in a PaymentMethod json object and reconstruct the Payment Method object on in flutter, right?
Flutter Stripe is a 3rd party sdk, so we cannot support it and aren't familiar with how it works.

However, the body that the stripe.customers.listPaymentMethods() returns does not match the body expected by PaymentMethod.js
Not sure what you mean by this

gusty cobalt
#

Oh, I ran out of space before I can finish typing However, the body that the stripe.customers.listPaymentMethods() returns does not match the body expected by PaymentMethod.js

#

I was expecting PaymentMethod.fromJson to accept and parse a single json object from the list provided in stripe.customers.listPaymentMethods()

#

The PaymentMethod.fromJson() in Dart/Flutter expected the json PaymentMethod object to contain an attribute named 'paymentMethodType'... Was this available in a previous version of the stripe API?

#

My belief is that this is represented as the 'type' attribute now

tame blade