amazon_spapi/models/shipping_v2/
label_attribute.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/// LabelAttribute : Enumerates the attributes supported to be printed on a shipping label. The values for these attributes are retrieved from GetRates/OneClickShipment request
15/// Enumerates the attributes supported to be printed on a shipping label. The values for these attributes are retrieved from GetRates/OneClickShipment request
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum LabelAttribute {
18    #[serde(rename = "PACKAGE_CLIENT_REFERENCE_ID")]
19    PackageClientReferenceId,
20    #[serde(rename = "SELLER_DISPLAY_NAME")]
21    SellerDisplayName,
22    #[serde(rename = "COLLECT_ON_DELIVERY_AMOUNT")]
23    CollectOnDeliveryAmount,
24
25}
26
27impl std::fmt::Display for LabelAttribute {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::PackageClientReferenceId => write!(f, "PACKAGE_CLIENT_REFERENCE_ID"),
31            Self::SellerDisplayName => write!(f, "SELLER_DISPLAY_NAME"),
32            Self::CollectOnDeliveryAmount => write!(f, "COLLECT_ON_DELIVERY_AMOUNT"),
33        }
34    }
35}
36
37impl Default for LabelAttribute {
38    fn default() -> LabelAttribute {
39        Self::PackageClientReferenceId
40    }
41}
42