-
Notifications
You must be signed in to change notification settings - Fork 719
/
TransactionEntries.d.ts
197 lines (169 loc) · 7.58 KB
/
TransactionEntries.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
namespace Treasury {
/**
* TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).
*/
interface TransactionEntry {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'treasury.transaction_entry';
/**
* Change to a FinancialAccount's balance
*/
balance_impact: TransactionEntry.BalanceImpact;
/**
* 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;
/**
* When the TransactionEntry will impact the FinancialAccount's balance.
*/
effective_at: number;
/**
* The FinancialAccount associated with this object.
*/
financial_account: string;
/**
* Token of the flow associated with the TransactionEntry.
*/
flow: string | null;
/**
* Details of the flow associated with the TransactionEntry.
*/
flow_details: TransactionEntry.FlowDetails | null;
/**
* Type of the flow associated with the TransactionEntry.
*/
flow_type: TransactionEntry.FlowType;
/**
* 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 Transaction associated with this object.
*/
transaction: string | Stripe.Treasury.Transaction;
/**
* The specific money movement that generated the TransactionEntry.
*/
type: TransactionEntry.Type;
}
namespace TransactionEntry {
interface BalanceImpact {
/**
* The change made to funds the user can spend right now.
*/
cash: number;
/**
* The change made to funds that are not spendable yet, but will become available at a later time.
*/
inbound_pending: number;
/**
* The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
*/
outbound_pending: number;
}
interface FlowDetails {
/**
* You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
*/
credit_reversal?: Stripe.Treasury.CreditReversal;
/**
* You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
*/
debit_reversal?: Stripe.Treasury.DebitReversal;
/**
* Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
*/
inbound_transfer?: Stripe.Treasury.InboundTransfer;
/**
* When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
* object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
* purchase to be completed successfully.
*
* Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
*/
issuing_authorization?: Stripe.Issuing.Authorization;
/**
* Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
*
* Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
*/
outbound_payment?: Stripe.Treasury.OutboundPayment;
/**
* Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
*
* Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
*/
outbound_transfer?: Stripe.Treasury.OutboundTransfer;
/**
* ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
*/
received_credit?: Stripe.Treasury.ReceivedCredit;
/**
* ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
*/
received_debit?: Stripe.Treasury.ReceivedDebit;
/**
* Type of the flow that created the Transaction. Set to the same value as `flow_type`.
*/
type: FlowDetails.Type;
}
namespace FlowDetails {
type Type =
| 'credit_reversal'
| 'debit_reversal'
| 'inbound_transfer'
| 'issuing_authorization'
| 'other'
| 'outbound_payment'
| 'outbound_transfer'
| 'received_credit'
| 'received_debit';
}
type FlowType =
| 'credit_reversal'
| 'debit_reversal'
| 'inbound_transfer'
| 'issuing_authorization'
| 'other'
| 'outbound_payment'
| 'outbound_transfer'
| 'received_credit'
| 'received_debit';
type Type =
| 'credit_reversal'
| 'credit_reversal_posting'
| 'debit_reversal'
| 'inbound_transfer'
| 'inbound_transfer_return'
| 'issuing_authorization_hold'
| 'issuing_authorization_release'
| 'other'
| 'outbound_payment'
| 'outbound_payment_cancellation'
| 'outbound_payment_failure'
| 'outbound_payment_posting'
| 'outbound_payment_return'
| 'outbound_transfer'
| 'outbound_transfer_cancellation'
| 'outbound_transfer_failure'
| 'outbound_transfer_posting'
| 'outbound_transfer_return'
| 'received_credit'
| 'received_debit';
}
}
}
}