amazon_spapi/models/shipping_v2/
currency.rs

1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Currency : The monetary value in the currency indicated, in ISO 4217 standard format.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Currency {
17    /// The monetary value.
18    #[serde(rename = "value")]
19    pub value: f64,
20    /// The ISO 4217 format 3-character currency code.
21    #[serde(rename = "unit")]
22    pub unit: String,
23}
24
25impl Currency {
26    /// The monetary value in the currency indicated, in ISO 4217 standard format.
27    pub fn new(value: f64, unit: String) -> Currency {
28        Currency {
29            value,
30            unit,
31        }
32    }
33}
34