late 0.0.1372

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.
Documentation
/*
 * 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.572.0
 * 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 TreasuryPayee {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "payeeType", skip_serializing_if = "Option::is_none")]
    pub payee_type: Option<PayeeType>,
    #[serde(rename = "payeeRef", skip_serializing_if = "Option::is_none")]
    pub payee_ref: Option<String>,
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    #[serde(rename = "onboardingStatus", skip_serializing_if = "Option::is_none")]
    pub onboarding_status: Option<OnboardingStatus>,
    #[serde(rename = "detailsSubmitted", skip_serializing_if = "Option::is_none")]
    pub details_submitted: Option<bool>,
    #[serde(rename = "payoutsEnabled", skip_serializing_if = "Option::is_none")]
    pub payouts_enabled: Option<bool>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl TreasuryPayee {
    pub fn new() -> TreasuryPayee {
        TreasuryPayee {
            id: None,
            payee_type: None,
            payee_ref: None,
            country: None,
            onboarding_status: None,
            details_submitted: None,
            payouts_enabled: None,
            created_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PayeeType {
    #[serde(rename = "creator")]
    Creator,
    #[serde(rename = "ad_account")]
    AdAccount,
}

impl Default for PayeeType {
    fn default() -> PayeeType {
        Self::Creator
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OnboardingStatus {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "complete")]
    Complete,
    #[serde(rename = "restricted")]
    Restricted,
}

impl Default for OnboardingStatus {
    fn default() -> OnboardingStatus {
        Self::Pending
    }
}