• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-go / 11295426688

11 Oct 2024 03:52PM UTC coverage: 62.991% (-0.02%) from 63.015%
11295426688

Pull #1934

github

stripe-openapi[bot]
Merge upstream and update generated code for v1290
Pull Request #1934: Update generated code for beta

0 of 8 new or added lines in 2 files covered. (0.0%)

472 existing lines in 21 files now uncovered.

6209 of 9857 relevant lines covered (62.99%)

15.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/treasury_inboundtransfer.go
1
//
2
//
3
// File generated from our OpenAPI spec
4
//
5
//
6

7
package stripe
8

9
// Reason for the failure.
10
type TreasuryInboundTransferFailureDetailsCode string
11

12
// List of values that TreasuryInboundTransferFailureDetailsCode can take
13
const (
14
        TreasuryInboundTransferFailureDetailsCodeAccountClosed                 TreasuryInboundTransferFailureDetailsCode = "account_closed"
15
        TreasuryInboundTransferFailureDetailsCodeAccountFrozen                 TreasuryInboundTransferFailureDetailsCode = "account_frozen"
16
        TreasuryInboundTransferFailureDetailsCodeBankAccountRestricted         TreasuryInboundTransferFailureDetailsCode = "bank_account_restricted"
17
        TreasuryInboundTransferFailureDetailsCodeBankOwnershipChanged          TreasuryInboundTransferFailureDetailsCode = "bank_ownership_changed"
18
        TreasuryInboundTransferFailureDetailsCodeDebitNotAuthorized            TreasuryInboundTransferFailureDetailsCode = "debit_not_authorized"
19
        TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderAddress TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_address"
20
        TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderName    TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_name"
21
        TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderTaxID   TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_tax_id"
22
        TreasuryInboundTransferFailureDetailsCodeInsufficientFunds             TreasuryInboundTransferFailureDetailsCode = "insufficient_funds"
23
        TreasuryInboundTransferFailureDetailsCodeInvalidAccountNumber          TreasuryInboundTransferFailureDetailsCode = "invalid_account_number"
24
        TreasuryInboundTransferFailureDetailsCodeInvalidCurrency               TreasuryInboundTransferFailureDetailsCode = "invalid_currency"
25
        TreasuryInboundTransferFailureDetailsCodeNoAccount                     TreasuryInboundTransferFailureDetailsCode = "no_account"
26
        TreasuryInboundTransferFailureDetailsCodeOther                         TreasuryInboundTransferFailureDetailsCode = "other"
27
)
28

29
// The type of the payment method used in the InboundTransfer.
30
type TreasuryInboundTransferOriginPaymentMethodDetailsType string
31

32
// List of values that TreasuryInboundTransferOriginPaymentMethodDetailsType can take
33
const (
34
        TreasuryInboundTransferOriginPaymentMethodDetailsTypeUSBankAccount TreasuryInboundTransferOriginPaymentMethodDetailsType = "us_bank_account"
35
)
36

37
// Account holder type: individual or company.
38
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType string
39

40
// List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType can take
41
const (
42
        TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "company"
43
        TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
44
)
45

46
// Account type: checkings or savings. Defaults to checking if omitted.
47
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType string
48

49
// List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType can take
50
const (
51
        TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "checking"
52
        TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeSavings  TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "savings"
53
)
54

55
// The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
56
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork string
57

58
// List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork can take
59
const (
60
        TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetworkACH TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork = "ach"
61
)
62

63
// Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
64
type TreasuryInboundTransferStatus string
65

66
// List of values that TreasuryInboundTransferStatus can take
67
const (
68
        TreasuryInboundTransferStatusCanceled   TreasuryInboundTransferStatus = "canceled"
69
        TreasuryInboundTransferStatusFailed     TreasuryInboundTransferStatus = "failed"
70
        TreasuryInboundTransferStatusProcessing TreasuryInboundTransferStatus = "processing"
71
        TreasuryInboundTransferStatusSucceeded  TreasuryInboundTransferStatus = "succeeded"
72
)
73

