1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* The Selling Partner API for Invoices.
*
* Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.
*
* The version of the OpenAPI document: 2024-06-19
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ExportInvoicesRequest : The information required to create the export request.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExportInvoicesRequest {
/// The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the time of the request.
#[serde(rename = "dateEnd", skip_serializing_if = "Option::is_none")]
pub date_end: Option<String>,
/// The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
#[serde(rename = "dateStart", skip_serializing_if = "Option::is_none")]
pub date_start: Option<String>,
/// The external ID of the invoices you want included in the response.
#[serde(rename = "externalInvoiceId", skip_serializing_if = "Option::is_none")]
pub external_invoice_id: Option<String>,
#[serde(rename = "fileFormat", skip_serializing_if = "Option::is_none")]
pub file_format: Option<models::invoices_2024_06_19::FileFormat>,
/// The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
#[serde(rename = "invoiceType", skip_serializing_if = "Option::is_none")]
pub invoice_type: Option<String>,
/// The ID of the marketplace from which you want the invoices.
#[serde(rename = "marketplaceId")]
pub marketplace_id: String,
/// The series number of the invoices you want included in the response.
#[serde(rename = "series", skip_serializing_if = "Option::is_none")]
pub series: Option<String>,
/// A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options. Min count: 1
#[serde(rename = "statuses", skip_serializing_if = "Option::is_none")]
pub statuses: Option<Vec<String>>,
#[serde(rename = "transactionIdentifier", skip_serializing_if = "Option::is_none")]
pub transaction_identifier: Option<Box<models::invoices_2024_06_19::TransactionIdentifier>>,
/// The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options
#[serde(rename = "transactionType", skip_serializing_if = "Option::is_none")]
pub transaction_type: Option<String>,
}
impl ExportInvoicesRequest {
/// The information required to create the export request.
pub fn new(marketplace_id: String) -> ExportInvoicesRequest {
ExportInvoicesRequest {
date_end: None,
date_start: None,
external_invoice_id: None,
file_format: None,
invoice_type: None,
marketplace_id,
series: None,
statuses: None,
transaction_identifier: None,
transaction_type: None,
}
}
}