Skip to main content

amazon_spapi/models/shipping_v2/
supported_document_detail.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/// SupportedDocumentDetail : The supported document types for a service offering.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SupportedDocumentDetail {
17    #[serde(rename = "name")]
18    pub name: models::shipping_v2::DocumentType,
19    /// When true, the supported document type is required.
20    #[serde(rename = "isMandatory")]
21    pub is_mandatory: bool,
22}
23
24impl SupportedDocumentDetail {
25    /// The supported document types for a service offering.
26    pub fn new(name: models::shipping_v2::DocumentType, is_mandatory: bool) -> SupportedDocumentDetail {
27        SupportedDocumentDetail {
28            name,
29            is_mandatory,
30        }
31    }
32}
33