Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The byn and mmk currency is missing in the Currency enum #459

Closed
BentEngbers opened this issue Dec 12, 2023 · 0 comments · Fixed by #460
Closed

The byn and mmk currency is missing in the Currency enum #459

BentEngbers opened this issue Dec 12, 2023 · 0 comments · Fixed by #460
Labels
bug Something isn't working

Comments

@BentEngbers
Copy link
Contributor

Describe the bug

There is a currency missing in the Currency enum.

To Reproduce

create a price with these two currencies, and try to fetch the prices, with currency_options enabled. It would look something like this:

let params = {
        let mut options = ListPrices::new();
        options.product = Some(IdOrCreate::Id(&product_lookup_key));
        options.expand = &["data.currency_options"];
        options
    };
    let prices = stripe::Price::list(client, &params)
        .await

Expected behavior

That the currencies that stripe allows should be in the currency enum.

Code snippets

Adding the following snippet in the `currency.rs` file will fix the problem. 

pub enum Currency {
    #[serde(rename = "byn")]
    BYN,
    #[serde(rename = "mmk")]
    MMK,

OS

macOS

Rust version

1.74.0

Library version

0.26.0

API version

2023-08-16

Additional context

No response

@BentEngbers BentEngbers added the bug Something isn't working label Dec 12, 2023
@BentEngbers BentEngbers changed the title The byn and mmk currency is missing in the CurrencyMap The byn and mmk currency is missing in the Currency enum Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant