Skip to main content

amazon_spapi/models/finances_2024_06_19/
transaction.rs

1/*
2 * The Selling Partner API for Finances
3 *
4 * The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
5 *
6 * The version of the OpenAPI document: 2024-06-19
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Transaction : Contains all information related to the transaction.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Transaction {
17    #[serde(rename = "sellingPartnerMetadata", skip_serializing_if = "Option::is_none")]
18    pub selling_partner_metadata: Option<Box<models::finances_2024_06_19::SellingPartnerMetadata>>,
19    /// Related business identifiers of the transaction.
20    #[serde(rename = "relatedIdentifiers", skip_serializing_if = "Option::is_none")]
21    pub related_identifiers: Option<Vec<models::finances_2024_06_19::RelatedIdentifier>>,
22    /// The type of transaction.  Possible values:  * Shipment
23    #[serde(rename = "transactionType", skip_serializing_if = "Option::is_none")]
24    pub transaction_type: Option<String>,
25    /// The unique identifier for the transaction.
26    #[serde(rename = "transactionId", skip_serializing_if = "Option::is_none")]
27    pub transaction_id: Option<String>,
28    /// The status of the transaction.  **Possible values:**  * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
29    #[serde(rename = "transactionStatus", skip_serializing_if = "Option::is_none")]
30    pub transaction_status: Option<String>,
31    /// Describes the reasons for the transaction.  Example: 'Order Payment','Refund Order'
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    /// Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
35    #[serde(rename = "postedDate", skip_serializing_if = "Option::is_none")]
36    pub posted_date: Option<String>,
37    #[serde(rename = "totalAmount", skip_serializing_if = "Option::is_none")]
38    pub total_amount: Option<Box<models::finances_2024_06_19::Currency>>,
39    #[serde(rename = "marketplaceDetails", skip_serializing_if = "Option::is_none")]
40    pub marketplace_details: Option<Box<models::finances_2024_06_19::MarketplaceDetails>>,
41    /// List of items in the transaction
42    #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
43    pub items: Option<Vec<models::finances_2024_06_19::Item>>,
44    /// List of additional Information about the item.
45    #[serde(rename = "contexts", skip_serializing_if = "Option::is_none")]
46    pub contexts: Option<Vec<models::finances_2024_06_19::Context>>,
47    /// A list of breakdowns that detail how the total amount is calculated for the transaction.
48    #[serde(rename = "breakdowns", skip_serializing_if = "Option::is_none")]
49    pub breakdowns: Option<Vec<models::finances_2024_06_19::Breakdown>>,
50}
51
52impl Transaction {
53    /// Contains all information related to the transaction.
54    pub fn new() -> Transaction {
55        Transaction {
56            selling_partner_metadata: None,
57            related_identifiers: None,
58            transaction_type: None,
59            transaction_id: None,
60            transaction_status: None,
61            description: None,
62            posted_date: None,
63            total_amount: None,
64            marketplace_details: None,
65            items: None,
66            contexts: None,
67            breakdowns: None,
68        }
69    }
70}
71