/*
* 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.129.1
* 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 CreateBrandedCallingEnterpriseRequest {
/// Exactly as on the tax record.
#[serde(rename = "legalName")]
pub legal_name: String,
#[serde(rename = "doingBusinessAs")]
pub doing_business_as: String,
#[serde(rename = "organizationType")]
pub organization_type: OrganizationType,
#[serde(rename = "organizationLegalType")]
pub organization_legal_type: OrganizationLegalType,
/// ISO 3166-1 alpha-2. US or CA.
#[serde(rename = "countryCode")]
pub country_code: String,
/// State, province or country of registration.
#[serde(rename = "jurisdictionOfIncorporation")]
pub jurisdiction_of_incorporation: String,
#[serde(rename = "website")]
pub website: String,
/// US Federal Employer Identification Number (NN-NNNNNNN) or the Canadian equivalent. Stored encrypted; only the last four digits are ever returned.
#[serde(rename = "fein")]
pub fein: String,
/// One of the carrier industry labels, e.g. technology, healthcare, retail, finance, legal, insurance, real estate, logistics, education.
#[serde(rename = "industry")]
pub industry: String,
#[serde(rename = "numberOfEmployees")]
pub number_of_employees: NumberOfEmployees,
#[serde(rename = "organizationContact")]
pub organization_contact: Box<models::BrandedCallingContact>,
#[serde(rename = "billingContact")]
pub billing_contact: Box<models::BrandedCallingContact>,
#[serde(rename = "physicalAddress")]
pub physical_address: Box<models::BrandedCallingAddress>,
#[serde(rename = "billingAddress")]
pub billing_address: Box<models::BrandedCallingAddress>,
}
impl CreateBrandedCallingEnterpriseRequest {
pub fn new(
legal_name: String,
doing_business_as: String,
organization_type: OrganizationType,
organization_legal_type: OrganizationLegalType,
country_code: String,
jurisdiction_of_incorporation: String,
website: String,
fein: String,
industry: String,
number_of_employees: NumberOfEmployees,
organization_contact: models::BrandedCallingContact,
billing_contact: models::BrandedCallingContact,
physical_address: models::BrandedCallingAddress,
billing_address: models::BrandedCallingAddress,
) -> CreateBrandedCallingEnterpriseRequest {
CreateBrandedCallingEnterpriseRequest {
legal_name,
doing_business_as,
organization_type,
organization_legal_type,
country_code,
jurisdiction_of_incorporation,
website,
fein,
industry,
number_of_employees,
organization_contact: Box::new(organization_contact),
billing_contact: Box::new(billing_contact),
physical_address: Box::new(physical_address),
billing_address: Box::new(billing_address),
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrganizationType {
#[serde(rename = "commercial")]
Commercial,
#[serde(rename = "government")]
Government,
#[serde(rename = "non_profit")]
NonProfit,
}
impl Default for OrganizationType {
fn default() -> OrganizationType {
Self::Commercial
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrganizationLegalType {
#[serde(rename = "corporation")]
Corporation,
#[serde(rename = "llc")]
Llc,
#[serde(rename = "partnership")]
Partnership,
#[serde(rename = "nonprofit")]
Nonprofit,
#[serde(rename = "other")]
Other,
}
impl Default for OrganizationLegalType {
fn default() -> OrganizationLegalType {
Self::Corporation
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum NumberOfEmployees {
#[serde(rename = "1-10")]
Variant110,
#[serde(rename = "11-50")]
Variant1150,
#[serde(rename = "51-200")]
Variant51200,
#[serde(rename = "201-500")]
Variant201500,
#[serde(rename = "501-2000")]
Variant5012000,
#[serde(rename = "2001-10000")]
Variant200110000,
#[serde(rename = "10001+")]
Variant10001Plus,
}
impl Default for NumberOfEmployees {
fn default() -> NumberOfEmployees {
Self::Variant110
}
}