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
65
66
/*
* 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};
/// Invoice : Provides detailed information about an invoice.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Invoice {
/// The date and time the invoice is issued. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
#[serde(rename = "date", skip_serializing_if = "Option::is_none")]
pub date: Option<String>,
/// If the invoice is in an error state, this attribute displays the error code.
#[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
/// The invoice identifier that is used by an external party. This is typically the government agency that authorized the invoice.
#[serde(rename = "externalInvoiceId", skip_serializing_if = "Option::is_none")]
pub external_invoice_id: Option<String>,
/// The response message from the government authority when there is an error during invoice issuance.
#[serde(rename = "govResponse", skip_serializing_if = "Option::is_none")]
pub gov_response: Option<String>,
/// The invoice identifier.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// The classification of the invoice type. This varies across marketplaces. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
#[serde(rename = "invoiceType", skip_serializing_if = "Option::is_none")]
pub invoice_type: Option<String>,
/// Use this identifier in conjunction with `externalInvoiceId` to identify invoices from the same seller.
#[serde(rename = "series", skip_serializing_if = "Option::is_none")]
pub series: Option<String>,
/// The invoice status classification. Use the `getInvoicesAttributes` operation to check invoice status options.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// List with identifiers for the transactions associated to the invoice.
#[serde(rename = "transactionIds", skip_serializing_if = "Option::is_none")]
pub transaction_ids: Option<Vec<models::invoices_2024_06_19::TransactionIdentifier>>,
/// Classification of the transaction that originated this invoice. Use the `getInvoicesAttributes` operation to check `transactionType` options.
#[serde(rename = "transactionType", skip_serializing_if = "Option::is_none")]
pub transaction_type: Option<String>,
}
impl Invoice {
/// Provides detailed information about an invoice.
pub fn new() -> Invoice {
Invoice {
date: None,
error_code: None,
external_invoice_id: None,
gov_response: None,
id: None,
invoice_type: None,
series: None,
status: None,
transaction_ids: None,
transaction_type: None,
}
}
}