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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// ======================================
// This file was automatically generated.
// ======================================
use serde_derive::{Deserialize, Serialize};
use crate::ids::IssuingSettlementId;
use crate::params::{Metadata, Object, Timestamp};
use crate::resources::Currency;
/// The resource representing a Stripe "IssuingSettlement".
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct IssuingSettlement {
/// Unique identifier for the object.
pub id: IssuingSettlementId,
/// The Bank Identification Number reflecting this settlement record.
pub bin: String,
/// The date that the transactions are cleared and posted to user's accounts.
pub clearing_date: Timestamp,
/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
pub created: Timestamp,
/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
///
/// Must be a [supported currency](https://stripe.com/docs/currencies).
pub currency: Currency,
/// The total interchange received as reimbursement for the transactions.
pub interchange_fees: i64,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
///
/// This can be useful for storing additional information about the object in a structured format.
pub metadata: Metadata,
/// The total net amount required to settle with the network.
pub net_total: i64,
/// The card network for this settlement report.
///
/// One of ["visa"].
pub network: IssuingSettlementNetwork,
/// The total amount of fees owed to the network.
pub network_fees: i64,
/// The Settlement Identification Number assigned by the network.
pub network_settlement_identifier: String,
/// One of `international` or `uk_national_net`.
pub settlement_service: String,
/// The total number of transactions reflected in this settlement.
pub transaction_count: u64,
/// The total transaction amount reflected in this settlement.
pub transaction_volume: i64,
}
impl Object for IssuingSettlement {
type Id = IssuingSettlementId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"issuing.settlement"
}
}
/// An enum representing the possible values of an `IssuingSettlement`'s `network` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum IssuingSettlementNetwork {
Visa,
}
impl IssuingSettlementNetwork {
pub fn as_str(self) -> &'static str {
match self {
IssuingSettlementNetwork::Visa => "visa",
}
}
}
impl AsRef<str> for IssuingSettlementNetwork {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for IssuingSettlementNetwork {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}