amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Sellers
 *
 * The [Selling Partner API for Sellers](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) (Sellers API) provides essential information about seller accounts, such as:  - The marketplaces a seller can list in - The default language and currency of a marketplace - Whether the seller has suspended listings  Refer to the [Sellers API reference](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) for details about this API's operations, data types, and schemas.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// Business : Information about the seller's business. Certain fields may be omitted depending on the seller's `businessType`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Business {
    /// The registered business name.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "registeredBusinessAddress")]
    pub registered_business_address: Box<models::sellers::Address>,
    /// The seller's company registration number, if applicable. This field will be absent for individual sellers and sole proprietorships.
    #[serde(rename = "companyRegistrationNumber", skip_serializing_if = "Option::is_none")]
    pub company_registration_number: Option<String>,
    /// The seller's company tax identification number, if applicable. This field will be present for certain business types only, such as sole proprietorships.
    #[serde(rename = "companyTaxIdentificationNumber", skip_serializing_if = "Option::is_none")]
    pub company_tax_identification_number: Option<String>,
    /// The non-Latin script version of the registered business name, if applicable.
    #[serde(rename = "nonLatinName", skip_serializing_if = "Option::is_none")]
    pub non_latin_name: Option<String>,
}

impl Business {
    /// Information about the seller's business. Certain fields may be omitted depending on the seller's `businessType`.
    pub fn new(name: String, registered_business_address: models::sellers::Address) -> Business {
        Business {
            name,
            registered_business_address: Box::new(registered_business_address),
            company_registration_number: None,
            company_tax_identification_number: None,
            non_latin_name: None,
        }
    }
}