amazon_spapi/models/merchant_fulfillment_v0/
label.rs

1/*
2 * Selling Partner API for Merchant Fulfillment
3 *
4 * With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Label : Data for creating a shipping label and dimensions for printing the label.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Label {
17    /// Custom text to print on the label. Note: Custom text is only included on labels that are in ZPL format (ZPL203). FedEx does not support `CustomTextForLabel`.
18    #[serde(rename = "CustomTextForLabel", skip_serializing_if = "Option::is_none")]
19    pub custom_text_for_label: Option<String>,
20    #[serde(rename = "Dimensions")]
21    pub dimensions: Box<models::merchant_fulfillment_v0::LabelDimensions>,
22    #[serde(rename = "FileContents")]
23    pub file_contents: Box<models::merchant_fulfillment_v0::FileContents>,
24    #[serde(rename = "LabelFormat", skip_serializing_if = "Option::is_none")]
25    pub label_format: Option<models::merchant_fulfillment_v0::LabelFormat>,
26    #[serde(rename = "StandardIdForLabel", skip_serializing_if = "Option::is_none")]
27    pub standard_id_for_label: Option<models::merchant_fulfillment_v0::StandardIdForLabel>,
28}
29
30impl Label {
31    /// Data for creating a shipping label and dimensions for printing the label.
32    pub fn new(dimensions: models::merchant_fulfillment_v0::LabelDimensions, file_contents: models::merchant_fulfillment_v0::FileContents) -> Label {
33        Label {
34            custom_text_for_label: None,
35            dimensions: Box::new(dimensions),
36            file_contents: Box::new(file_contents),
37            label_format: None,
38            standard_id_for_label: None,
39        }
40    }
41}
42