amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Retail Procurement Payments
 *
 * The Selling Partner API for Retail Procurement Payments provides programmatic access to vendors payments data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// NetCostUnitOfMeasure : This field represents weight unit of measure of items that are ordered by cases and supporting priced by weight.
/// This field represents weight unit of measure of items that are ordered by cases and supporting priced by weight.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NetCostUnitOfMeasure {
    #[serde(rename = "POUNDS")]
    Pounds,
    #[serde(rename = "OUNCES")]
    Ounces,
    #[serde(rename = "GRAMS")]
    Grams,
    #[serde(rename = "KILOGRAMS")]
    Kilograms,

}

impl std::fmt::Display for NetCostUnitOfMeasure {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Pounds => write!(f, "POUNDS"),
            Self::Ounces => write!(f, "OUNCES"),
            Self::Grams => write!(f, "GRAMS"),
            Self::Kilograms => write!(f, "KILOGRAMS"),
        }
    }
}

impl Default for NetCostUnitOfMeasure {
    fn default() -> NetCostUnitOfMeasure {
        Self::Pounds
    }
}