74
// Returns a list of InboundTransfers sent from the specified FinancialAccount.
75
type TreasuryInboundTransferListParams struct {
76
        ListParams `form:"*"`
77
        // Specifies which fields in the response should be expanded.
78
        Expand []*string `form:"expand"`
79
        // Returns objects associated with this FinancialAccount.
80
        FinancialAccount *string `form:"financial_account"`
81
        // Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
82
        Status *string `form:"status"`
83
}
84

85
// AddExpand appends a new field to expand.
86
func (p *TreasuryInboundTransferListParams) AddExpand(f string) {
×
87
        p.Expand = append(p.Expand, &f)
×
88
}
×
89

90
// Creates an InboundTransfer.
91
type TreasuryInboundTransferParams struct {
92
        Params `form:"*"`
93
        // Amount (in cents) to be transferred.
94
        Amount *int64 `form:"amount"`
95
        // 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).
96
        Currency *string `form:"currency"`
97
        // An arbitrary string attached to the object. Often useful for displaying to users.
98
        Description *string `form:"description"`
99
        // Specifies which fields in the response should be expanded.
100
        Expand []*string `form:"expand"`
101
        // The FinancialAccount to send funds to.
102
        FinancialAccount *string `form:"financial_account"`
103
        // 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
104
        Metadata map[string]string `form:"metadata"`
105
        // The origin payment method to be debited for the InboundTransfer.
106
        OriginPaymentMethod *string `form:"origin_payment_method"`
107
        // The complete description that appears on your customers' statements. Maximum 10 characters.
108
        StatementDescriptor *string `form:"statement_descriptor"`
109
}
110

111
// AddExpand appends a new field to expand.
112
func (p *TreasuryInboundTransferParams) AddExpand(f string) {
×
113
        p.Expand = append(p.Expand, &f)
×
114
}
×
115

116
// AddMetadata adds a new key-value pair to the Metadata.
117
func (p *TreasuryInboundTransferParams) AddMetadata(key string, value string) {
×
118
        if p.Metadata == nil {
×
119
                p.Metadata = make(map[string]string)
×
120
        }
×
121

122
        p.Metadata[key] = value
×
123
}
124

125
// Cancels an InboundTransfer.
126
type TreasuryInboundTransferCancelParams struct {
127
        Params `form:"*"`
128
        // Specifies which fields in the response should be expanded.
129
        Expand []*string `form:"expand"`
130
}
131

132
// AddExpand appends a new field to expand.
133
func (p *TreasuryInboundTransferCancelParams) AddExpand(f string) {
×
134
        p.Expand = append(p.Expand, &f)
×
135
}
×
136

137
// Confirm an InboundTransfer.
138
type TreasuryInboundTransferConfirmParams struct {
139
        Params `form:"*"`
140
        // Specifies which fields in the response should be expanded.
141
        Expand []*string `form:"expand"`
142
        // Represents the number of seconds after an Inbound Transfer has been committed to our banking partners that the user delays funds availability into the financial account. The maximum allowed delay is 5 days.
143
        FundsAvailabilityDelay *int64 `form:"funds_availability_delay"`
144
}
145

146
// AddExpand appends a new field to expand.
NEW
UNCOV
147
func (p *TreasuryInboundTransferConfirmParams) AddExpand(f string) {
×
NEW
UNCOV
148
        p.Expand = append(p.Expand, &f)
×
NEW
UNCOV
149
}
×
150

