Skip to main content

amazon_spapi/models/fulfillment_outbound_2020_07_01/
amount.rs

1/*
2 * Selling Partner APIs for Fulfillment Outbound
3 *
4 * The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
5 *
6 * The version of the OpenAPI document: 2020-07-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Amount : A quantity based on unit of measure.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Amount {
17    /// The unit of measure for the amount.
18    #[serde(rename = "unitOfMeasure")]
19    pub unit_of_measure: UnitOfMeasure,
20    /// A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation.
21    #[serde(rename = "value")]
22    pub value: String,
23}
24
25impl Amount {
26    /// A quantity based on unit of measure.
27    pub fn new(unit_of_measure: UnitOfMeasure, value: String) -> Amount {
28        Amount {
29            unit_of_measure,
30            value,
31        }
32    }
33}
34/// The unit of measure for the amount.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum UnitOfMeasure {
37    #[serde(rename = "Eaches")]
38    Eaches,
39}
40
41impl Default for UnitOfMeasure {
42    fn default() -> UnitOfMeasure {
43        Self::Eaches
44    }
45}
46