Skip to main content

amazon_spapi/models/fulfillment_outbound_2020_07_01/
weight.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/// Weight : The weight.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Weight {
17    /// The unit of weight.
18    #[serde(rename = "unit")]
19    pub unit: Unit,
20    /// The weight value.
21    #[serde(rename = "value")]
22    pub value: String,
23}
24
25impl Weight {
26    /// The weight.
27    pub fn new(unit: Unit, value: String) -> Weight {
28        Weight {
29            unit,
30            value,
31        }
32    }
33}
34/// The unit of weight.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Unit {
37    #[serde(rename = "KG")]
38    Kg,
39    #[serde(rename = "KILOGRAMS")]
40    Kilograms,
41    #[serde(rename = "LB")]
42    Lb,
43    #[serde(rename = "POUNDS")]
44    Pounds,
45}
46
47impl Default for Unit {
48    fn default() -> Unit {
49        Self::Kg
50    }
51}
52