arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
447 stars 129 forks source link

Missing wallet type Link #367

Closed ferocious-ferret closed 1 year ago

ferocious-ferret commented 1 year ago

Describe the bug

I'm getting the following error

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: JSONSerialize(Error { path: Path { segments: [Map { key: "data" }, Seq { index: 0 }, Map { key: "payment_method_details" }, Map { key: "card" }, Map { key: "wallet" }, Map { key: "type" }] }, original: Error("unknown variant `link`, expected one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`", line: 78, column: 26) })'

To Reproduce

Fetch a charge item with type Link

Expected behavior

Not crash

Code snippets

No response

OS

Linux

Rust version

1.68.1

Library version

async-stripe 0.18.1

API version

2020_08_27

Additional context

No response

barlindhaug commented 1 year ago

Here is the changelog from Stripe: https://stripe.com/docs/changelog#april-6,-2023

My guess is that they consider this a backwards-compatible change, even if it is not for us.

arlyon commented 1 year ago

I have a PR pending to update the openapi but it needs some changes to the codegen to deduplicate a field which I haven't got round to yet.

arlyon commented 1 year ago

I think this is addressed.