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};

/// PayWithAmazonEvent : An event related to the seller's Pay with Amazon account.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PayWithAmazonEvent {
    /// An order identifier that is specified by the seller.
    #[serde(rename = "SellerOrderId", skip_serializing_if = "Option::is_none")]
    pub seller_order_id: Option<String>,
    /// Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
    #[serde(rename = "TransactionPostedDate", skip_serializing_if = "Option::is_none")]
    pub transaction_posted_date: Option<String>,
    /// The type of business object.
    #[serde(rename = "BusinessObjectType", skip_serializing_if = "Option::is_none")]
    pub business_object_type: Option<String>,
    /// The sales channel for the transaction.
    #[serde(rename = "SalesChannel", skip_serializing_if = "Option::is_none")]
    pub sales_channel: Option<String>,
    #[serde(rename = "Charge", skip_serializing_if = "Option::is_none")]
    pub charge: Option<Box<models::finances_v0::ChargeComponent>>,
    /// A list of fee component information.
    #[serde(rename = "FeeList", skip_serializing_if = "Option::is_none")]
    pub fee_list: Option<Vec<models::finances_v0::FeeComponent>>,
    /// The type of payment.  Possible values:  * Sales
    #[serde(rename = "PaymentAmountType", skip_serializing_if = "Option::is_none")]
    pub payment_amount_type: Option<String>,
    /// A short description of this payment event.
    #[serde(rename = "AmountDescription", skip_serializing_if = "Option::is_none")]
    pub amount_description: Option<String>,
    /// The fulfillment channel.  Possible values:  * AFN - Amazon Fulfillment Network (Fulfillment by Amazon)  * MFN - Merchant Fulfillment Network (self-fulfilled)
    #[serde(rename = "FulfillmentChannel", skip_serializing_if = "Option::is_none")]
    pub fulfillment_channel: Option<String>,
    /// The store name where the event occurred.
    #[serde(rename = "StoreName", skip_serializing_if = "Option::is_none")]
    pub store_name: Option<String>,
}

impl PayWithAmazonEvent {
    /// An event related to the seller's Pay with Amazon account.
    pub fn new() -> PayWithAmazonEvent {
        PayWithAmazonEvent {
            seller_order_id: None,
            transaction_posted_date: None,
            business_object_type: None,
            sales_channel: None,
            charge: None,
            fee_list: None,
            payment_amount_type: None,
            amount_description: None,
            fulfillment_channel: None,
            store_name: None,
        }
    }
}