amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Direct Fulfillment Payments
 *
 * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Money : An amount of money, including units in the form of currency.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Money {
    /// Three digit currency code in ISO 4217 format.
    #[serde(rename = "currencyCode")]
    pub currency_code: String,
    /// 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+)?$`.
    #[serde(rename = "amount")]
    pub amount: String,
}

impl Money {
    /// An amount of money, including units in the form of currency.
    pub fn new(currency_code: String, amount: String) -> Money {
        Money {
            currency_code,
            amount,
        }
    }
}