hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PaymentOut {
    /// BalanceCents is the org's balance AFTER this payment, read back from the same key just credited so it matches what the balance endpoint reports.
    #[serde(rename = "balanceCents", skip_serializing_if = "Option::is_none")]
    pub balance_cents: Option<i32>,
    /// ID is the ledger transaction id for the credit. It is what getPayment reads back, and the customer-visible receipt for the money.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// ProcessorRef is the payment processor's own reference for the charge (Square's payment id). It is the field that proves money actually moved at the gateway rather than only in our ledger — the thing to quote when reconciling against a processor dashboard.
    #[serde(rename = "processorRef", skip_serializing_if = "Option::is_none")]
    pub processor_ref: Option<String>,
    /// Status is \"ok\" on a settled charge. A charge that did not settle is an error with the processor's reason, never a status field to inspect.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// Test reports which bucket this credited: true is a SANDBOX charge crediting the test balance, false is live money. It is always stated so a receipt can never be mistaken for the other kind.
    #[serde(rename = "test", skip_serializing_if = "Option::is_none")]
    pub test: Option<bool>,
}

impl PaymentOut {
    pub fn new() -> PaymentOut {
        PaymentOut {
            balance_cents: None,
            id: None,
            processor_ref: None,
            status: None,
            test: None,
        }
    }
}