1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* 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 Collected {
/// BalanceUsedCents is how much was covered by prepaid balance.
#[serde(rename = "balanceUsedCents", skip_serializing_if = "Option::is_none")]
pub balance_used_cents: Option<i32>,
/// CardChargedCents is how much was charged to the card on file.
#[serde(rename = "cardChargedCents", skip_serializing_if = "Option::is_none")]
pub card_charged_cents: Option<i32>,
/// CreditUsedCents is how much was covered by credit grants.
#[serde(rename = "creditUsedCents", skip_serializing_if = "Option::is_none")]
pub credit_used_cents: Option<i32>,
/// Invoice is the invoice AFTER the attempt — its status is the authority on what happened, not this struct's other fields.
#[serde(rename = "invoice", skip_serializing_if = "Option::is_none")]
pub invoice: Option<Box<models::Invoice>>,
/// Paid reports whether the invoice is now settled in full. A false here with no error is a DECLINE: the invoice stays open and may be collected again.
#[serde(rename = "paid", skip_serializing_if = "Option::is_none")]
pub paid: Option<bool>,
/// ProcessorRef is the processor's reference for any card charge — the field that proves money moved at the gateway rather than only in our ledger.
#[serde(rename = "processorRef", skip_serializing_if = "Option::is_none")]
pub processor_ref: Option<String>,
/// Reason explains a decline or partial collection. Empty on success.
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
}
impl Collected {
pub fn new() -> Collected {
Collected {
balance_used_cents: None,
card_charged_cents: None,
credit_used_cents: None,
invoice: None,
paid: None,
processor_ref: None,
reason: None,
}
}
}