late 0.0.1285

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.404.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 GetBalance200Response {
    /// Balance you can transfer now. Negative after a dispute or refund of a top-up that was already spent; transfers are refused while it is negative.
    #[serde(rename = "availableCents", skip_serializing_if = "Option::is_none")]
    pub available_cents: Option<i32>,
    /// Paid card top-ups still on hold. Card top-ups become available after 7 days.
    #[serde(rename = "pendingCents", skip_serializing_if = "Option::is_none")]
    pub pending_cents: Option<i32>,
    /// Card top-ups on hold, each with the time it becomes available.
    #[serde(rename = "pendingReleases", skip_serializing_if = "Option::is_none")]
    pub pending_releases: Option<Vec<models::GetBalance200ResponsePendingReleasesInner>>,
    /// Top-ups started but not paid yet.
    #[serde(rename = "pendingTopupCents", skip_serializing_if = "Option::is_none")]
    pub pending_topup_cents: Option<i32>,
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<Currency>,
    #[serde(rename = "recentTopups", skip_serializing_if = "Option::is_none")]
    pub recent_topups: Option<Vec<models::TreasuryTopup>>,
}

impl GetBalance200Response {
    pub fn new() -> GetBalance200Response {
        GetBalance200Response {
            available_cents: None,
            pending_cents: None,
            pending_releases: None,
            pending_topup_cents: None,
            currency: None,
            recent_topups: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Currency {
    #[serde(rename = "usd")]
    Usd,
}

impl Default for Currency {
    fn default() -> Currency {
        Self::Usd
    }
}