Skip to main content

amazon_spapi/models/sales/
money.rs

1/*
2 * Selling Partner API for Sales
3 *
4 * The Selling Partner API for Sales provides APIs related to sales performance.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Money : The currency type and the amount.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Money {
17    /// Three-digit currency code. In ISO 4217 format.
18    #[serde(rename = "currencyCode")]
19    pub currency_code: String,
20    /// A decimal number with no loss of precision. Useful when precision loss is unnaceptable, as with currencies. Follows RFC7159 for number representation.
21    #[serde(rename = "amount")]
22    pub amount: String,
23}
24
25impl Money {
26    /// The currency type and the amount.
27    pub fn new(currency_code: String, amount: String) -> Money {
28        Money {
29            currency_code,
30            amount,
31        }
32    }
33}
34