late 0.0.1302

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.433.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 GetBalance200Response {
    /// Your balance, including card top-ups paid in the last 7 days (see payoutLockedCents). 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>,
    /// Part of availableCents from card top-ups charged in the last 7 days, net of refunds and disputes. Transfers to payees cannot use it yet; a transfer that needs it answers 409 `payout_funds_locked` with the day it can be sent.
    #[serde(rename = "payoutLockedCents", skip_serializing_if = "Option::is_none")]
    pub payout_locked_cents: Option<i32>,
    /// The card top-ups behind payoutLockedCents, soonest first.
    #[serde(rename = "payoutLocks", skip_serializing_if = "Option::is_none")]
    pub payout_locks: Option<Vec<models::GetBalance200ResponsePayoutLocksInner>>,
    /// Card top-ups paid before 2026-10-29 that were held and are moving to availableCents (within the hour). Always 0 after that.
    #[serde(rename = "pendingCents", skip_serializing_if = "Option::is_none")]
    pub pending_cents: Option<i32>,
    /// The held card top-ups behind pendingCents.
    #[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,
            payout_locked_cents: None,
            payout_locks: 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
    }
}