arlyon / async-stripe

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

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

Closed BentEngbers closed 7 months ago

BentEngbers commented 8 months ago

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