amazon_spapi/models/shipment_invoicing_v0/
submit_invoice_request.rs

1/*
2 * Selling Partner API for Shipment Invoicing
3 *
4 * The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.
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
14use serde_with::serde_as;
15
16/// SubmitInvoiceRequest : The request schema for the submitInvoice operation.
17#[serde_as]
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct SubmitInvoiceRequest {
20    /// Shipment invoice document content.
21    #[serde_as(as = "serde_with::base64::Base64")]
22    #[serde(rename = "InvoiceContent")]
23    pub invoice_content: Vec<u8>,
24    /// An Amazon marketplace identifier.
25    #[serde(rename = "MarketplaceId", skip_serializing_if = "Option::is_none")]
26    pub marketplace_id: Option<String>,
27    /// MD5 sum for validating the invoice data. For more information about calculating this value, see [Working with Content-MD5 Checksums](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_MD5.html).
28    #[serde(rename = "ContentMD5Value")]
29    pub content_md5_value: String,
30}
31
32impl SubmitInvoiceRequest {
33    /// The request schema for the submitInvoice operation.
34    pub fn new(invoice_content: Vec<u8>, content_md5_value: String) -> SubmitInvoiceRequest {
35        SubmitInvoiceRequest {
36            invoice_content,
37            marketplace_id: None,
38            content_md5_value,
39        }
40    }
41}
42