amazon_spapi/models/finances_v0/
retrocharge_event.rs

1/*
2 * 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, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
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
14/// RetrochargeEvent : A retrocharge or retrocharge reversal.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RetrochargeEvent {
17    /// The type of event.  Possible values:  * Retrocharge  * RetrochargeReversal
18    #[serde(rename = "RetrochargeEventType", skip_serializing_if = "Option::is_none")]
19    pub retrocharge_event_type: Option<String>,
20    /// An Amazon-defined identifier for an order.
21    #[serde(rename = "AmazonOrderId", skip_serializing_if = "Option::is_none")]
22    pub amazon_order_id: Option<String>,
23    /// Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
24    #[serde(rename = "PostedDate", skip_serializing_if = "Option::is_none")]
25    pub posted_date: Option<String>,
26    #[serde(rename = "BaseTax", skip_serializing_if = "Option::is_none")]
27    pub base_tax: Option<Box<models::finances_v0::Currency>>,
28    #[serde(rename = "ShippingTax", skip_serializing_if = "Option::is_none")]
29    pub shipping_tax: Option<Box<models::finances_v0::Currency>>,
30    /// The name of the marketplace where the retrocharge event occurred.
31    #[serde(rename = "MarketplaceName", skip_serializing_if = "Option::is_none")]
32    pub marketplace_name: Option<String>,
33    /// A list of information about taxes withheld.
34    #[serde(rename = "RetrochargeTaxWithheldList", skip_serializing_if = "Option::is_none")]
35    pub retrocharge_tax_withheld_list: Option<Vec<models::finances_v0::TaxWithheldComponent>>,
36}
37
38impl RetrochargeEvent {
39    /// A retrocharge or retrocharge reversal.
40    pub fn new() -> RetrochargeEvent {
41        RetrochargeEvent {
42            retrocharge_event_type: None,
43            amazon_order_id: None,
44            posted_date: None,
45            base_tax: None,
46            shipping_tax: None,
47            marketplace_name: None,
48            retrocharge_tax_withheld_list: None,
49        }
50    }
51}
52