/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.162.2
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RcsBrandInput {
#[serde(rename = "displayName")]
pub display_name: String,
/// Exactly as on IRS records.
#[serde(rename = "legalName")]
pub legal_name: String,
#[serde(rename = "legalEntityType")]
pub legal_entity_type: LegalEntityType,
#[serde(rename = "organizationType")]
pub organization_type: OrganizationType,
#[serde(rename = "websiteUrl")]
pub website_url: String,
/// US: the EIN, 9 digits, optionally NN-NNNNNNN. Elsewhere: the national tax or company registration id.
#[serde(rename = "taxId")]
pub tax_id: String,
/// EXCHANGE:SYMBOL. Required for PUBLIC_PROFIT.
#[serde(rename = "stockSymbol", skip_serializing_if = "Option::is_none")]
pub stock_symbol: Option<String>,
#[serde(rename = "address")]
pub address: Box<models::RcsBrandInputAddress>,
#[serde(rename = "contact")]
pub contact: Box<models::RcsBrandInputContact>,
}
impl RcsBrandInput {
pub fn new(
display_name: String,
legal_name: String,
legal_entity_type: LegalEntityType,
organization_type: OrganizationType,
website_url: String,
tax_id: String,
address: models::RcsBrandInputAddress,
contact: models::RcsBrandInputContact,
) -> RcsBrandInput {
RcsBrandInput {
display_name,
legal_name,
legal_entity_type,
organization_type,
website_url,
tax_id,
stock_symbol: None,
address: Box::new(address),
contact: Box::new(contact),
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LegalEntityType {
#[serde(rename = "LIMITED_LIABILITY_COMPANY")]
LimitedLiabilityCompany,
#[serde(rename = "SOLE_PROPRIETORSHIP")]
SoleProprietorship,
#[serde(rename = "PARTNERSHIP")]
Partnership,
#[serde(rename = "CORPORATION")]
Corporation,
#[serde(rename = "S_CORPORATION")]
SCorporation,
}
impl Default for LegalEntityType {
fn default() -> LegalEntityType {
Self::LimitedLiabilityCompany
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrganizationType {
#[serde(rename = "PRIVATE_PROFIT")]
PrivateProfit,
#[serde(rename = "PUBLIC_PROFIT")]
PublicProfit,
#[serde(rename = "NON_PROFIT")]
NonProfit,
#[serde(rename = "GOVERNMENT")]
Government,
}
impl Default for OrganizationType {
fn default() -> OrganizationType {
Self::PrivateProfit
}
}