async-stripe icon indicating copy to clipboard operation
async-stripe copied to clipboard

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

Open BentEngbers opened this issue 1 year ago • 0 comments

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 avatar Dec 12 '23 20:12 BentEngbers