stripe/model/shipping_rate_fixed_amount.rs
1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct ShippingRateFixedAmount {
5 ///A non-negative integer in cents representing how much to charge.
6 pub amount: i64,
7 ///Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
8 pub currency: String,
9 ///Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub currency_options: Option<serde_json::Value>,
12}
13impl std::fmt::Display for ShippingRateFixedAmount {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15 write!(f, "{}", serde_json::to_string(self).unwrap())
16 }
17}