arlyon / async-stripe

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

Unable to pass bank account details to CreateAccount::external_account #412

Open tantialex opened 1 year ago

tantialex commented 1 year ago

Describe the bug

CreateAccount::external_account only accepts &str. How may I pass bank account details as mentioned in the documentation.

/// You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

To Reproduce

CreateAccount {
    external_account: Some("".to_owned()),
    ..Default::default()
}

Expected behavior

CreateAccount {
    external_account: Some(CreateAccountExternalAccount { ... }),
    ..Default::default()
}

Code snippets

No response

OS

windows 10 - wsl2

Rust version

1.70.0

Library version

0.22.2

API version

2022-11-15

Additional context

No response

ThomasCartier commented 4 months ago

Same issue here. It appears that the obj data is missing.

arlyon commented 3 months ago

This should be resolved with the new next branch. Will leave this open for now.