amazon_spapi/models/vendor_shipments/money.rs
1/*
2 * Selling Partner API for Retail Procurement Shipments
3 *
4 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
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 : An amount of money, including units in the form of currency.
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 unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\\d*))(\\.\\d+)?([eE][+-]?\\d+)?$`.
21 #[serde(rename = "amount")]
22 pub amount: String,
23}
24
25impl Money {
26 /// An amount of money, including units in the form of currency.
27 pub fn new(currency_code: String, amount: String) -> Money {
28 Money {
29 currency_code,
30 amount,
31 }
32 }
33}
34