amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Transfers.
 *
 * The Selling Partner API for Transfers enables selling partners to retrieve payment methods and initiate payouts for their seller accounts. This API supports the following marketplaces: DE, FR, IT, ES, SE, NL, PL, and BE.
 *
 * The version of the OpenAPI document: 2024-06-01
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// PaymentMethodDetails : The details of a payment method.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaymentMethodDetails {
    /// The name of the account holder who is registered for the payment method.
    #[serde(rename = "accountHolderName", skip_serializing_if = "Option::is_none")]
    pub account_holder_name: Option<String>,
    /// The payment method identifier.
    #[serde(rename = "paymentMethodId", skip_serializing_if = "Option::is_none")]
    pub payment_method_id: Option<String>,
    /// The last three or four digits of the payment method.
    #[serde(rename = "tail", skip_serializing_if = "Option::is_none")]
    pub tail: Option<String>,
    #[serde(rename = "expiryDate", skip_serializing_if = "Option::is_none")]
    pub expiry_date: Option<Box<models::transfers_2024_06_01::ExpiryDate>>,
    /// The two-letter country code in ISO 3166-1 alpha-2 format. For payment methods in the `card` category, the code is for the country where the card was issued. For payment methods in the `bank account` category, the code is for the country where the account is located.
    #[serde(rename = "countryCode", skip_serializing_if = "Option::is_none")]
    pub country_code: Option<String>,
    #[serde(rename = "paymentMethodType", skip_serializing_if = "Option::is_none")]
    pub payment_method_type: Option<models::transfers_2024_06_01::PaymentMethodType>,
    #[serde(rename = "assignmentType", skip_serializing_if = "Option::is_none")]
    pub assignment_type: Option<models::transfers_2024_06_01::AssignmentType>,
}

impl PaymentMethodDetails {
    /// The details of a payment method.
    pub fn new() -> PaymentMethodDetails {
        PaymentMethodDetails {
            account_holder_name: None,
            payment_method_id: None,
            tail: None,
            expiry_date: None,
            country_code: None,
            payment_method_type: None,
            assignment_type: None,
        }
    }
}