151
// Details about this InboundTransfer's failure. Only set when status is `failed`.
152
type TreasuryInboundTransferFailureDetails struct {
153
        // Reason for the failure.
154
        Code TreasuryInboundTransferFailureDetailsCode `json:"code"`
155
}
156
type TreasuryInboundTransferLinkedFlows struct {
157
        // If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
158
        ReceivedDebit string `json:"received_debit"`
159
}
160
type TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails struct {
161
        Address *Address `json:"address"`
162
        // Email address.
163
        Email string `json:"email"`
164
        // Full name.
165
        Name string `json:"name"`
166
}
167
type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount struct {
168
        // Account holder type: individual or company.
169
        AccountHolderType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
170
        // Account type: checkings or savings. Defaults to checking if omitted.
171
        AccountType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
172
        // Name of the bank associated with the bank account.
173
        BankName string `json:"bank_name"`
174
        // Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
175
        Fingerprint string `json:"fingerprint"`
176
        // Last four digits of the bank account number.
177
        Last4 string `json:"last4"`
178
        // ID of the mandate used to make this payment.
179
        Mandate *Mandate `json:"mandate"`
180
        // The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
181
        Network TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork `json:"network"`
182
        // Routing number of the bank account.
183
        RoutingNumber string `json:"routing_number"`
184
}
185

186
// Details about the PaymentMethod for an InboundTransfer.
187
type TreasuryInboundTransferOriginPaymentMethodDetails struct {
188
        BillingDetails *TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails `json:"billing_details"`
189
        // The type of the payment method used in the InboundTransfer.
190
        Type          TreasuryInboundTransferOriginPaymentMethodDetailsType           `json:"type"`
191
        USBankAccount *TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
192
}
193
type TreasuryInboundTransferStatusTransitions struct {
194
        // Timestamp describing when an InboundTransfer changed status to `canceled`.
195
        CanceledAt int64 `json:"canceled_at"`
196
        // Timestamp describing when an InboundTransfer changed status to `failed`.
197
        FailedAt int64 `json:"failed_at"`
198
        // Timestamp describing when an InboundTransfer changed status to `succeeded`.
199
        SucceededAt int64 `json:"succeeded_at"`
200
}
201

202
// Use [InboundTransfers](https://docs.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.
203
//
204
// Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
205
type TreasuryInboundTransfer struct {
206
        APIResource
207
        // Amount (in cents) transferred.
208
        Amount int64 `json:"amount"`
209
        // Returns `true` if the InboundTransfer is able to be canceled.
210
        Cancelable bool `json:"cancelable"`
211
        // Time at which the object was created. Measured in seconds since the Unix epoch.
212
        Created int64 `json:"created"`
213
        // 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).
214
        Currency Currency `json:"currency"`
215
        // An arbitrary string attached to the object. Often useful for displaying to users.
216
        Description string `json:"description"`
217
        // Details about this InboundTransfer's failure. Only set when status is `failed`.
218
        FailureDetails *TreasuryInboundTransferFailureDetails `json:"failure_details"`
219
        // The FinancialAccount that received the funds.
220
        FinancialAccount string `json:"financial_account"`
221
        // A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
222
        HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
223
        // Unique identifier for the object.
224
        ID          string                              `json:"id"`
225
        LinkedFlows *TreasuryInboundTransferLinkedFlows `json:"linked_flows"`
226
        // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
227
        Livemode bool `json:"livemode"`
228
        // 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.
229
        Metadata map[string]string `json:"metadata"`
230
        // String representing the object's type. Objects of the same type share the same value.
231
        Object string `json:"object"`
232
        // The origin payment method to be debited for an InboundTransfer.
233
        OriginPaymentMethod string `json:"origin_payment_method"`
234
        // Details about the PaymentMethod for an InboundTransfer.
235
        OriginPaymentMethodDetails *TreasuryInboundTransferOriginPaymentMethodDetails `json:"origin_payment_method_details"`
236
        // Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
237
        Returned bool `json:"returned"`
238
        // Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
239
        StatementDescriptor string `json:"statement_descriptor"`
240
        // Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
241
        Status            TreasuryInboundTransferStatus             `json:"status"`
242
        StatusTransitions *TreasuryInboundTransferStatusTransitions `json:"status_transitions"`
243
        // The Transaction associated with this object.
244
        Transaction *TreasuryTransaction `json:"transaction"`
245
}
246

247
// TreasuryInboundTransferList is a list of InboundTransfers as retrieved from a list endpoint.
248
type TreasuryInboundTransferList struct {
249
        APIResource
250
        ListMeta
251
        Data []*TreasuryInboundTransfer `json:"data"`
252
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc