amazon_spapi/models/shipping_v2/package_document.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/// PackageDocument : A document related to a package.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PackageDocument {
17 #[serde(rename = "type")]
18 pub r#type: models::shipping_v2::DocumentType,
19 #[serde(rename = "format")]
20 pub format: models::shipping_v2::DocumentFormat,
21 /// A Base64 encoded string of the file contents.
22 #[serde(rename = "contents")]
23 pub contents: String,
24}
25
26impl PackageDocument {
27 /// A document related to a package.
28 pub fn new(r#type: models::shipping_v2::DocumentType, format: models::shipping_v2::DocumentFormat, contents: String) -> PackageDocument {
29 PackageDocument {
30 r#type,
31 format,
32 contents,
33 }
34 }
35}
36