-
Notifications
You must be signed in to change notification settings - Fork 719
/
CustomerCashBalanceTransactions.d.ts
142 lines (117 loc) · 4.86 KB
/
CustomerCashBalanceTransactions.d.ts
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
/**
* Customers with certain payments enabled have a cash balance, representing funds that were paid
* by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions
* represent when funds are moved into or out of this balance. This includes funding by the customer, allocation
* to payments, and refunds to the customer.
*/
interface CustomerCashBalanceTransaction {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'customer_cash_balance_transaction';
applied_to_payment?: CustomerCashBalanceTransaction.AppliedToPayment;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* 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).
*/
currency: string;
/**
* The customer whose available cash balance changed as a result of this transaction.
*/
customer: string | Stripe.Customer;
/**
* The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
*/
ending_balance: number;
funded?: CustomerCashBalanceTransaction.Funded;
/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
*/
livemode: boolean;
/**
* The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
*/
net_amount: number;
refunded_from_payment?: CustomerCashBalanceTransaction.RefundedFromPayment;
/**
* The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
*/
type: CustomerCashBalanceTransaction.Type;
unapplied_from_payment?: CustomerCashBalanceTransaction.UnappliedFromPayment;
}
namespace CustomerCashBalanceTransaction {
interface AppliedToPayment {
/**
* The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
*/
payment_intent: string | Stripe.PaymentIntent;
}
interface Funded {
bank_transfer: Funded.BankTransfer;
}
namespace Funded {
interface BankTransfer {
eu_bank_transfer?: BankTransfer.EuBankTransfer;
/**
* The user-supplied reference field on the bank transfer.
*/
reference: string | null;
/**
* The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
*/
type: BankTransfer.Type;
}
namespace BankTransfer {
interface EuBankTransfer {
/**
* The BIC of the bank of the sender of the funding.
*/
bic: string | null;
/**
* The last 4 digits of the IBAN of the sender of the funding.
*/
iban_last4: string | null;
/**
* The full name of the sender, as supplied by the sending bank.
*/
sender_name: string | null;
}
type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
}
}
interface RefundedFromPayment {
/**
* The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
*/
refund: string | Stripe.Refund;
}
type Type =
| 'applied_to_payment'
| 'funded'
| 'refunded_from_payment'
| 'return_canceled'
| 'return_initiated'
| 'unapplied_from_payment';
interface UnappliedFromPayment {
/**
* The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
*/
payment_intent: string | Stripe.PaymentIntent;
}
}
}
}