amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Direct Fulfillment Payments
 *
 * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// AdditionalDetails : A field where the selling party can provide additional information for tax-related or any other purposes.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdditionalDetails {
    /// The type of the additional information provided by the selling party.
    #[serde(rename = "type")]
    pub r#type: Type,
    /// The detail of the additional information provided by the selling party.
    #[serde(rename = "detail")]
    pub detail: String,
    /// The language code of the additional information detail.
    #[serde(rename = "languageCode", skip_serializing_if = "Option::is_none")]
    pub language_code: Option<String>,
}

impl AdditionalDetails {
    /// A field where the selling party can provide additional information for tax-related or any other purposes.
    pub fn new(r#type: Type, detail: String) -> AdditionalDetails {
        AdditionalDetails {
            r#type,
            detail,
            language_code: None,
        }
    }
}
/// The type of the additional information provided by the selling party.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "SUR")]
    Sur,
    #[serde(rename = "OCR")]
    Ocr,
}

impl Default for Type {
    fn default() -> Type {
        Self::Sur
    }
}