amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Finances
 *
 * 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.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ShipmentEvent : A shipment, refund, guarantee claim, or chargeback.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipmentEvent {
    /// An Amazon-defined identifier for an order.
    #[serde(rename = "AmazonOrderId", skip_serializing_if = "Option::is_none")]
    pub amazon_order_id: Option<String>,
    /// A seller-defined identifier for an order.
    #[serde(rename = "SellerOrderId", skip_serializing_if = "Option::is_none")]
    pub seller_order_id: Option<String>,
    /// The name of the marketplace where the event occurred.
    #[serde(rename = "MarketplaceName", skip_serializing_if = "Option::is_none")]
    pub marketplace_name: Option<String>,
    /// The name of the store where the event occurred.
    #[serde(rename = "StoreName", skip_serializing_if = "Option::is_none")]
    pub store_name: Option<String>,
    /// A list of charge information on the seller's account.
    #[serde(rename = "OrderChargeList", skip_serializing_if = "Option::is_none")]
    pub order_charge_list: Option<Vec<models::finances_v0::ChargeComponent>>,
    /// A list of charge information on the seller's account.
    #[serde(rename = "OrderChargeAdjustmentList", skip_serializing_if = "Option::is_none")]
    pub order_charge_adjustment_list: Option<Vec<models::finances_v0::ChargeComponent>>,
    /// A list of fee component information.
    #[serde(rename = "ShipmentFeeList", skip_serializing_if = "Option::is_none")]
    pub shipment_fee_list: Option<Vec<models::finances_v0::FeeComponent>>,
    /// A list of fee component information.
    #[serde(rename = "ShipmentFeeAdjustmentList", skip_serializing_if = "Option::is_none")]
    pub shipment_fee_adjustment_list: Option<Vec<models::finances_v0::FeeComponent>>,
    /// A list of fee component information.
    #[serde(rename = "OrderFeeList", skip_serializing_if = "Option::is_none")]
    pub order_fee_list: Option<Vec<models::finances_v0::FeeComponent>>,
    /// A list of fee component information.
    #[serde(rename = "OrderFeeAdjustmentList", skip_serializing_if = "Option::is_none")]
    pub order_fee_adjustment_list: Option<Vec<models::finances_v0::FeeComponent>>,
    /// A list of direct payment information.
    #[serde(rename = "DirectPaymentList", skip_serializing_if = "Option::is_none")]
    pub direct_payment_list: Option<Vec<models::finances_v0::DirectPayment>>,
    /// Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
    #[serde(rename = "PostedDate", skip_serializing_if = "Option::is_none")]
    pub posted_date: Option<String>,
    /// A list of shipment items.
    #[serde(rename = "ShipmentItemList", skip_serializing_if = "Option::is_none")]
    pub shipment_item_list: Option<Vec<models::finances_v0::ShipmentItem>>,
    /// A list of shipment items.
    #[serde(rename = "ShipmentItemAdjustmentList", skip_serializing_if = "Option::is_none")]
    pub shipment_item_adjustment_list: Option<Vec<models::finances_v0::ShipmentItem>>,
}

impl ShipmentEvent {
    /// A shipment, refund, guarantee claim, or chargeback.
    pub fn new() -> ShipmentEvent {
        ShipmentEvent {
            amazon_order_id: None,
            seller_order_id: None,
            marketplace_name: None,
            store_name: None,
            order_charge_list: None,
            order_charge_adjustment_list: None,
            shipment_fee_list: None,
            shipment_fee_adjustment_list: None,
            order_fee_list: None,
            order_fee_adjustment_list: None,
            direct_payment_list: None,
            posted_date: None,
            shipment_item_list: None,
            shipment_item_adjustment_list: None,
        }
    }
}