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

stripe / stripe-java / #16380

30 Aug 2024 07:54PM UTC coverage: 12.882% (-0.004%) from 12.886%
#16380

push

github

web-flow
Merge from master after the changes to not pass api_mode from individual methods (#1857)

* Generate SDK for OpenAPI spec version 1230 (#1856)

* Bump version to 26.9.0

* No need for APIMode to be passed around from individual API methods (#1855)

* Generated code

* Update the code around raw request

* Update the v2 tests to use v2 path

16 of 23 new or added lines in 7 files covered. (69.57%)

706 existing lines in 213 files now uncovered.

18468 of 143365 relevant lines covered (12.88%)

0.13 hits per line

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

32.7
/src/main/java/com/stripe/model/Charge.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.net.ApiRequest;
7
import com.stripe.net.ApiRequestParams;
8
import com.stripe.net.ApiResource;
9
import com.stripe.net.BaseAddress;
10
import com.stripe.net.RequestOptions;
11
import com.stripe.net.StripeResponseGetter;
12
import com.stripe.param.ChargeCaptureParams;
13
import com.stripe.param.ChargeCreateParams;
14
import com.stripe.param.ChargeListParams;
15
import com.stripe.param.ChargeRetrieveParams;
16
import com.stripe.param.ChargeSearchParams;
17
import com.stripe.param.ChargeUpdateParams;
18
import java.util.List;
19
import java.util.Map;
20
import lombok.EqualsAndHashCode;
21
import lombok.Getter;
22
import lombok.Setter;
23

24
/**
25
 * The {@code Charge} object represents a single attempt to move money into your Stripe account.
26
 * PaymentIntent confirmation is the most common way to create Charges, but transferring money to a
27
 * different Stripe account through Connect also creates Charges. Some legacy payment flows create
28
 * Charges directly, which is not recommended for new integrations.
29
 */
30
@Getter
31
@Setter
32
@EqualsAndHashCode(callSuper = false)
33
public class Charge extends ApiResource implements MetadataStore<Charge>, BalanceTransactionSource {
1✔
34
  /**
35
   * Amount intended to be collected by this payment. A positive integer representing how much to
36
   * charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency
37
   * unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The
38
   * minimum amount is $0.50 US or <a
39
   * href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in
40
   * charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999
41
   * for a USD charge of $999,999.99).
42
   */
43
  @SerializedName("amount")
44
  Long amount;
45

46
  /**
47
   * Amount in cents (or local equivalent) captured (can be less than the amount attribute on the
48
   * charge if a partial capture was made).
49
   */
50
  @SerializedName("amount_captured")
51
  Long amountCaptured;
52

53
  /**
54
   * Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the
55
   * charge if a partial refund was issued).
56
   */
57
  @SerializedName("amount_refunded")
58
  Long amountRefunded;
59

60
  /** ID of the Connect application that created the charge. */
61
  @SerializedName("application")
62
  @Getter(lombok.AccessLevel.NONE)
63
  @Setter(lombok.AccessLevel.NONE)
64
  ExpandableField<Application> application;
65

66
  /**
67
   * The application fee (if any) for the charge. <a
68
   * href="https://stripe.com/docs/connect/direct-charges#collect-fees">See the Connect
69
   * documentation</a> for details.
70
   */
71
  @SerializedName("application_fee")
72
  @Getter(lombok.AccessLevel.NONE)
73
  @Setter(lombok.AccessLevel.NONE)
74
  ExpandableField<ApplicationFee> applicationFee;
75

76
  /**
77
   * The amount of the application fee (if any) requested for the charge. <a
78
   * href="https://stripe.com/docs/connect/direct-charges#collect-fees">See the Connect
79
   * documentation</a> for details.
80
   */
81
  @SerializedName("application_fee_amount")
82
  Long applicationFeeAmount;
83

84
  /** Authorization code on the charge. */
85
  @SerializedName("authorization_code")
86
  String authorizationCode;
87

88
  /**
89
   * ID of the balance transaction that describes the impact of this charge on your account balance
90
   * (not including refunds or disputes).
91
   */
92
  @SerializedName("balance_transaction")
93
  @Getter(lombok.AccessLevel.NONE)
94
  @Setter(lombok.AccessLevel.NONE)
95
  ExpandableField<BalanceTransaction> balanceTransaction;
96

97
  @SerializedName("billing_details")
98
  BillingDetails billingDetails;
99

100
  /**
101
   * The full statement descriptor that is passed to card networks, and that is displayed on your
102
   * customers' credit card and bank statements. Allows you to see what the statement descriptor
103
   * looks like after the static and dynamic portions are combined. This value only exists for card
104
   * payments.
105
   */
106
  @SerializedName("calculated_statement_descriptor")
107
  String calculatedStatementDescriptor;
108

109
  /**
110
   * If the charge was created without capturing, this Boolean represents whether it is still
111
   * uncaptured or has since been captured.
112
   */
113
  @SerializedName("captured")
114
  Boolean captured;
115

116
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
117
  @SerializedName("created")
118
  Long created;
119

120
  /**
121
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
122
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
123
   */
124
  @SerializedName("currency")
125
  String currency;
126

127
  /** ID of the customer this charge is for if one exists. */
128
  @SerializedName("customer")
129
  @Getter(lombok.AccessLevel.NONE)
130
  @Setter(lombok.AccessLevel.NONE)
131
  ExpandableField<Customer> customer;
132

133
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
134
  @SerializedName("description")
135
  String description;
136

137
  /** Whether the charge has been disputed. */
138
  @SerializedName("disputed")
139
  Boolean disputed;
140

141
  /**
142
   * ID of the balance transaction that describes the reversal of the balance on your account due to
143
   * payment failure.
144
   */
145
  @SerializedName("failure_balance_transaction")
146
  @Getter(lombok.AccessLevel.NONE)
147
  @Setter(lombok.AccessLevel.NONE)
148
  ExpandableField<BalanceTransaction> failureBalanceTransaction;
149

150
  /**
151
   * Error code explaining reason for charge failure if available (see <a
152
   * href="https://stripe.com/docs/error-codes">the errors section</a> for a list of codes).
153
   */
154
  @SerializedName("failure_code")
155
  String failureCode;
156

157
  /** Message to user further explaining reason for charge failure if available. */
158
  @SerializedName("failure_message")
159
  String failureMessage;
160

161
  /** Information on fraud assessments for the charge. */
162
  @SerializedName("fraud_details")
163
  FraudDetails fraudDetails;
164

165
  /** Unique identifier for the object. */
166
  @Getter(onMethod_ = {@Override})
167
  @SerializedName("id")
168
  String id;
169

170
  /** ID of the invoice this charge is for if one exists. */
171
  @SerializedName("invoice")
172
  @Getter(lombok.AccessLevel.NONE)
173
  @Setter(lombok.AccessLevel.NONE)
174
  ExpandableField<Invoice> invoice;
175

176
  @SerializedName("level3")
177
  Level3 level3;
178

179
  /**
180
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
181
   * object exists in test mode.
182
   */
183
  @SerializedName("livemode")
184
  Boolean livemode;
185

186
  /**
187
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
188
   * to an object. This can be useful for storing additional information about the object in a
189
   * structured format.
190
   */
191
  @Getter(onMethod_ = {@Override})
192
  @SerializedName("metadata")
193
  Map<String, String> metadata;
194

195
  /**
196
   * String representing the object's type. Objects of the same type share the same value.
197
   *
198
   * <p>Equal to {@code charge}.
199
   */
200
  @SerializedName("object")
201
  String object;
202

203
  /**
204
   * The account (if any) the charge was made on behalf of without triggering an automatic transfer.
205
   * See the <a href="https://stripe.com/docs/connect/separate-charges-and-transfers">Connect
206
   * documentation</a> for details.
207
   */
208
  @SerializedName("on_behalf_of")
209
  @Getter(lombok.AccessLevel.NONE)
210
  @Setter(lombok.AccessLevel.NONE)
211
  ExpandableField<Account> onBehalfOf;
212

213
  /**
214
   * Details about whether the payment was accepted, and why. See <a
215
   * href="https://stripe.com/docs/declines">understanding declines</a> for details.
216
   */
217
  @SerializedName("outcome")
218
  Outcome outcome;
219

220
  /** {@code true} if the charge succeeded, or was successfully authorized for later capture. */
221
  @SerializedName("paid")
222
  Boolean paid;
223

224
  /** ID of the PaymentIntent associated with this charge, if one exists. */
225
  @SerializedName("payment_intent")
226
  @Getter(lombok.AccessLevel.NONE)
227
  @Setter(lombok.AccessLevel.NONE)
228
  ExpandableField<PaymentIntent> paymentIntent;
229

230
  /** ID of the payment method used in this charge. */
231
  @SerializedName("payment_method")
232
  String paymentMethod;
233

234
  /** Details about the payment method at the time of the transaction. */
235
  @SerializedName("payment_method_details")
236
  PaymentMethodDetails paymentMethodDetails;
237

238
  /**
239
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
240
   * Session</a> for more information.
241
   */
242
  @SerializedName("radar_options")
243
  RadarOptions radarOptions;
244

245
  /** This is the email address that the receipt for this charge was sent to. */
246
  @SerializedName("receipt_email")
247
  String receiptEmail;
248

249
  /**
250
   * This is the transaction number that appears on email receipts sent for this charge. This
251
   * attribute will be {@code null} until a receipt has been sent.
252
   */
253
  @SerializedName("receipt_number")
254
  String receiptNumber;
255

256
  /**
257
   * This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the
258
   * latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt
259
   * will be stylized as an Invoice receipt.
260
   */
261
  @SerializedName("receipt_url")
262
  String receiptUrl;
263

264
  /**
265
   * Whether the charge has been fully refunded. If the charge is only partially refunded, this
266
   * attribute will still be false.
267
   */
268
  @SerializedName("refunded")
269
  Boolean refunded;
270

271
  /** A list of refunds that have been applied to the charge. */
272
  @SerializedName("refunds")
273
  RefundCollection refunds;
274

275
  /** ID of the review associated with this charge if one exists. */
276
  @SerializedName("review")
277
  @Getter(lombok.AccessLevel.NONE)
278
  @Setter(lombok.AccessLevel.NONE)
279
  ExpandableField<Review> review;
280

281
  /** Shipping information for the charge. */
282
  @SerializedName("shipping")
283
  ShippingDetails shipping;
284

285
  /**
286
   * This is a legacy field that will be removed in the future. It contains the Source, Card, or
287
   * BankAccount object used for the charge. For details about the payment method used for this
288
   * charge, refer to {@code payment_method} or {@code payment_method_details} instead.
289
   */
290
  @SerializedName("source")
291
  PaymentSource source;
292

293
  /**
294
   * The transfer ID which created this charge. Only present if the charge came from another Stripe
295
   * account. <a href="https://docs.stripe.com/connect/destination-charges">See the Connect
296
   * documentation</a> for details.
297
   */
298
  @SerializedName("source_transfer")
299
  @Getter(lombok.AccessLevel.NONE)
300
  @Setter(lombok.AccessLevel.NONE)
301
  ExpandableField<Transfer> sourceTransfer;
302

303
  /**
304
   * For a non-card charge, text that appears on the customer's statement as the statement
305
   * descriptor. This value overrides the account's default statement descriptor. For information
306
   * about requirements, including the 22-character limit, see <a
307
   * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
308
   * Descriptor docs</a>.
309
   *
310
   * <p>For a card charge, this value is ignored unless you don't specify a {@code
311
   * statement_descriptor_suffix}, in which case this value is used as the suffix.
312
   */
313
  @SerializedName("statement_descriptor")
314
  String statementDescriptor;
315

316
  /**
317
   * Provides information about a card charge. Concatenated to the account's <a
318
   * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
319
   * descriptor prefix</a> to form the complete statement descriptor that appears on the customer's
320
   * statement. If the account has no prefix value, the suffix is concatenated to the account's
321
   * statement descriptor.
322
   */
323
  @SerializedName("statement_descriptor_suffix")
324
  String statementDescriptorSuffix;
325

326
  /**
327
   * The status of the payment is either {@code succeeded}, {@code pending}, or {@code failed}.
328
   *
329
   * <p>One of {@code failed}, {@code pending}, or {@code succeeded}.
330
   */
331
  @SerializedName("status")
332
  String status;
333

334
  /**
335
   * ID of the transfer to the {@code destination} account (only applicable if the charge was
336
   * created using the {@code destination} parameter).
337
   */
338
  @SerializedName("transfer")
339
  @Getter(lombok.AccessLevel.NONE)
340
  @Setter(lombok.AccessLevel.NONE)
341
  ExpandableField<Transfer> transfer;
342

343
  /**
344
   * An optional dictionary including the account to automatically transfer to as part of a
345
   * destination charge. <a href="https://stripe.com/docs/connect/destination-charges">See the
346
   * Connect documentation</a> for details.
347
   */
348
  @SerializedName("transfer_data")
349
  TransferData transferData;
350

351
  /**
352
   * A string that identifies this transaction as part of a group. See the <a
353
   * href="https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options">Connect
354
   * documentation</a> for details.
355
   */
356
  @SerializedName("transfer_group")
357
  String transferGroup;
358

359
  /** Get ID of expandable {@code application} object. */
360
  public String getApplication() {
361
    return (this.application != null) ? this.application.getId() : null;
1✔
362
  }
363

364
  public void setApplication(String id) {
365
    this.application = ApiResource.setExpandableFieldId(id, this.application);
×
366
  }
×
367

368
  /** Get expanded {@code application}. */
369
  public Application getApplicationObject() {
370
    return (this.application != null) ? this.application.getExpanded() : null;
1✔
371
  }
372

373
  public void setApplicationObject(Application expandableObject) {
374
    this.application = new ExpandableField<Application>(expandableObject.getId(), expandableObject);
×
375
  }
×
376

377
  /** Get ID of expandable {@code applicationFee} object. */
378
  public String getApplicationFee() {
379
    return (this.applicationFee != null) ? this.applicationFee.getId() : null;
×
380
  }
381

382
  public void setApplicationFee(String id) {
383
    this.applicationFee = ApiResource.setExpandableFieldId(id, this.applicationFee);
×
384
  }
×
385

386
  /** Get expanded {@code applicationFee}. */
387
  public ApplicationFee getApplicationFeeObject() {
388
    return (this.applicationFee != null) ? this.applicationFee.getExpanded() : null;
1✔
389
  }
390

391
  public void setApplicationFeeObject(ApplicationFee expandableObject) {
392
    this.applicationFee =
×
393
        new ExpandableField<ApplicationFee>(expandableObject.getId(), expandableObject);
×
394
  }
×
395

396
  /** Get ID of expandable {@code balanceTransaction} object. */
397
  public String getBalanceTransaction() {
398
    return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
1✔
399
  }
400

401
  public void setBalanceTransaction(String id) {
402
    this.balanceTransaction = ApiResource.setExpandableFieldId(id, this.balanceTransaction);
×
403
  }
×
404

405
  /** Get expanded {@code balanceTransaction}. */
406
  public BalanceTransaction getBalanceTransactionObject() {
407
    return (this.balanceTransaction != null) ? this.balanceTransaction.getExpanded() : null;
1✔
408
  }
409

410
  public void setBalanceTransactionObject(BalanceTransaction expandableObject) {
411
    this.balanceTransaction =
×
412
        new ExpandableField<BalanceTransaction>(expandableObject.getId(), expandableObject);
×
413
  }
×
414

415
  /** Get ID of expandable {@code customer} object. */
416
  public String getCustomer() {
417
    return (this.customer != null) ? this.customer.getId() : null;
1✔
418
  }
419

420
  public void setCustomer(String id) {
421
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
422
  }
×
423

424
  /** Get expanded {@code customer}. */
425
  public Customer getCustomerObject() {
426
    return (this.customer != null) ? this.customer.getExpanded() : null;
1✔
427
  }
428

429
  public void setCustomerObject(Customer expandableObject) {
430
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
431
  }
×
432

433
  /** Get ID of expandable {@code failureBalanceTransaction} object. */
434
  public String getFailureBalanceTransaction() {
435
    return (this.failureBalanceTransaction != null) ? this.failureBalanceTransaction.getId() : null;
×
436
  }
437

438
  public void setFailureBalanceTransaction(String id) {
439
    this.failureBalanceTransaction =
×
440
        ApiResource.setExpandableFieldId(id, this.failureBalanceTransaction);
×
441
  }
×
442

443
  /** Get expanded {@code failureBalanceTransaction}. */
444
  public BalanceTransaction getFailureBalanceTransactionObject() {
445
    return (this.failureBalanceTransaction != null)
×
446
        ? this.failureBalanceTransaction.getExpanded()
×
447
        : null;
×
448
  }
449

450
  public void setFailureBalanceTransactionObject(BalanceTransaction expandableObject) {
451
    this.failureBalanceTransaction =
×
452
        new ExpandableField<BalanceTransaction>(expandableObject.getId(), expandableObject);
×
453
  }
×
454

455
  /** Get ID of expandable {@code invoice} object. */
456
  public String getInvoice() {
457
    return (this.invoice != null) ? this.invoice.getId() : null;
1✔
458
  }
459

460
  public void setInvoice(String id) {
461
    this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
462
  }
×
463

464
  /** Get expanded {@code invoice}. */
465
  public Invoice getInvoiceObject() {
466
    return (this.invoice != null) ? this.invoice.getExpanded() : null;
1✔
467
  }
468

469
  public void setInvoiceObject(Invoice expandableObject) {
470
    this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
471
  }
×
472

473
  /** Get ID of expandable {@code onBehalfOf} object. */
474
  public String getOnBehalfOf() {
475
    return (this.onBehalfOf != null) ? this.onBehalfOf.getId() : null;
1✔
476
  }
477

478
  public void setOnBehalfOf(String id) {
479
    this.onBehalfOf = ApiResource.setExpandableFieldId(id, this.onBehalfOf);
×
480
  }
×
481

482
  /** Get expanded {@code onBehalfOf}. */
483
  public Account getOnBehalfOfObject() {
484
    return (this.onBehalfOf != null) ? this.onBehalfOf.getExpanded() : null;
1✔
485
  }
486

487
  public void setOnBehalfOfObject(Account expandableObject) {
488
    this.onBehalfOf = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
489
  }
×
490

491
  /** Get ID of expandable {@code paymentIntent} object. */
492
  public String getPaymentIntent() {
493
    return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
×
494
  }
495

496
  public void setPaymentIntent(String id) {
497
    this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
×
498
  }
×
499

500
  /** Get expanded {@code paymentIntent}. */
501
  public PaymentIntent getPaymentIntentObject() {
502
    return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
×
503
  }
504

505
  public void setPaymentIntentObject(PaymentIntent expandableObject) {
506
    this.paymentIntent =
×
507
        new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
×
508
  }
×
509

510
  /** Get ID of expandable {@code review} object. */
511
  public String getReview() {
512
    return (this.review != null) ? this.review.getId() : null;
1✔
513
  }
514

515
  public void setReview(String id) {
516
    this.review = ApiResource.setExpandableFieldId(id, this.review);
×
517
  }
×
518

519
  /** Get expanded {@code review}. */
520
  public Review getReviewObject() {
521
    return (this.review != null) ? this.review.getExpanded() : null;
1✔
522
  }
523

524
  public void setReviewObject(Review expandableObject) {
525
    this.review = new ExpandableField<Review>(expandableObject.getId(), expandableObject);
×
526
  }
×
527

528
  /** Get ID of expandable {@code sourceTransfer} object. */
529
  public String getSourceTransfer() {
530
    return (this.sourceTransfer != null) ? this.sourceTransfer.getId() : null;
1✔
531
  }
532

533
  public void setSourceTransfer(String id) {
534
    this.sourceTransfer = ApiResource.setExpandableFieldId(id, this.sourceTransfer);
×
535
  }
×
536

537
  /** Get expanded {@code sourceTransfer}. */
538
  public Transfer getSourceTransferObject() {
539
    return (this.sourceTransfer != null) ? this.sourceTransfer.getExpanded() : null;
1✔
540
  }
541

542
  public void setSourceTransferObject(Transfer expandableObject) {
543
    this.sourceTransfer = new ExpandableField<Transfer>(expandableObject.getId(), expandableObject);
×
544
  }
×
545

546
  /** Get ID of expandable {@code transfer} object. */
547
  public String getTransfer() {
548
    return (this.transfer != null) ? this.transfer.getId() : null;
1✔
549
  }
550

551
  public void setTransfer(String id) {
552
    this.transfer = ApiResource.setExpandableFieldId(id, this.transfer);
×
553
  }
×
554

555
  /** Get expanded {@code transfer}. */
556
  public Transfer getTransferObject() {
557
    return (this.transfer != null) ? this.transfer.getExpanded() : null;
1✔
558
  }
559

560
  public void setTransferObject(Transfer expandableObject) {
561
    this.transfer = new ExpandableField<Transfer>(expandableObject.getId(), expandableObject);
×
562
  }
×
563

564
  /**
565
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
566
   * option set to false.
567
   *
568
   * <p>Uncaptured payments expire a set number of days after they are created (<a
569
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
570
   * marked as refunded and capture attempts will fail.
571
   *
572
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
573
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
574
   */
575
  public Charge capture() throws StripeException {
576
    return capture((Map<String, Object>) null, (RequestOptions) null);
×
577
  }
578

579
  /**
580
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
581
   * option set to false.
582
   *
583
   * <p>Uncaptured payments expire a set number of days after they are created (<a
584
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
585
   * marked as refunded and capture attempts will fail.
586
   *
587
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
588
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
589
   */
590
  public Charge capture(RequestOptions options) throws StripeException {
591
    return capture((Map<String, Object>) null, options);
×
592
  }
593

594
  /**
595
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
596
   * option set to false.
597
   *
598
   * <p>Uncaptured payments expire a set number of days after they are created (<a
599
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
600
   * marked as refunded and capture attempts will fail.
601
   *
602
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
603
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
604
   */
605
  public Charge capture(Map<String, Object> params) throws StripeException {
606
    return capture(params, (RequestOptions) null);
×
607
  }
608

609
  /**
610
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
611
   * option set to false.
612
   *
613
   * <p>Uncaptured payments expire a set number of days after they are created (<a
614
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
615
   * marked as refunded and capture attempts will fail.
616
   *
617
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
618
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
619
   */
620
  public Charge capture(Map<String, Object> params, RequestOptions options) throws StripeException {
621
    String path = String.format("/v1/charges/%s/capture", ApiResource.urlEncodeId(this.getId()));
×
622
    ApiRequest request =
×
623
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
UNCOV
624
    return getResponseGetter().request(request, Charge.class);
×
625
  }
626

627
  /**
628
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
629
   * option set to false.
630
   *
631
   * <p>Uncaptured payments expire a set number of days after they are created (<a
632
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
633
   * marked as refunded and capture attempts will fail.
634
   *
635
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
636
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
637
   */
638
  public Charge capture(ChargeCaptureParams params) throws StripeException {
639
    return capture(params, (RequestOptions) null);
1✔
640
  }
641

642
  /**
643
   * Capture the payment of an existing, uncaptured charge that was created with the {@code capture}
644
   * option set to false.
645
   *
646
   * <p>Uncaptured payments expire a set number of days after they are created (<a
647
   * href="https://stripe.com/docs/charges/placing-a-hold">7 by default</a>), after which they are
648
   * marked as refunded and capture attempts will fail.
649
   *
650
   * <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a
651
   * href="https://stripe.com/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.
652
   */
653
  public Charge capture(ChargeCaptureParams params, RequestOptions options) throws StripeException {
654
    String path = String.format("/v1/charges/%s/capture", ApiResource.urlEncodeId(this.getId()));
1✔
655
    ApiResource.checkNullTypedParams(path, params);
1✔
656
    ApiRequest request =
1✔
657
        new ApiRequest(
658
            BaseAddress.API,
659
            ApiResource.RequestMethod.POST,
660
            path,
661
            ApiRequestParams.paramsToMap(params),
1✔
662
            options);
663
    return getResponseGetter().request(request, Charge.class);
1✔
664
  }
665

666
  /**
667
   * This method is no longer recommended—use the <a
668
   * href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
669
   * payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
670
   * request payment.
671
   */
672
  public static Charge create(Map<String, Object> params) throws StripeException {
673
    return create(params, (RequestOptions) null);
1✔
674
  }
675

676
  /**
677
   * This method is no longer recommended—use the <a
678
   * href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
679
   * payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
680
   * request payment.
681
   */
682
  public static Charge create(Map<String, Object> params, RequestOptions options)
683
      throws StripeException {
684
    String path = "/v1/charges";
1✔
685
    ApiRequest request =
1✔
686
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
687
    return getGlobalResponseGetter().request(request, Charge.class);
1✔
688
  }
689

690
  /**
691
   * This method is no longer recommended—use the <a
692
   * href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
693
   * payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
694
   * request payment.
695
   */
696
  public static Charge create(ChargeCreateParams params) throws StripeException {
697
    return create(params, (RequestOptions) null);
1✔
698
  }
699

700
  /**
701
   * This method is no longer recommended—use the <a
702
   * href="https://stripe.com/docs/api/payment_intents">Payment Intents API</a> to initiate a new
703
   * payment instead. Confirmation of the PaymentIntent creates the {@code Charge} object used to
704
   * request payment.
705
   */
706
  public static Charge create(ChargeCreateParams params, RequestOptions options)
707
      throws StripeException {
708
    String path = "/v1/charges";
1✔
709
    ApiResource.checkNullTypedParams(path, params);
1✔
710
    ApiRequest request =
1✔
711
        new ApiRequest(
712
            BaseAddress.API,
713
            ApiResource.RequestMethod.POST,
714
            path,
715
            ApiRequestParams.paramsToMap(params),
1✔
716
            options);
717
    return getGlobalResponseGetter().request(request, Charge.class);
1✔
718
  }
719

720
  /**
721
   * Returns a list of charges you’ve previously created. The charges are returned in sorted order,
722
   * with the most recent charges appearing first.
723
   */
724
  public static ChargeCollection list(Map<String, Object> params) throws StripeException {
725
    return list(params, (RequestOptions) null);
1✔
726
  }
727

728
  /**
729
   * Returns a list of charges you’ve previously created. The charges are returned in sorted order,
730
   * with the most recent charges appearing first.
731
   */
732
  public static ChargeCollection list(Map<String, Object> params, RequestOptions options)
733
      throws StripeException {
734
    String path = "/v1/charges";
1✔
735
    ApiRequest request =
1✔
736
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
737
    return getGlobalResponseGetter().request(request, ChargeCollection.class);
1✔
738
  }
739

740
  /**
741
   * Returns a list of charges you’ve previously created. The charges are returned in sorted order,
742
   * with the most recent charges appearing first.
743
   */
744
  public static ChargeCollection list(ChargeListParams params) throws StripeException {
745
    return list(params, (RequestOptions) null);
1✔
746
  }
747

748
  /**
749
   * Returns a list of charges you’ve previously created. The charges are returned in sorted order,
750
   * with the most recent charges appearing first.
751
   */
752
  public static ChargeCollection list(ChargeListParams params, RequestOptions options)
753
      throws StripeException {
754
    String path = "/v1/charges";
1✔
755
    ApiResource.checkNullTypedParams(path, params);
1✔
756
    ApiRequest request =
1✔
757
        new ApiRequest(
758
            BaseAddress.API,
759
            ApiResource.RequestMethod.GET,
760
            path,
761
            ApiRequestParams.paramsToMap(params),
1✔
762
            options);
763
    return getGlobalResponseGetter().request(request, ChargeCollection.class);
1✔
764
  }
765

766
  /**
767
   * Retrieves the details of a charge that has previously been created. Supply the unique charge ID
768
   * that was returned from your previous request, and Stripe will return the corresponding charge
769
   * information. The same information is returned when creating or refunding the charge.
770
   */
771
  public static Charge retrieve(String charge) throws StripeException {
772
    return retrieve(charge, (Map<String, Object>) null, (RequestOptions) null);
1✔
773
  }
774

775
  /**
776
   * Retrieves the details of a charge that has previously been created. Supply the unique charge ID
777
   * that was returned from your previous request, and Stripe will return the corresponding charge
778
   * information. The same information is returned when creating or refunding the charge.
779
   */
780
  public static Charge retrieve(String charge, RequestOptions options) throws StripeException {
781
    return retrieve(charge, (Map<String, Object>) null, options);
×
782
  }
783

784
  /**
785
   * Retrieves the details of a charge that has previously been created. Supply the unique charge ID
786
   * that was returned from your previous request, and Stripe will return the corresponding charge
787
   * information. The same information is returned when creating or refunding the charge.
788
   */
789
  public static Charge retrieve(String charge, Map<String, Object> params, RequestOptions options)
790
      throws StripeException {
791
    String path = String.format("/v1/charges/%s", ApiResource.urlEncodeId(charge));
1✔
792
    ApiRequest request =
1✔
793
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
794
    return getGlobalResponseGetter().request(request, Charge.class);
1✔
795
  }
796

797
  /**
798
   * Retrieves the details of a charge that has previously been created. Supply the unique charge ID
799
   * that was returned from your previous request, and Stripe will return the corresponding charge
800
   * information. The same information is returned when creating or refunding the charge.
801
   */
802
  public static Charge retrieve(String charge, ChargeRetrieveParams params, RequestOptions options)
803
      throws StripeException {
804
    String path = String.format("/v1/charges/%s", ApiResource.urlEncodeId(charge));
×
805
    ApiResource.checkNullTypedParams(path, params);
×
806
    ApiRequest request =
×
807
        new ApiRequest(
808
            BaseAddress.API,
809
            ApiResource.RequestMethod.GET,
810
            path,
811
            ApiRequestParams.paramsToMap(params),
×
812
            options);
UNCOV
813
    return getGlobalResponseGetter().request(request, Charge.class);
×
814
  }
815

816
  /**
817
   * Search for charges you’ve previously created using Stripe’s <a
818
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
819
   * use search in read-after-write flows where strict consistency is necessary. Under normal
820
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
821
   * new or updated data can be up to an hour behind during outages. Search functionality is not
822
   * available to merchants in India.
823
   */
824
  public static ChargeSearchResult search(Map<String, Object> params) throws StripeException {
825
    return search(params, (RequestOptions) null);
×
826
  }
827

828
  /**
829
   * Search for charges you’ve previously created using Stripe’s <a
830
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
831
   * use search in read-after-write flows where strict consistency is necessary. Under normal
832
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
833
   * new or updated data can be up to an hour behind during outages. Search functionality is not
834
   * available to merchants in India.
835
   */
836
  public static ChargeSearchResult search(Map<String, Object> params, RequestOptions options)
837
      throws StripeException {
838
    String path = "/v1/charges/search";
×
839
    ApiRequest request =
×
840
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
UNCOV
841
    return getGlobalResponseGetter().request(request, ChargeSearchResult.class);
×
842
  }
843

844
  /**
845
   * Search for charges you’ve previously created using Stripe’s <a
846
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
847
   * use search in read-after-write flows where strict consistency is necessary. Under normal
848
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
849
   * new or updated data can be up to an hour behind during outages. Search functionality is not
850
   * available to merchants in India.
851
   */
852
  public static ChargeSearchResult search(ChargeSearchParams params) throws StripeException {
853
    return search(params, (RequestOptions) null);
1✔
854
  }
855

856
  /**
857
   * Search for charges you’ve previously created using Stripe’s <a
858
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
859
   * use search in read-after-write flows where strict consistency is necessary. Under normal
860
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
861
   * new or updated data can be up to an hour behind during outages. Search functionality is not
862
   * available to merchants in India.
863
   */
864
  public static ChargeSearchResult search(ChargeSearchParams params, RequestOptions options)
865
      throws StripeException {
866
    String path = "/v1/charges/search";
1✔
867
    ApiResource.checkNullTypedParams(path, params);
1✔
868
    ApiRequest request =
1✔
869
        new ApiRequest(
870
            BaseAddress.API,
871
            ApiResource.RequestMethod.GET,
872
            path,
873
            ApiRequestParams.paramsToMap(params),
1✔
874
            options);
875
    return getGlobalResponseGetter().request(request, ChargeSearchResult.class);
1✔
876
  }
877

878
  /**
879
   * Updates the specified charge by setting the values of the parameters passed. Any parameters not
880
   * provided will be left unchanged.
881
   */
882
  @Override
883
  public Charge update(Map<String, Object> params) throws StripeException {
884
    return update(params, (RequestOptions) null);
1✔
885
  }
886

887
  /**
888
   * Updates the specified charge by setting the values of the parameters passed. Any parameters not
889
   * provided will be left unchanged.
890
   */
891
  @Override
892
  public Charge update(Map<String, Object> params, RequestOptions options) throws StripeException {
893
    String path = String.format("/v1/charges/%s", ApiResource.urlEncodeId(this.getId()));
1✔
894
    ApiRequest request =
1✔
895
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
896
    return getResponseGetter().request(request, Charge.class);
1✔
897
  }
898

899
  /**
900
   * Updates the specified charge by setting the values of the parameters passed. Any parameters not
901
   * provided will be left unchanged.
902
   */
903
  public Charge update(ChargeUpdateParams params) throws StripeException {
904
    return update(params, (RequestOptions) null);
1✔
905
  }
906

907
  /**
908
   * Updates the specified charge by setting the values of the parameters passed. Any parameters not
909
   * provided will be left unchanged.
910
   */
911
  public Charge update(ChargeUpdateParams params, RequestOptions options) throws StripeException {
912
    String path = String.format("/v1/charges/%s", ApiResource.urlEncodeId(this.getId()));
1✔
913
    ApiResource.checkNullTypedParams(path, params);
1✔
914
    ApiRequest request =
1✔
915
        new ApiRequest(
916
            BaseAddress.API,
917
            ApiResource.RequestMethod.POST,
918
            path,
919
            ApiRequestParams.paramsToMap(params),
1✔
920
            options);
921
    return getResponseGetter().request(request, Charge.class);
1✔
922
  }
923

924
  @Getter
925
  @Setter
926
  @EqualsAndHashCode(callSuper = false)
927
  public static class BillingDetails extends StripeObject {
1✔
928
    /** Billing address. */
929
    @SerializedName("address")
930
    Address address;
931

932
    /** Email address. */
933
    @SerializedName("email")
934
    String email;
935

936
    /** Full name. */
937
    @SerializedName("name")
938
    String name;
939

940
    /** Billing phone number (including extension). */
941
    @SerializedName("phone")
942
    String phone;
943
  }
944

945
  @Getter
946
  @Setter
947
  @EqualsAndHashCode(callSuper = false)
948
  public static class FraudDetails extends StripeObject {
1✔
949
    /** Assessments from Stripe. If set, the value is {@code fraudulent}. */
950
    @SerializedName("stripe_report")
951
    String stripeReport;
952

953
    /**
954
     * Assessments reported by you. If set, possible values of are {@code safe} and {@code
955
     * fraudulent}.
956
     */
957
    @SerializedName("user_report")
958
    String userReport;
959
  }
960

961
  @Getter
962
  @Setter
963
  @EqualsAndHashCode(callSuper = false)
964
  public static class Level3 extends StripeObject {
1✔
965
    @SerializedName("customer_reference")
966
    String customerReference;
967

968
    @SerializedName("line_items")
969
    List<Charge.Level3.LineItem> lineItems;
970

971
    @SerializedName("merchant_reference")
972
    String merchantReference;
973

974
    @SerializedName("shipping_address_zip")
975
    String shippingAddressZip;
976

977
    @SerializedName("shipping_amount")
978
    Long shippingAmount;
979

980
    @SerializedName("shipping_from_zip")
981
    String shippingFromZip;
982

983
    @Getter
984
    @Setter
985
    @EqualsAndHashCode(callSuper = false)
986
    public static class LineItem extends StripeObject {
1✔
987
      @SerializedName("discount_amount")
988
      Long discountAmount;
989

990
      @SerializedName("product_code")
991
      String productCode;
992

993
      @SerializedName("product_description")
994
      String productDescription;
995

996
      @SerializedName("quantity")
997
      Long quantity;
998

999
      @SerializedName("tax_amount")
1000
      Long taxAmount;
1001

1002
      @SerializedName("unit_cost")
1003
      Long unitCost;
1004
    }
1005
  }
1006

1007
  @Getter
1008
  @Setter
1009
  @EqualsAndHashCode(callSuper = false)
1010
  public static class Outcome extends StripeObject {
1✔
1011
    /**
1012
     * Possible values are {@code approved_by_network}, {@code declined_by_network}, {@code
1013
     * not_sent_to_network}, and {@code reversed_after_approval}. The value {@code
1014
     * reversed_after_approval} indicates the payment was <a
1015
     * href="https://stripe.com/docs/declines#blocked-payments">blocked by Stripe</a> after bank
1016
     * authorization, and may temporarily appear as &quot;pending&quot; on a cardholder's statement.
1017
     */
1018
    @SerializedName("network_status")
1019
    String networkStatus;
1020

1021
    /**
1022
     * An enumerated value providing a more detailed explanation of the outcome's {@code type}.
1023
     * Charges blocked by Radar's default block rule have the value {@code highest_risk_level}.
1024
     * Charges placed in review by Radar's default review rule have the value {@code
1025
     * elevated_risk_level}. Charges authorized, blocked, or placed in review by custom rules have
1026
     * the value {@code rule}. See <a href="https://stripe.com/docs/declines">understanding
1027
     * declines</a> for more details.
1028
     */
1029
    @SerializedName("reason")
1030
    String reason;
1031

1032
    /**
1033
     * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated
1034
     * payments are {@code normal}, {@code elevated}, {@code highest}. For non-card payments, and
1035
     * card-based payments predating the public assignment of risk levels, this field will have the
1036
     * value {@code not_assessed}. In the event of an error in the evaluation, this field will have
1037
     * the value {@code unknown}. This field is only available with Radar.
1038
     */
1039
    @SerializedName("risk_level")
1040
    String riskLevel;
1041

1042
    /**
1043
     * Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated
1044
     * payments are between 0 and 100. For non-card payments, card-based payments predating the
1045
     * public assignment of risk scores, or in the event of an error during evaluation, this field
1046
     * will not be present. This field is only available with Radar for Fraud Teams.
1047
     */
1048
    @SerializedName("risk_score")
1049
    Long riskScore;
1050

1051
    /** The ID of the Radar rule that matched the payment, if applicable. */
1052
    @SerializedName("rule")
1053
    @Getter(lombok.AccessLevel.NONE)
1054
    @Setter(lombok.AccessLevel.NONE)
1055
    ExpandableField<Rule> rule;
1056

1057
    /**
1058
     * A human-readable description of the outcome type and reason, designed for you (the recipient
1059
     * of the payment), not your customer.
1060
     */
1061
    @SerializedName("seller_message")
1062
    String sellerMessage;
1063

1064
    /**
1065
     * Possible values are {@code authorized}, {@code manual_review}, {@code issuer_declined},
1066
     * {@code blocked}, and {@code invalid}. See <a
1067
     * href="https://stripe.com/docs/declines">understanding declines</a> and <a
1068
     * href="https://stripe.com/docs/radar/reviews">Radar reviews</a> for details.
1069
     */
1070
    @SerializedName("type")
1071
    String type;
1072

1073
    /** Get ID of expandable {@code rule} object. */
1074
    public String getRule() {
1075
      return (this.rule != null) ? this.rule.getId() : null;
×
1076
    }
1077

1078
    public void setRule(String id) {
1079
      this.rule = ApiResource.setExpandableFieldId(id, this.rule);
×
1080
    }
×
1081

1082
    /** Get expanded {@code rule}. */
1083
    public Rule getRuleObject() {
1084
      return (this.rule != null) ? this.rule.getExpanded() : null;
×
1085
    }
1086

1087
    public void setRuleObject(Rule expandableObject) {
1088
      this.rule = new ExpandableField<Rule>(expandableObject.getId(), expandableObject);
×
1089
    }
×
1090

1091
    @Getter
1092
    @Setter
1093
    @EqualsAndHashCode(callSuper = false)
1094
    public static class Rule extends StripeObject implements HasId {
×
1095
      /** The action taken on the payment. */
1096
      @SerializedName("action")
1097
      String action;
1098

1099
      /** Unique identifier for the object. */
1100
      @Getter(onMethod_ = {@Override})
1101
      @SerializedName("id")
1102
      String id;
1103

1104
      /** The predicate to evaluate the payment against. */
1105
      @SerializedName("predicate")
1106
      String predicate;
1107
    }
1108
  }
1109

1110
  @Getter
1111
  @Setter
1112
  @EqualsAndHashCode(callSuper = false)
1113
  public static class PaymentMethodDetails extends StripeObject {
1✔
1114
    @SerializedName("ach_credit_transfer")
1115
    AchCreditTransfer achCreditTransfer;
1116

1117
    @SerializedName("ach_debit")
1118
    AchDebit achDebit;
1119

1120
    @SerializedName("acss_debit")
1121
    AcssDebit acssDebit;
1122

1123
    @SerializedName("affirm")
1124
    Affirm affirm;
1125

1126
    @SerializedName("afterpay_clearpay")
1127
    AfterpayClearpay afterpayClearpay;
1128

1129
    @SerializedName("alipay")
1130
    Alipay alipay;
1131

1132
    @SerializedName("amazon_pay")
1133
    AmazonPay amazonPay;
1134

1135
    @SerializedName("au_becs_debit")
1136
    AuBecsDebit auBecsDebit;
1137

1138
    @SerializedName("bacs_debit")
1139
    BacsDebit bacsDebit;
1140

1141
    @SerializedName("bancontact")
1142
    Bancontact bancontact;
1143

1144
    @SerializedName("blik")
1145
    Blik blik;
1146

1147
    @SerializedName("boleto")
1148
    Boleto boleto;
1149

1150
    @SerializedName("card")
1151
    Card card;
1152

1153
    @SerializedName("card_present")
1154
    CardPresent cardPresent;
1155

1156
    @SerializedName("cashapp")
1157
    Cashapp cashapp;
1158

1159
    @SerializedName("customer_balance")
1160
    CustomerBalance customerBalance;
1161

1162
    @SerializedName("eps")
1163
    Eps eps;
1164

1165
    @SerializedName("fpx")
1166
    Fpx fpx;
1167

1168
    @SerializedName("giropay")
1169
    Giropay giropay;
1170

1171
    @SerializedName("grabpay")
1172
    Grabpay grabpay;
1173

1174
    @SerializedName("ideal")
1175
    Ideal ideal;
1176

1177
    @SerializedName("interac_present")
1178
    InteracPresent interacPresent;
1179

1180
    @SerializedName("klarna")
1181
    Klarna klarna;
1182

1183
    @SerializedName("konbini")
1184
    Konbini konbini;
1185

1186
    @SerializedName("link")
1187
    Link link;
1188

1189
    @SerializedName("mb_way")
1190
    MbWay mbWay;
1191

1192
    @SerializedName("mobilepay")
1193
    Mobilepay mobilepay;
1194

1195
    @SerializedName("multibanco")
1196
    Multibanco multibanco;
1197

1198
    @SerializedName("oxxo")
1199
    Oxxo oxxo;
1200

1201
    @SerializedName("p24")
1202
    P24 p24;
1203

1204
    @SerializedName("paynow")
1205
    Paynow paynow;
1206

1207
    @SerializedName("paypal")
1208
    Paypal paypal;
1209

1210
    @SerializedName("payto")
1211
    Payto payto;
1212

1213
    @SerializedName("pix")
1214
    Pix pix;
1215

1216
    @SerializedName("promptpay")
1217
    Promptpay promptpay;
1218

1219
    @SerializedName("rechnung")
1220
    Rechnung rechnung;
1221

1222
    @SerializedName("revolut_pay")
1223
    RevolutPay revolutPay;
1224

1225
    @SerializedName("sepa_credit_transfer")
1226
    SepaCreditTransfer sepaCreditTransfer;
1227

1228
    @SerializedName("sepa_debit")
1229
    SepaDebit sepaDebit;
1230

1231
    @SerializedName("sofort")
1232
    Sofort sofort;
1233

1234
    @SerializedName("stripe_account")
1235
    StripeAccount stripeAccount;
1236

1237
    @SerializedName("swish")
1238
    Swish swish;
1239

1240
    @SerializedName("twint")
1241
    Twint twint;
1242

1243
    /**
1244
     * The type of transaction-specific details of the payment method used in the payment, one of
1245
     * {@code ach_credit_transfer}, {@code ach_debit}, {@code acss_debit}, {@code alipay}, {@code
1246
     * au_becs_debit}, {@code bancontact}, {@code card}, {@code card_present}, {@code eps}, {@code
1247
     * giropay}, {@code ideal}, {@code klarna}, {@code multibanco}, {@code p24}, {@code sepa_debit},
1248
     * {@code sofort}, {@code stripe_account}, or {@code wechat}. An additional hash is included on
1249
     * {@code payment_method_details} with a name matching this value. It contains information
1250
     * specific to the payment method.
1251
     */
1252
    @SerializedName("type")
1253
    String type;
1254

1255
    @SerializedName("us_bank_account")
1256
    UsBankAccount usBankAccount;
1257

1258
    @SerializedName("wechat")
1259
    Wechat wechat;
1260

1261
    @SerializedName("wechat_pay")
1262
    WechatPay wechatPay;
1263

1264
    @SerializedName("zip")
1265
    Zip zip;
1266

1267
    @Getter
1268
    @Setter
1269
    @EqualsAndHashCode(callSuper = false)
1270
    public static class AchCreditTransfer extends StripeObject {
×
1271
      /** Account number to transfer funds to. */
1272
      @SerializedName("account_number")
1273
      String accountNumber;
1274

1275
      /** Name of the bank associated with the routing number. */
1276
      @SerializedName("bank_name")
1277
      String bankName;
1278

1279
      /** Routing transit number for the bank account to transfer funds to. */
1280
      @SerializedName("routing_number")
1281
      String routingNumber;
1282

1283
      /** SWIFT code of the bank associated with the routing number. */
1284
      @SerializedName("swift_code")
1285
      String swiftCode;
1286
    }
1287

1288
    @Getter
1289
    @Setter
1290
    @EqualsAndHashCode(callSuper = false)
1291
    public static class AchDebit extends StripeObject {
×
1292
      /**
1293
       * Type of entity that holds the account. This can be either {@code individual} or {@code
1294
       * company}.
1295
       *
1296
       * <p>One of {@code company}, or {@code individual}.
1297
       */
1298
      @SerializedName("account_holder_type")
1299
      String accountHolderType;
1300

1301
      /** Name of the bank associated with the bank account. */
1302
      @SerializedName("bank_name")
1303
      String bankName;
1304

1305
      /** Two-letter ISO code representing the country the bank account is located in. */
1306
      @SerializedName("country")
1307
      String country;
1308

1309
      /**
1310
       * Uniquely identifies this particular bank account. You can use this attribute to check
1311
       * whether two bank accounts are the same.
1312
       */
1313
      @SerializedName("fingerprint")
1314
      String fingerprint;
1315

1316
      /** Last four digits of the bank account number. */
1317
      @SerializedName("last4")
1318
      String last4;
1319

1320
      /** Routing transit number of the bank account. */
1321
      @SerializedName("routing_number")
1322
      String routingNumber;
1323
    }
1324

1325
    @Getter
1326
    @Setter
1327
    @EqualsAndHashCode(callSuper = false)
1328
    public static class AcssDebit extends StripeObject {
×
1329
      /** Name of the bank associated with the bank account. */
1330
      @SerializedName("bank_name")
1331
      String bankName;
1332

1333
      /**
1334
       * Uniquely identifies this particular bank account. You can use this attribute to check
1335
       * whether two bank accounts are the same.
1336
       */
1337
      @SerializedName("fingerprint")
1338
      String fingerprint;
1339

1340
      /** Institution number of the bank account. */
1341
      @SerializedName("institution_number")
1342
      String institutionNumber;
1343

1344
      /** Last four digits of the bank account number. */
1345
      @SerializedName("last4")
1346
      String last4;
1347

1348
      /** ID of the mandate used to make this payment. */
1349
      @SerializedName("mandate")
1350
      String mandate;
1351

1352
      /** Transit number of the bank account. */
1353
      @SerializedName("transit_number")
1354
      String transitNumber;
1355
    }
1356

1357
    @Getter
1358
    @Setter
1359
    @EqualsAndHashCode(callSuper = false)
1360
    public static class Affirm extends StripeObject {
×
1361
      /** The Affirm transaction ID associated with this payment. */
1362
      @SerializedName("transaction_id")
1363
      String transactionId;
1364
    }
1365

1366
    @Getter
1367
    @Setter
1368
    @EqualsAndHashCode(callSuper = false)
1369
    public static class AfterpayClearpay extends StripeObject {
×
1370
      /** The Afterpay order ID associated with this payment intent. */
1371
      @SerializedName("order_id")
1372
      String orderId;
1373

1374
      /** Order identifier shown to the merchant in Afterpay’s online portal. */
1375
      @SerializedName("reference")
1376
      String reference;
1377
    }
1378

1379
    @Getter
1380
    @Setter
1381
    @EqualsAndHashCode(callSuper = false)
1382
    public static class Alipay extends StripeObject {
×
1383
      /**
1384
       * Uniquely identifies this particular Alipay account. You can use this attribute to check
1385
       * whether two Alipay accounts are the same.
1386
       */
1387
      @SerializedName("buyer_id")
1388
      String buyerId;
1389

1390
      /**
1391
       * Uniquely identifies this particular Alipay account. You can use this attribute to check
1392
       * whether two Alipay accounts are the same.
1393
       */
1394
      @SerializedName("fingerprint")
1395
      String fingerprint;
1396

1397
      /** Transaction ID of this particular Alipay transaction. */
1398
      @SerializedName("transaction_id")
1399
      String transactionId;
1400
    }
1401

1402
    @Getter
1403
    @Setter
1404
    @EqualsAndHashCode(callSuper = false)
1405
    public static class AmazonPay extends StripeObject {}
×
1406

1407
    @Getter
1408
    @Setter
1409
    @EqualsAndHashCode(callSuper = false)
1410
    public static class AuBecsDebit extends StripeObject {
×
1411
      /** Bank-State-Branch number of the bank account. */
1412
      @SerializedName("bsb_number")
1413
      String bsbNumber;
1414

1415
      /**
1416
       * Uniquely identifies this particular bank account. You can use this attribute to check
1417
       * whether two bank accounts are the same.
1418
       */
1419
      @SerializedName("fingerprint")
1420
      String fingerprint;
1421

1422
      /** Last four digits of the bank account number. */
1423
      @SerializedName("last4")
1424
      String last4;
1425

1426
      /** ID of the mandate used to make this payment. */
1427
      @SerializedName("mandate")
1428
      String mandate;
1429
    }
1430

1431
    @Getter
1432
    @Setter
1433
    @EqualsAndHashCode(callSuper = false)
1434
    public static class BacsDebit extends StripeObject {
×
1435
      /**
1436
       * Uniquely identifies this particular bank account. You can use this attribute to check
1437
       * whether two bank accounts are the same.
1438
       */
1439
      @SerializedName("fingerprint")
1440
      String fingerprint;
1441

1442
      /** Last four digits of the bank account number. */
1443
      @SerializedName("last4")
1444
      String last4;
1445

1446
      /** ID of the mandate used to make this payment. */
1447
      @SerializedName("mandate")
1448
      String mandate;
1449

1450
      /** Sort code of the bank account. (e.g., {@code 10-20-30}) */
1451
      @SerializedName("sort_code")
1452
      String sortCode;
1453
    }
1454

1455
    @Getter
1456
    @Setter
1457
    @EqualsAndHashCode(callSuper = false)
1458
    public static class Bancontact extends StripeObject {
×
1459
      /** Bank code of bank associated with the bank account. */
1460
      @SerializedName("bank_code")
1461
      String bankCode;
1462

1463
      /** Name of the bank associated with the bank account. */
1464
      @SerializedName("bank_name")
1465
      String bankName;
1466

1467
      /** Bank Identifier Code of the bank associated with the bank account. */
1468
      @SerializedName("bic")
1469
      String bic;
1470

1471
      /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
1472
      @SerializedName("generated_sepa_debit")
1473
      @Getter(lombok.AccessLevel.NONE)
1474
      @Setter(lombok.AccessLevel.NONE)
1475
      ExpandableField<PaymentMethod> generatedSepaDebit;
1476

1477
      /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
1478
      @SerializedName("generated_sepa_debit_mandate")
1479
      @Getter(lombok.AccessLevel.NONE)
1480
      @Setter(lombok.AccessLevel.NONE)
1481
      ExpandableField<Mandate> generatedSepaDebitMandate;
1482

1483
      /** Last four characters of the IBAN. */
1484
      @SerializedName("iban_last4")
1485
      String ibanLast4;
1486

1487
      /**
1488
       * Preferred language of the Bancontact authorization page that the customer is redirected to.
1489
       * Can be one of {@code en}, {@code de}, {@code fr}, or {@code nl}
1490
       */
1491
      @SerializedName("preferred_language")
1492
      String preferredLanguage;
1493

1494
      /**
1495
       * Owner's verified full name. Values are verified or provided by Bancontact directly (if
1496
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
1497
       */
1498
      @SerializedName("verified_name")
1499
      String verifiedName;
1500

1501
      /** Get ID of expandable {@code generatedSepaDebit} object. */
1502
      public String getGeneratedSepaDebit() {
1503
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null;
×
1504
      }
1505

1506
      public void setGeneratedSepaDebit(String id) {
1507
        this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit);
×
1508
      }
×
1509

1510
      /** Get expanded {@code generatedSepaDebit}. */
1511
      public PaymentMethod getGeneratedSepaDebitObject() {
1512
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null;
×
1513
      }
1514

1515
      public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) {
1516
        this.generatedSepaDebit =
×
1517
            new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
1518
      }
×
1519

1520
      /** Get ID of expandable {@code generatedSepaDebitMandate} object. */
1521
      public String getGeneratedSepaDebitMandate() {
1522
        return (this.generatedSepaDebitMandate != null)
×
1523
            ? this.generatedSepaDebitMandate.getId()
×
1524
            : null;
×
1525
      }
1526

1527
      public void setGeneratedSepaDebitMandate(String id) {
1528
        this.generatedSepaDebitMandate =
×
1529
            ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate);
×
1530
      }
×
1531

1532
      /** Get expanded {@code generatedSepaDebitMandate}. */
1533
      public Mandate getGeneratedSepaDebitMandateObject() {
1534
        return (this.generatedSepaDebitMandate != null)
×
1535
            ? this.generatedSepaDebitMandate.getExpanded()
×
1536
            : null;
×
1537
      }
1538

1539
      public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) {
1540
        this.generatedSepaDebitMandate =
×
1541
            new ExpandableField<Mandate>(expandableObject.getId(), expandableObject);
×
1542
      }
×
1543
    }
1544

1545
    @Getter
1546
    @Setter
1547
    @EqualsAndHashCode(callSuper = false)
1548
    public static class Blik extends StripeObject {
×
1549
      /** A unique and immutable identifier assigned by BLIK to every buyer. */
1550
      @SerializedName("buyer_id")
1551
      String buyerId;
1552
    }
1553

1554
    @Getter
1555
    @Setter
1556
    @EqualsAndHashCode(callSuper = false)
1557
    public static class Boleto extends StripeObject {
×
1558
      /**
1559
       * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses
1560
       * consumers).
1561
       */
1562
      @SerializedName("tax_id")
1563
      String taxId;
1564
    }
1565

1566
    @Getter
1567
    @Setter
1568
    @EqualsAndHashCode(callSuper = false)
1569
    public static class Card extends StripeObject {
1✔
1570
      /** The authorized amount. */
1571
      @SerializedName("amount_authorized")
1572
      Long amountAuthorized;
1573

1574
      /** Authorization code on the charge. */
1575
      @SerializedName("authorization_code")
1576
      String authorizationCode;
1577

1578
      /**
1579
       * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
1580
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1581
       */
1582
      @SerializedName("brand")
1583
      String brand;
1584

1585
      /**
1586
       * When using manual capture, a future timestamp at which the charge will be automatically
1587
       * refunded if uncaptured.
1588
       */
1589
      @SerializedName("capture_before")
1590
      Long captureBefore;
1591

1592
      /** Check results by Card networks on Card address and CVC at time of payment. */
1593
      @SerializedName("checks")
1594
      Checks checks;
1595

1596
      /**
1597
       * Two-letter ISO code representing the country of the card. You could use this attribute to
1598
       * get a sense of the international breakdown of cards you've collected.
1599
       */
1600
      @SerializedName("country")
1601
      String country;
1602

1603
      @SerializedName("decremental_authorization")
1604
      DecrementalAuthorization decrementalAuthorization;
1605

1606
      /**
1607
       * A high-level description of the type of cards issued in this range. (For internal use only
1608
       * and not typically available in standard API requests.)
1609
       */
1610
      @SerializedName("description")
1611
      String description;
1612

1613
      /** Two-digit number representing the card's expiration month. */
1614
      @SerializedName("exp_month")
1615
      Long expMonth;
1616

1617
      /** Four-digit number representing the card's expiration year. */
1618
      @SerializedName("exp_year")
1619
      Long expYear;
1620

1621
      @SerializedName("extended_authorization")
1622
      ExtendedAuthorization extendedAuthorization;
1623

1624
      /**
1625
       * Uniquely identifies this particular card number. You can use this attribute to check
1626
       * whether two customers who’ve signed up with you are using the same card number, for
1627
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
1628
       * tokenized number might be provided instead of the underlying card number.
1629
       *
1630
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1631
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
1632
       */
1633
      @SerializedName("fingerprint")
1634
      String fingerprint;
1635

1636
      /**
1637
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
1638
       * unknown}.
1639
       */
1640
      @SerializedName("funding")
1641
      String funding;
1642

1643
      /**
1644
       * Issuer identification number of the card. (For internal use only and not typically
1645
       * available in standard API requests.)
1646
       */
1647
      @SerializedName("iin")
1648
      String iin;
1649

1650
      @SerializedName("incremental_authorization")
1651
      IncrementalAuthorization incrementalAuthorization;
1652

1653
      /**
1654
       * Installment details for this payment (Mexico only).
1655
       *
1656
       * <p>For more information, see the <a
1657
       * href="https://stripe.com/docs/payments/installments">installments integration guide</a>.
1658
       */
1659
      @SerializedName("installments")
1660
      Installments installments;
1661

1662
      /**
1663
       * The name of the card's issuing bank. (For internal use only and not typically available in
1664
       * standard API requests.)
1665
       */
1666
      @SerializedName("issuer")
1667
      String issuer;
1668

1669
      /** The last four digits of the card. */
1670
      @SerializedName("last4")
1671
      String last4;
1672

1673
      /** ID of the mandate used to make this payment or created by it. */
1674
      @SerializedName("mandate")
1675
      String mandate;
1676

1677
      /** True if this payment was marked as MOTO and out of scope for SCA. */
1678
      @SerializedName("moto")
1679
      Boolean moto;
1680

1681
      @SerializedName("multicapture")
1682
      Multicapture multicapture;
1683

1684
      /**
1685
       * Identifies which network this charge was processed on. Can be {@code amex}, {@code
1686
       * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
1687
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1688
       */
1689
      @SerializedName("network")
1690
      String network;
1691

1692
      /**
1693
       * If this card has network token credentials, this contains the details of the network token
1694
       * credentials.
1695
       */
1696
      @SerializedName("network_token")
1697
      NetworkToken networkToken;
1698

1699
      @SerializedName("overcapture")
1700
      Overcapture overcapture;
1701

1702
      /** Populated if this transaction used 3D Secure authentication. */
1703
      @SerializedName("three_d_secure")
1704
      ThreeDSecure threeDSecure;
1705

1706
      /** If this Card is part of a card wallet, this contains the details of the card wallet. */
1707
      @SerializedName("wallet")
1708
      Wallet wallet;
1709

1710
      @Getter
1711
      @Setter
1712
      @EqualsAndHashCode(callSuper = false)
1713
      public static class Checks extends StripeObject {
1✔
1714
        /**
1715
         * If a address line1 was provided, results of the check, one of {@code pass}, {@code fail},
1716
         * {@code unavailable}, or {@code unchecked}.
1717
         */
1718
        @SerializedName("address_line1_check")
1719
        String addressLine1Check;
1720

1721
        /**
1722
         * If a address postal code was provided, results of the check, one of {@code pass}, {@code
1723
         * fail}, {@code unavailable}, or {@code unchecked}.
1724
         */
1725
        @SerializedName("address_postal_code_check")
1726
        String addressPostalCodeCheck;
1727

1728
        /**
1729
         * If a CVC was provided, results of the check, one of {@code pass}, {@code fail}, {@code
1730
         * unavailable}, or {@code unchecked}.
1731
         */
1732
        @SerializedName("cvc_check")
1733
        String cvcCheck;
1734
      }
1735

1736
      @Getter
1737
      @Setter
1738
      @EqualsAndHashCode(callSuper = false)
1739
      public static class DecrementalAuthorization extends StripeObject {
×
1740
        /**
1741
         * Indicates whether or not the decremental authorization feature is supported.
1742
         *
1743
         * <p>One of {@code available}, or {@code unavailable}.
1744
         */
1745
        @SerializedName("status")
1746
        String status;
1747
      }
1748

1749
      @Getter
1750
      @Setter
1751
      @EqualsAndHashCode(callSuper = false)
1752
      public static class ExtendedAuthorization extends StripeObject {
1✔
1753
        /**
1754
         * Indicates whether or not the capture window is extended beyond the standard
1755
         * authorization.
1756
         *
1757
         * <p>One of {@code disabled}, or {@code enabled}.
1758
         */
1759
        @SerializedName("status")
1760
        String status;
1761
      }
1762

1763
      @Getter
1764
      @Setter
1765
      @EqualsAndHashCode(callSuper = false)
1766
      public static class IncrementalAuthorization extends StripeObject {
1✔
1767
        /**
1768
         * Indicates whether or not the incremental authorization feature is supported.
1769
         *
1770
         * <p>One of {@code available}, or {@code unavailable}.
1771
         */
1772
        @SerializedName("status")
1773
        String status;
1774
      }
1775

1776
      @Getter
1777
      @Setter
1778
      @EqualsAndHashCode(callSuper = false)
1779
      public static class Installments extends StripeObject {
×
1780
        /** Installment plan selected for the payment. */
1781
        @SerializedName("plan")
1782
        Plan plan;
1783

1784
        @Getter
1785
        @Setter
1786
        @EqualsAndHashCode(callSuper = false)
1787
        public static class Plan extends StripeObject {
×
1788
          /**
1789
           * For {@code fixed_count} installment plans, this is the number of installment payments
1790
           * your customer will make to their credit card.
1791
           */
1792
          @SerializedName("count")
1793
          Long count;
1794

1795
          /**
1796
           * For {@code fixed_count} installment plans, this is the interval between installment
1797
           * payments your customer will make to their credit card. One of {@code month}.
1798
           */
1799
          @SerializedName("interval")
1800
          String interval;
1801

1802
          /** Type of installment plan, one of {@code fixed_count}. */
1803
          @SerializedName("type")
1804
          String type;
1805
        }
1806
      }
1807

1808
      @Getter
1809
      @Setter
1810
      @EqualsAndHashCode(callSuper = false)
1811
      public static class Multicapture extends StripeObject {
1✔
1812
        /**
1813
         * Indicates whether or not multiple captures are supported.
1814
         *
1815
         * <p>One of {@code available}, or {@code unavailable}.
1816
         */
1817
        @SerializedName("status")
1818
        String status;
1819
      }
1820

1821
      @Getter
1822
      @Setter
1823
      @EqualsAndHashCode(callSuper = false)
1824
      public static class NetworkToken extends StripeObject {
1✔
1825
        /**
1826
         * Indicates if Stripe used a network token, either user provided or Stripe managed when
1827
         * processing the transaction.
1828
         */
1829
        @SerializedName("used")
1830
        Boolean used;
1831
      }
1832

1833
      @Getter
1834
      @Setter
1835
      @EqualsAndHashCode(callSuper = false)
1836
      public static class Overcapture extends StripeObject {
1✔
1837
        /** The maximum amount that can be captured. */
1838
        @SerializedName("maximum_amount_capturable")
1839
        Long maximumAmountCapturable;
1840

1841
        /**
1842
         * Indicates whether or not the authorized amount can be over-captured.
1843
         *
1844
         * <p>One of {@code available}, or {@code unavailable}.
1845
         */
1846
        @SerializedName("status")
1847
        String status;
1848
      }
1849

1850
      @Getter
1851
      @Setter
1852
      @EqualsAndHashCode(callSuper = false)
1853
      public static class ThreeDSecure extends StripeObject {
×
1854
        /**
1855
         * For authenticated transactions: how the customer was authenticated by the issuing bank.
1856
         *
1857
         * <p>One of {@code challenge}, or {@code frictionless}.
1858
         */
1859
        @SerializedName("authentication_flow")
1860
        String authenticationFlow;
1861

1862
        /**
1863
         * The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
1864
         * authentication was performed.
1865
         *
1866
         * <p>One of {@code 01}, {@code 02}, {@code 05}, {@code 06}, or {@code 07}.
1867
         */
1868
        @SerializedName("electronic_commerce_indicator")
1869
        String electronicCommerceIndicator;
1870

1871
        /**
1872
         * The exemption requested via 3DS and accepted by the issuer at authentication time.
1873
         *
1874
         * <p>One of {@code low_risk}, or {@code none}.
1875
         */
1876
        @SerializedName("exemption_indicator")
1877
        String exemptionIndicator;
1878

1879
        /**
1880
         * Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
1881
         * This will depend on the outcome of Stripe's internal risk assessment.
1882
         */
1883
        @SerializedName("exemption_indicator_applied")
1884
        Boolean exemptionIndicatorApplied;
1885

1886
        /**
1887
         * Indicates the outcome of 3D Secure authentication.
1888
         *
1889
         * <p>One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code
1890
         * failed}, {@code not_supported}, or {@code processing_error}.
1891
         */
1892
        @SerializedName("result")
1893
        String result;
1894

1895
        /**
1896
         * Additional information about why 3D Secure succeeded or failed based on the {@code
1897
         * result}.
1898
         *
1899
         * <p>One of {@code abandoned}, {@code bypassed}, {@code canceled}, {@code
1900
         * card_not_enrolled}, {@code network_not_supported}, {@code protocol_error}, or {@code
1901
         * rejected}.
1902
         */
1903
        @SerializedName("result_reason")
1904
        String resultReason;
1905

1906
        /**
1907
         * The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID (dsTransId) for this
1908
         * payment.
1909
         */
1910
        @SerializedName("transaction_id")
1911
        String transactionId;
1912

1913
        /**
1914
         * The version of 3D Secure that was used.
1915
         *
1916
         * <p>One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}.
1917
         */
1918
        @SerializedName("version")
1919
        String version;
1920
      }
1921

1922
      @Getter
1923
      @Setter
1924
      @EqualsAndHashCode(callSuper = false)
1925
      public static class Wallet extends StripeObject {
×
1926
        @SerializedName("amex_express_checkout")
1927
        AmexExpressCheckout amexExpressCheckout;
1928

1929
        @SerializedName("apple_pay")
1930
        ApplePay applePay;
1931

1932
        /** (For tokenized numbers only.) The last four digits of the device account number. */
1933
        @SerializedName("dynamic_last4")
1934
        String dynamicLast4;
1935

1936
        @SerializedName("google_pay")
1937
        GooglePay googlePay;
1938

1939
        @SerializedName("link")
1940
        Link link;
1941

1942
        @SerializedName("masterpass")
1943
        Masterpass masterpass;
1944

1945
        @SerializedName("samsung_pay")
1946
        SamsungPay samsungPay;
1947

1948
        /**
1949
         * The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
1950
         * {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
1951
         * {@code link}. An additional hash is included on the Wallet subhash with a name matching
1952
         * this value. It contains additional information specific to the card wallet type.
1953
         */
1954
        @SerializedName("type")
1955
        String type;
1956

1957
        @SerializedName("visa_checkout")
1958
        VisaCheckout visaCheckout;
1959

1960
        @Getter
1961
        @Setter
1962
        @EqualsAndHashCode(callSuper = false)
1963
        public static class AmexExpressCheckout extends StripeObject {}
×
1964

1965
        @Getter
1966
        @Setter
1967
        @EqualsAndHashCode(callSuper = false)
1968
        public static class ApplePay extends StripeObject {}
×
1969

1970
        @Getter
1971
        @Setter
1972
        @EqualsAndHashCode(callSuper = false)
1973
        public static class GooglePay extends StripeObject {}
×
1974

1975
        @Getter
1976
        @Setter
1977
        @EqualsAndHashCode(callSuper = false)
1978
        public static class Link extends StripeObject {}
×
1979

1980
        @Getter
1981
        @Setter
1982
        @EqualsAndHashCode(callSuper = false)
1983
        public static class Masterpass extends StripeObject {
×
1984
          /**
1985
           * Owner's verified billing address. Values are verified or provided by the wallet
1986
           * directly (if supported) at the time of authorization or settlement. They cannot be set
1987
           * or mutated.
1988
           */
1989
          @SerializedName("billing_address")
1990
          Address billingAddress;
1991

1992
          /**
1993
           * Owner's verified email. Values are verified or provided by the wallet directly (if
1994
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
1995
           */
1996
          @SerializedName("email")
1997
          String email;
1998

1999
          /**
2000
           * Owner's verified full name. Values are verified or provided by the wallet directly (if
2001
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
2002
           */
2003
          @SerializedName("name")
2004
          String name;
2005

2006
          /**
2007
           * Owner's verified shipping address. Values are verified or provided by the wallet
2008
           * directly (if supported) at the time of authorization or settlement. They cannot be set
2009
           * or mutated.
2010
           */
2011
          @SerializedName("shipping_address")
2012
          Address shippingAddress;
2013
        }
2014

2015
        @Getter
2016
        @Setter
2017
        @EqualsAndHashCode(callSuper = false)
2018
        public static class SamsungPay extends StripeObject {}
×
2019

2020
        @Getter
2021
        @Setter
2022
        @EqualsAndHashCode(callSuper = false)
2023
        public static class VisaCheckout extends StripeObject {
×
2024
          /**
2025
           * Owner's verified billing address. Values are verified or provided by the wallet
2026
           * directly (if supported) at the time of authorization or settlement. They cannot be set
2027
           * or mutated.
2028
           */
2029
          @SerializedName("billing_address")
2030
          Address billingAddress;
2031

2032
          /**
2033
           * Owner's verified email. Values are verified or provided by the wallet directly (if
2034
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
2035
           */
2036
          @SerializedName("email")
2037
          String email;
2038

2039
          /**
2040
           * Owner's verified full name. Values are verified or provided by the wallet directly (if
2041
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
2042
           */
2043
          @SerializedName("name")
2044
          String name;
2045

2046
          /**
2047
           * Owner's verified shipping address. Values are verified or provided by the wallet
2048
           * directly (if supported) at the time of authorization or settlement. They cannot be set
2049
           * or mutated.
2050
           */
2051
          @SerializedName("shipping_address")
2052
          Address shippingAddress;
2053
        }
2054
      }
2055
    }
2056

2057
    @Getter
2058
    @Setter
2059
    @EqualsAndHashCode(callSuper = false)
2060
    public static class CardPresent extends StripeObject {
×
2061
      /** The authorized amount. */
2062
      @SerializedName("amount_authorized")
2063
      Long amountAuthorized;
2064

2065
      /**
2066
       * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
2067
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
2068
       */
2069
      @SerializedName("brand")
2070
      String brand;
2071

2072
      /**
2073
       * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that identifies
2074
       * the specific program or product associated with a card.
2075
       */
2076
      @SerializedName("brand_product")
2077
      String brandProduct;
2078

2079
      /**
2080
       * When using manual capture, a future timestamp after which the charge will be automatically
2081
       * refunded if uncaptured.
2082
       */
2083
      @SerializedName("capture_before")
2084
      Long captureBefore;
2085

2086
      /**
2087
       * The cardholder name as read from the card, in <a
2088
       * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
2089
       * alphanumeric characters, special characters and first/last name separator ({@code /}). In
2090
       * some cases, the cardholder name may not be available depending on how the issuer has
2091
       * configured the card. Cardholder name is typically not available on swipe or contactless
2092
       * payments, such as those made with Apple Pay and Google Pay.
2093
       */
2094
      @SerializedName("cardholder_name")
2095
      String cardholderName;
2096

2097
      /**
2098
       * Two-letter ISO code representing the country of the card. You could use this attribute to
2099
       * get a sense of the international breakdown of cards you've collected.
2100
       */
2101
      @SerializedName("country")
2102
      String country;
2103

2104
      /**
2105
       * A high-level description of the type of cards issued in this range. (For internal use only
2106
       * and not typically available in standard API requests.)
2107
       */
2108
      @SerializedName("description")
2109
      String description;
2110

2111
      /** Authorization response cryptogram. */
2112
      @SerializedName("emv_auth_data")
2113
      String emvAuthData;
2114

2115
      /** Two-digit number representing the card's expiration month. */
2116
      @SerializedName("exp_month")
2117
      Long expMonth;
2118

2119
      /** Four-digit number representing the card's expiration year. */
2120
      @SerializedName("exp_year")
2121
      Long expYear;
2122

2123
      /**
2124
       * Uniquely identifies this particular card number. You can use this attribute to check
2125
       * whether two customers who’ve signed up with you are using the same card number, for
2126
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
2127
       * tokenized number might be provided instead of the underlying card number.
2128
       *
2129
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
2130
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
2131
       */
2132
      @SerializedName("fingerprint")
2133
      String fingerprint;
2134

2135
      /**
2136
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
2137
       * unknown}.
2138
       */
2139
      @SerializedName("funding")
2140
      String funding;
2141

2142
      /**
2143
       * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be
2144
       * attached to a Customer for future transactions. Only present if it was possible to generate
2145
       * a card PaymentMethod.
2146
       */
2147
      @SerializedName("generated_card")
2148
      String generatedCard;
2149

2150
      /**
2151
       * Issuer identification number of the card. (For internal use only and not typically
2152
       * available in standard API requests.)
2153
       */
2154
      @SerializedName("iin")
2155
      String iin;
2156

2157
      /**
2158
       * Whether this <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> is
2159
       * eligible for incremental authorizations. Request support using <a
2160
       * href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support</a>.
2161
       */
2162
      @SerializedName("incremental_authorization_supported")
2163
      Boolean incrementalAuthorizationSupported;
2164

2165
      /**
2166
       * The name of the card's issuing bank. (For internal use only and not typically available in
2167
       * standard API requests.)
2168
       */
2169
      @SerializedName("issuer")
2170
      String issuer;
2171

2172
      /** The last four digits of the card. */
2173
      @SerializedName("last4")
2174
      String last4;
2175

2176
      /**
2177
       * Identifies which network this charge was processed on. Can be {@code amex}, {@code
2178
       * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
2179
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
2180
       */
2181
      @SerializedName("network")
2182
      String network;
2183

2184
      /**
2185
       * This is used by the financial networks to identify a transaction. Visa calls this the
2186
       * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the
2187
       * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network
2188
       * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent
2189
       * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American
2190
       * Express transactions and always null for other card brands.
2191
       */
2192
      @SerializedName("network_transaction_id")
2193
      String networkTransactionId;
2194

2195
      /** Details about payments collected offline. */
2196
      @SerializedName("offline")
2197
      Offline offline;
2198

2199
      /** Defines whether the authorized amount can be over-captured or not. */
2200
      @SerializedName("overcapture_supported")
2201
      Boolean overcaptureSupported;
2202

2203
      /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
2204
      @SerializedName("preferred_locales")
2205
      List<String> preferredLocales;
2206

2207
      /**
2208
       * How card details were read in this transaction.
2209
       *
2210
       * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
2211
       * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
2212
       */
2213
      @SerializedName("read_method")
2214
      String readMethod;
2215

2216
      /**
2217
       * A collection of fields required to be displayed on receipts. Only required for EMV
2218
       * transactions.
2219
       */
2220
      @SerializedName("receipt")
2221
      Receipt receipt;
2222

2223
      @SerializedName("wallet")
2224
      Wallet wallet;
2225

2226
      @Getter
2227
      @Setter
2228
      @EqualsAndHashCode(callSuper = false)
2229
      public static class Offline extends StripeObject {
×
2230
        /** Time at which the payment was collected while offline. */
2231
        @SerializedName("stored_at")
2232
        Long storedAt;
2233

2234
        /**
2235
         * The method used to process this payment method offline. Only deferred is allowed.
2236
         *
2237
         * <p>Equal to {@code deferred}.
2238
         */
2239
        @SerializedName("type")
2240
        String type;
2241
      }
2242

2243
      @Getter
2244
      @Setter
2245
      @EqualsAndHashCode(callSuper = false)
2246
      public static class Receipt extends StripeObject {
×
2247
        /**
2248
         * The type of account being debited or credited
2249
         *
2250
         * <p>One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}.
2251
         */
2252
        @SerializedName("account_type")
2253
        String accountType;
2254

2255
        /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */
2256
        @SerializedName("application_cryptogram")
2257
        String applicationCryptogram;
2258

2259
        /** Mnenomic of the Application Identifier. */
2260
        @SerializedName("application_preferred_name")
2261
        String applicationPreferredName;
2262

2263
        /** Identifier for this transaction. */
2264
        @SerializedName("authorization_code")
2265
        String authorizationCode;
2266

2267
        /** EMV tag 8A. A code returned by the card issuer. */
2268
        @SerializedName("authorization_response_code")
2269
        String authorizationResponseCode;
2270

2271
        /**
2272
         * Describes the method used by the cardholder to verify ownership of the card. One of the
2273
         * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code
2274
         * offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
2275
         */
2276
        @SerializedName("cardholder_verification_method")
2277
        String cardholderVerificationMethod;
2278

2279
        /**
2280
         * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
2281
         */
2282
        @SerializedName("dedicated_file_name")
2283
        String dedicatedFileName;
2284

2285
        /** The outcome of a series of EMV functions performed by the card reader. */
2286
        @SerializedName("terminal_verification_results")
2287
        String terminalVerificationResults;
2288

2289
        /** An indication of various EMV functions performed during the transaction. */
2290
        @SerializedName("transaction_status_information")
2291
        String transactionStatusInformation;
2292
      }
2293

2294
      @Getter
2295
      @Setter
2296
      @EqualsAndHashCode(callSuper = false)
2297
      public static class Wallet extends StripeObject {
×
2298
        /**
2299
         * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
2300
         * samsung_pay}, or {@code unknown}.
2301
         */
2302
        @SerializedName("type")
2303
        String type;
2304
      }
2305
    }
2306

2307
    @Getter
2308
    @Setter
2309
    @EqualsAndHashCode(callSuper = false)
2310
    public static class Cashapp extends StripeObject {
×
2311
      /** A unique and immutable identifier assigned by Cash App to every buyer. */
2312
      @SerializedName("buyer_id")
2313
      String buyerId;
2314

2315
      /** A public identifier for buyers using Cash App. */
2316
      @SerializedName("cashtag")
2317
      String cashtag;
2318
    }
2319

2320
    @Getter
2321
    @Setter
2322
    @EqualsAndHashCode(callSuper = false)
2323
    public static class CustomerBalance extends StripeObject {}
×
2324

2325
    @Getter
2326
    @Setter
2327
    @EqualsAndHashCode(callSuper = false)
2328
    public static class Eps extends StripeObject {
×
2329
      /**
2330
       * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code
2331
       * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code
2332
       * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code
2333
       * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag},
2334
       * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code
2335
       * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code
2336
       * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark},
2337
       * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code
2338
       * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag},
2339
       * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code
2340
       * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code
2341
       * vr_bank_braunau}.
2342
       */
2343
      @SerializedName("bank")
2344
      String bank;
2345

2346
      /**
2347
       * Owner's verified full name. Values are verified or provided by EPS directly (if supported)
2348
       * at the time of authorization or settlement. They cannot be set or mutated. EPS rarely
2349
       * provides this information so the attribute is usually empty.
2350
       */
2351
      @SerializedName("verified_name")
2352
      String verifiedName;
2353
    }
2354

2355
    @Getter
2356
    @Setter
2357
    @EqualsAndHashCode(callSuper = false)
2358
    public static class Fpx extends StripeObject {
×
2359
      /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */
2360
      @SerializedName("account_holder_type")
2361
      String accountHolderType;
2362

2363
      /**
2364
       * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code
2365
       * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code
2366
       * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code
2367
       * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code
2368
       * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code
2369
       * pb_enterprise}, or {@code bank_of_china}.
2370
       */
2371
      @SerializedName("bank")
2372
      String bank;
2373

2374
      /** Unique transaction id generated by FPX for every request from the merchant. */
2375
      @SerializedName("transaction_id")
2376
      String transactionId;
2377
    }
2378

2379
    @Getter
2380
    @Setter
2381
    @EqualsAndHashCode(callSuper = false)
2382
    public static class Giropay extends StripeObject {
×
2383
      /** Bank code of bank associated with the bank account. */
2384
      @SerializedName("bank_code")
2385
      String bankCode;
2386

2387
      /** Name of the bank associated with the bank account. */
2388
      @SerializedName("bank_name")
2389
      String bankName;
2390

2391
      /** Bank Identifier Code of the bank associated with the bank account. */
2392
      @SerializedName("bic")
2393
      String bic;
2394

2395
      /**
2396
       * Owner's verified full name. Values are verified or provided by Giropay directly (if
2397
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
2398
       * Giropay rarely provides this information so the attribute is usually empty.
2399
       */
2400
      @SerializedName("verified_name")
2401
      String verifiedName;
2402
    }
2403

2404
    @Getter
2405
    @Setter
2406
    @EqualsAndHashCode(callSuper = false)
2407
    public static class Grabpay extends StripeObject {
×
2408
      /** Unique transaction id generated by GrabPay. */
2409
      @SerializedName("transaction_id")
2410
      String transactionId;
2411
    }
2412

2413
    @Getter
2414
    @Setter
2415
    @EqualsAndHashCode(callSuper = false)
2416
    public static class Ideal extends StripeObject {
×
2417
      /**
2418
       * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code
2419
       * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code
2420
       * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank},
2421
       * {@code van_lanschot}, or {@code yoursafe}.
2422
       */
2423
      @SerializedName("bank")
2424
      String bank;
2425

2426
      /**
2427
       * The Bank Identifier Code of the customer's bank.
2428
       *
2429
       * <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
2430
       * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
2431
       * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code
2432
       * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
2433
       */
2434
      @SerializedName("bic")
2435
      String bic;
2436

2437
      /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
2438
      @SerializedName("generated_sepa_debit")
2439
      @Getter(lombok.AccessLevel.NONE)
2440
      @Setter(lombok.AccessLevel.NONE)
2441
      ExpandableField<PaymentMethod> generatedSepaDebit;
2442

2443
      /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
2444
      @SerializedName("generated_sepa_debit_mandate")
2445
      @Getter(lombok.AccessLevel.NONE)
2446
      @Setter(lombok.AccessLevel.NONE)
2447
      ExpandableField<Mandate> generatedSepaDebitMandate;
2448

2449
      /** Last four characters of the IBAN. */
2450
      @SerializedName("iban_last4")
2451
      String ibanLast4;
2452

2453
      /**
2454
       * Owner's verified full name. Values are verified or provided by iDEAL directly (if
2455
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
2456
       */
2457
      @SerializedName("verified_name")
2458
      String verifiedName;
2459

2460
      /** Get ID of expandable {@code generatedSepaDebit} object. */
2461
      public String getGeneratedSepaDebit() {
2462
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null;
×
2463
      }
2464

2465
      public void setGeneratedSepaDebit(String id) {
2466
        this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit);
×
2467
      }
×
2468

2469
      /** Get expanded {@code generatedSepaDebit}. */
2470
      public PaymentMethod getGeneratedSepaDebitObject() {
2471
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null;
×
2472
      }
2473

2474
      public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) {
2475
        this.generatedSepaDebit =
×
2476
            new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
2477
      }
×
2478

2479
      /** Get ID of expandable {@code generatedSepaDebitMandate} object. */
2480
      public String getGeneratedSepaDebitMandate() {
2481
        return (this.generatedSepaDebitMandate != null)
×
2482
            ? this.generatedSepaDebitMandate.getId()
×
2483
            : null;
×
2484
      }
2485

2486
      public void setGeneratedSepaDebitMandate(String id) {
2487
        this.generatedSepaDebitMandate =
×
2488
            ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate);
×
2489
      }
×
2490

2491
      /** Get expanded {@code generatedSepaDebitMandate}. */
2492
      public Mandate getGeneratedSepaDebitMandateObject() {
2493
        return (this.generatedSepaDebitMandate != null)
×
2494
            ? this.generatedSepaDebitMandate.getExpanded()
×
2495
            : null;
×
2496
      }
2497

2498
      public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) {
2499
        this.generatedSepaDebitMandate =
×
2500
            new ExpandableField<Mandate>(expandableObject.getId(), expandableObject);
×
2501
      }
×
2502
    }
2503

2504
    @Getter
2505
    @Setter
2506
    @EqualsAndHashCode(callSuper = false)
2507
    public static class InteracPresent extends StripeObject {
×
2508
      /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */
2509
      @SerializedName("brand")
2510
      String brand;
2511

2512
      /**
2513
       * The cardholder name as read from the card, in <a
2514
       * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
2515
       * alphanumeric characters, special characters and first/last name separator ({@code /}). In
2516
       * some cases, the cardholder name may not be available depending on how the issuer has
2517
       * configured the card. Cardholder name is typically not available on swipe or contactless
2518
       * payments, such as those made with Apple Pay and Google Pay.
2519
       */
2520
      @SerializedName("cardholder_name")
2521
      String cardholderName;
2522

2523
      /**
2524
       * Two-letter ISO code representing the country of the card. You could use this attribute to
2525
       * get a sense of the international breakdown of cards you've collected.
2526
       */
2527
      @SerializedName("country")
2528
      String country;
2529

2530
      /**
2531
       * A high-level description of the type of cards issued in this range. (For internal use only
2532
       * and not typically available in standard API requests.)
2533
       */
2534
      @SerializedName("description")
2535
      String description;
2536

2537
      /** Authorization response cryptogram. */
2538
      @SerializedName("emv_auth_data")
2539
      String emvAuthData;
2540

2541
      /** Two-digit number representing the card's expiration month. */
2542
      @SerializedName("exp_month")
2543
      Long expMonth;
2544

2545
      /** Four-digit number representing the card's expiration year. */
2546
      @SerializedName("exp_year")
2547
      Long expYear;
2548

2549
      /**
2550
       * Uniquely identifies this particular card number. You can use this attribute to check
2551
       * whether two customers who’ve signed up with you are using the same card number, for
2552
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
2553
       * tokenized number might be provided instead of the underlying card number.
2554
       *
2555
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
2556
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
2557
       */
2558
      @SerializedName("fingerprint")
2559
      String fingerprint;
2560

2561
      /**
2562
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
2563
       * unknown}.
2564
       */
2565
      @SerializedName("funding")
2566
      String funding;
2567

2568
      /**
2569
       * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be
2570
       * attached to a Customer for future transactions. Only present if it was possible to generate
2571
       * a card PaymentMethod.
2572
       */
2573
      @SerializedName("generated_card")
2574
      String generatedCard;
2575

2576
      /**
2577
       * Issuer identification number of the card. (For internal use only and not typically
2578
       * available in standard API requests.)
2579
       */
2580
      @SerializedName("iin")
2581
      String iin;
2582

2583
      /**
2584
       * The name of the card's issuing bank. (For internal use only and not typically available in
2585
       * standard API requests.)
2586
       */
2587
      @SerializedName("issuer")
2588
      String issuer;
2589

2590
      /** The last four digits of the card. */
2591
      @SerializedName("last4")
2592
      String last4;
2593

2594
      /**
2595
       * Identifies which network this charge was processed on. Can be {@code amex}, {@code
2596
       * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
2597
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
2598
       */
2599
      @SerializedName("network")
2600
      String network;
2601

2602
      /**
2603
       * This is used by the financial networks to identify a transaction. Visa calls this the
2604
       * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the
2605
       * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network
2606
       * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent
2607
       * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American
2608
       * Express transactions and always null for other card brands.
2609
       */
2610
      @SerializedName("network_transaction_id")
2611
      String networkTransactionId;
2612

2613
      /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
2614
      @SerializedName("preferred_locales")
2615
      List<String> preferredLocales;
2616

2617
      /**
2618
       * How card details were read in this transaction.
2619
       *
2620
       * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
2621
       * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
2622
       */
2623
      @SerializedName("read_method")
2624
      String readMethod;
2625

2626
      /**
2627
       * A collection of fields required to be displayed on receipts. Only required for EMV
2628
       * transactions.
2629
       */
2630
      @SerializedName("receipt")
2631
      Receipt receipt;
2632

2633
      @Getter
2634
      @Setter
2635
      @EqualsAndHashCode(callSuper = false)
2636
      public static class Receipt extends StripeObject {
×
2637
        /**
2638
         * The type of account being debited or credited
2639
         *
2640
         * <p>One of {@code checking}, {@code savings}, or {@code unknown}.
2641
         */
2642
        @SerializedName("account_type")
2643
        String accountType;
2644

2645
        /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */
2646
        @SerializedName("application_cryptogram")
2647
        String applicationCryptogram;
2648

2649
        /** Mnenomic of the Application Identifier. */
2650
        @SerializedName("application_preferred_name")
2651
        String applicationPreferredName;
2652

2653
        /** Identifier for this transaction. */
2654
        @SerializedName("authorization_code")
2655
        String authorizationCode;
2656

2657
        /** EMV tag 8A. A code returned by the card issuer. */
2658
        @SerializedName("authorization_response_code")
2659
        String authorizationResponseCode;
2660

2661
        /**
2662
         * Describes the method used by the cardholder to verify ownership of the card. One of the
2663
         * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code
2664
         * offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
2665
         */
2666
        @SerializedName("cardholder_verification_method")
2667
        String cardholderVerificationMethod;
2668

2669
        /**
2670
         * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
2671
         */
2672
        @SerializedName("dedicated_file_name")
2673
        String dedicatedFileName;
2674

2675
        /** The outcome of a series of EMV functions performed by the card reader. */
2676
        @SerializedName("terminal_verification_results")
2677
        String terminalVerificationResults;
2678

2679
        /** An indication of various EMV functions performed during the transaction. */
2680
        @SerializedName("transaction_status_information")
2681
        String transactionStatusInformation;
2682
      }
2683
    }
2684

2685
    @Getter
2686
    @Setter
2687
    @EqualsAndHashCode(callSuper = false)
2688
    public static class Klarna extends StripeObject {
×
2689
      /**
2690
       * The Klarna payment method used for this transaction. Can be one of {@code pay_later},
2691
       * {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments}
2692
       */
2693
      @SerializedName("payment_method_category")
2694
      String paymentMethodCategory;
2695

2696
      /**
2697
       * Preferred language of the Klarna authorization page that the customer is redirected to. Can
2698
       * be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code en-BE}, {@code
2699
       * de-DE}, {@code en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code en-ES}, {@code
2700
       * fi-FI}, {@code sv-FI}, {@code en-FI}, {@code en-GB}, {@code en-IE}, {@code it-IT}, {@code
2701
       * en-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code en-NO}, {@code sv-SE}, {@code
2702
       * en-SE}, {@code en-US}, {@code es-US}, {@code fr-FR}, {@code en-FR}, {@code cs-CZ}, {@code
2703
       * en-CZ}, {@code ro-RO}, {@code en-RO}, {@code el-GR}, {@code en-GR}, {@code en-AU}, {@code
2704
       * en-NZ}, {@code en-CA}, {@code fr-CA}, {@code pl-PL}, {@code en-PL}, {@code pt-PT}, {@code
2705
       * en-PT}, {@code de-CH}, {@code fr-CH}, {@code it-CH}, or {@code en-CH}
2706
       */
2707
      @SerializedName("preferred_locale")
2708
      String preferredLocale;
2709
    }
2710

2711
    @Getter
2712
    @Setter
2713
    @EqualsAndHashCode(callSuper = false)
2714
    public static class Konbini extends StripeObject {
×
2715
      /**
2716
       * If the payment succeeded, this contains the details of the convenience store where the
2717
       * payment was completed.
2718
       */
2719
      @SerializedName("store")
2720
      Store store;
2721

2722
      @Getter
2723
      @Setter
2724
      @EqualsAndHashCode(callSuper = false)
2725
      public static class Store extends StripeObject {
×
2726
        /**
2727
         * The name of the convenience store chain where the payment was completed.
2728
         *
2729
         * <p>One of {@code familymart}, {@code lawson}, {@code ministop}, or {@code seicomart}.
2730
         */
2731
        @SerializedName("chain")
2732
        String chain;
2733
      }
2734
    }
2735

2736
    @Getter
2737
    @Setter
2738
    @EqualsAndHashCode(callSuper = false)
2739
    public static class Link extends StripeObject {
×
2740
      /**
2741
       * Two-letter ISO code representing the funding source country beneath the Link payment. You
2742
       * could use this attribute to get a sense of international fees.
2743
       */
2744
      @SerializedName("country")
2745
      String country;
2746
    }
2747

2748
    @Getter
2749
    @Setter
2750
    @EqualsAndHashCode(callSuper = false)
2751
    public static class MbWay extends StripeObject {}
×
2752

2753
    @Getter
2754
    @Setter
2755
    @EqualsAndHashCode(callSuper = false)
2756
    public static class Mobilepay extends StripeObject {
×
2757
      /** Internal card details. */
2758
      @SerializedName("card")
2759
      Card card;
2760

2761
      @Getter
2762
      @Setter
2763
      @EqualsAndHashCode(callSuper = false)
2764
      public static class Card extends StripeObject {
×
2765
        /** Brand of the card used in the transaction. */
2766
        @SerializedName("brand")
2767
        String brand;
2768

2769
        /** Two-letter ISO code representing the country of the card. */
2770
        @SerializedName("country")
2771
        String country;
2772

2773
        /** Two digit number representing the card's expiration month. */
2774
        @SerializedName("exp_month")
2775
        Long expMonth;
2776

2777
        /** Two digit number representing the card's expiration year. */
2778
        @SerializedName("exp_year")
2779
        Long expYear;
2780

2781
        /** The last 4 digits of the card. */
2782
        @SerializedName("last4")
2783
        String last4;
2784
      }
2785
    }
2786

2787
    @Getter
2788
    @Setter
2789
    @EqualsAndHashCode(callSuper = false)
2790
    public static class Multibanco extends StripeObject {
×
2791
      /** Entity number associated with this Multibanco payment. */
2792
      @SerializedName("entity")
2793
      String entity;
2794

2795
      /** Reference number associated with this Multibanco payment. */
2796
      @SerializedName("reference")
2797
      String reference;
2798
    }
2799

2800
    @Getter
2801
    @Setter
2802
    @EqualsAndHashCode(callSuper = false)
2803
    public static class Oxxo extends StripeObject {
×
2804
      /** OXXO reference number. */
2805
      @SerializedName("number")
2806
      String number;
2807
    }
2808

2809
    @Getter
2810
    @Setter
2811
    @EqualsAndHashCode(callSuper = false)
2812
    public static class P24 extends StripeObject {
×
2813
      /**
2814
       * The customer's bank. Can be one of {@code ing}, {@code citi_handlowy}, {@code
2815
       * tmobile_usbugi_bankowe}, {@code plus_bank}, {@code etransfer_pocztowy24}, {@code
2816
       * banki_spbdzielcze}, {@code bank_nowy_bfg_sa}, {@code getin_bank}, {@code velobank}, {@code
2817
       * blik}, {@code noble_pay}, {@code ideabank}, {@code envelobank}, {@code
2818
       * santander_przelew24}, {@code nest_przelew}, {@code mbank_mtransfer}, {@code inteligo},
2819
       * {@code pbac_z_ipko}, {@code bnp_paribas}, {@code credit_agricole}, {@code toyota_bank},
2820
       * {@code bank_pekao_sa}, {@code volkswagen_bank}, {@code bank_millennium}, {@code
2821
       * alior_bank}, or {@code boz}.
2822
       */
2823
      @SerializedName("bank")
2824
      String bank;
2825

2826
      /** Unique reference for this Przelewy24 payment. */
2827
      @SerializedName("reference")
2828
      String reference;
2829

2830
      /**
2831
       * Owner's verified full name. Values are verified or provided by Przelewy24 directly (if
2832
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
2833
       * Przelewy24 rarely provides this information so the attribute is usually empty.
2834
       */
2835
      @SerializedName("verified_name")
2836
      String verifiedName;
2837
    }
2838

2839
    @Getter
2840
    @Setter
2841
    @EqualsAndHashCode(callSuper = false)
2842
    public static class Paynow extends StripeObject {
×
2843
      /** Reference number associated with this PayNow payment. */
2844
      @SerializedName("reference")
2845
      String reference;
2846
    }
2847

2848
    @Getter
2849
    @Setter
2850
    @EqualsAndHashCode(callSuper = false)
2851
    public static class Paypal extends StripeObject {
×
2852
      /**
2853
       * Owner's email. Values are provided by PayPal directly (if supported) at the time of
2854
       * authorization or settlement. They cannot be set or mutated.
2855
       */
2856
      @SerializedName("payer_email")
2857
      String payerEmail;
2858

2859
      /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */
2860
      @SerializedName("payer_id")
2861
      String payerId;
2862

2863
      /**
2864
       * Owner's full name. Values provided by PayPal directly (if supported) at the time of
2865
       * authorization or settlement. They cannot be set or mutated.
2866
       */
2867
      @SerializedName("payer_name")
2868
      String payerName;
2869

2870
      /**
2871
       * The level of protection offered as defined by PayPal Seller Protection for Merchants, for
2872
       * this transaction.
2873
       */
2874
      @SerializedName("seller_protection")
2875
      SellerProtection sellerProtection;
2876

2877
      /**
2878
       * The shipping address for the customer, as supplied by the merchant at the point of payment
2879
       * execution. This shipping address will not be updated if the merchant updates the shipping
2880
       * address on the PaymentIntent after the PaymentIntent was successfully confirmed.
2881
       */
2882
      @SerializedName("shipping")
2883
      Address shipping;
2884

2885
      /** A unique ID generated by PayPal for this transaction. */
2886
      @SerializedName("transaction_id")
2887
      String transactionId;
2888

2889
      /**
2890
       * The shipping address for the customer, as supplied by the merchant at the point of payment
2891
       * execution. This shipping address will not be updated if the merchant updates the shipping
2892
       * address on the PaymentIntent after the PaymentIntent was successfully confirmed.
2893
       */
2894
      @SerializedName("verified_address")
2895
      Address verifiedAddress;
2896

2897
      /**
2898
       * Owner's verified email. Values are verified or provided by PayPal directly (if supported)
2899
       * at the time of authorization or settlement. They cannot be set or mutated.
2900
       */
2901
      @SerializedName("verified_email")
2902
      String verifiedEmail;
2903

2904
      /**
2905
       * Owner's verified full name. Values are verified or provided by PayPal directly (if
2906
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
2907
       */
2908
      @SerializedName("verified_name")
2909
      String verifiedName;
2910

2911
      @Getter
2912
      @Setter
2913
      @EqualsAndHashCode(callSuper = false)
2914
      public static class SellerProtection extends StripeObject {
×
2915
        /** An array of conditions that are covered for the transaction, if applicable. */
2916
        @SerializedName("dispute_categories")
2917
        List<String> disputeCategories;
2918

2919
        /**
2920
         * Indicates whether the transaction is eligible for PayPal's seller protection.
2921
         *
2922
         * <p>One of {@code eligible}, {@code not_eligible}, or {@code partially_eligible}.
2923
         */
2924
        @SerializedName("status")
2925
        String status;
2926
      }
2927
    }
2928

2929
    @Getter
2930
    @Setter
2931
    @EqualsAndHashCode(callSuper = false)
2932
    public static class Payto extends StripeObject {
×
2933
      /** Bank-State-Branch number of the bank account. */
2934
      @SerializedName("bsb_number")
2935
      String bsbNumber;
2936

2937
      /** Last four digits of the bank account number. */
2938
      @SerializedName("last4")
2939
      String last4;
2940

2941
      /** ID of the mandate used to make this payment. */
2942
      @SerializedName("mandate")
2943
      String mandate;
2944

2945
      /** The PayID alias for the bank account. */
2946
      @SerializedName("pay_id")
2947
      String payId;
2948
    }
2949

2950
    @Getter
2951
    @Setter
2952
    @EqualsAndHashCode(callSuper = false)
2953
    public static class Pix extends StripeObject {
×
2954
      /** Unique transaction id generated by BCB. */
2955
      @SerializedName("bank_transaction_id")
2956
      String bankTransactionId;
2957
    }
2958

2959
    @Getter
2960
    @Setter
2961
    @EqualsAndHashCode(callSuper = false)
2962
    public static class Promptpay extends StripeObject {
×
2963
      /** Bill reference generated by PromptPay. */
2964
      @SerializedName("reference")
2965
      String reference;
2966
    }
2967

2968
    @Getter
2969
    @Setter
2970
    @EqualsAndHashCode(callSuper = false)
2971
    public static class Rechnung extends StripeObject {}
×
2972

2973
    @Getter
2974
    @Setter
2975
    @EqualsAndHashCode(callSuper = false)
2976
    public static class RevolutPay extends StripeObject {}
×
2977

2978
    @Getter
2979
    @Setter
2980
    @EqualsAndHashCode(callSuper = false)
2981
    public static class SepaCreditTransfer extends StripeObject {
×
2982
      /** Name of the bank associated with the bank account. */
2983
      @SerializedName("bank_name")
2984
      String bankName;
2985

2986
      /** Bank Identifier Code of the bank associated with the bank account. */
2987
      @SerializedName("bic")
2988
      String bic;
2989

2990
      /** IBAN of the bank account to transfer funds to. */
2991
      @SerializedName("iban")
2992
      String iban;
2993
    }
2994

2995
    @Getter
2996
    @Setter
2997
    @EqualsAndHashCode(callSuper = false)
2998
    public static class SepaDebit extends StripeObject {
×
2999
      /** Bank code of bank associated with the bank account. */
3000
      @SerializedName("bank_code")
3001
      String bankCode;
3002

3003
      /** Branch code of bank associated with the bank account. */
3004
      @SerializedName("branch_code")
3005
      String branchCode;
3006

3007
      /** Two-letter ISO code representing the country the bank account is located in. */
3008
      @SerializedName("country")
3009
      String country;
3010

3011
      /**
3012
       * Uniquely identifies this particular bank account. You can use this attribute to check
3013
       * whether two bank accounts are the same.
3014
       */
3015
      @SerializedName("fingerprint")
3016
      String fingerprint;
3017

3018
      /** Last four characters of the IBAN. */
3019
      @SerializedName("last4")
3020
      String last4;
3021

3022
      /**
3023
       * Find the ID of the mandate used for this payment under the <a
3024
       * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate">payment_method_details.sepa_debit.mandate</a>
3025
       * property on the Charge. Use this mandate ID to <a
3026
       * href="https://stripe.com/docs/api/mandates/retrieve">retrieve the Mandate</a>.
3027
       */
3028
      @SerializedName("mandate")
3029
      String mandate;
3030
    }
3031

3032
    @Getter
3033
    @Setter
3034
    @EqualsAndHashCode(callSuper = false)
3035
    public static class Sofort extends StripeObject {
×
3036
      /** Bank code of bank associated with the bank account. */
3037
      @SerializedName("bank_code")
3038
      String bankCode;
3039

3040
      /** Name of the bank associated with the bank account. */
3041
      @SerializedName("bank_name")
3042
      String bankName;
3043

3044
      /** Bank Identifier Code of the bank associated with the bank account. */
3045
      @SerializedName("bic")
3046
      String bic;
3047

3048
      /** Two-letter ISO code representing the country the bank account is located in. */
3049
      @SerializedName("country")
3050
      String country;
3051

3052
      /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
3053
      @SerializedName("generated_sepa_debit")
3054
      @Getter(lombok.AccessLevel.NONE)
3055
      @Setter(lombok.AccessLevel.NONE)
3056
      ExpandableField<PaymentMethod> generatedSepaDebit;
3057

3058
      /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */
3059
      @SerializedName("generated_sepa_debit_mandate")
3060
      @Getter(lombok.AccessLevel.NONE)
3061
      @Setter(lombok.AccessLevel.NONE)
3062
      ExpandableField<Mandate> generatedSepaDebitMandate;
3063

3064
      /** Last four characters of the IBAN. */
3065
      @SerializedName("iban_last4")
3066
      String ibanLast4;
3067

3068
      /**
3069
       * Preferred language of the SOFORT authorization page that the customer is redirected to. Can
3070
       * be one of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code
3071
       * pl}
3072
       */
3073
      @SerializedName("preferred_language")
3074
      String preferredLanguage;
3075

3076
      /**
3077
       * Owner's verified full name. Values are verified or provided by SOFORT directly (if
3078
       * supported) at the time of authorization or settlement. They cannot be set or mutated.
3079
       */
3080
      @SerializedName("verified_name")
3081
      String verifiedName;
3082

3083
      /** Get ID of expandable {@code generatedSepaDebit} object. */
3084
      public String getGeneratedSepaDebit() {
3085
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null;
×
3086
      }
3087

3088
      public void setGeneratedSepaDebit(String id) {
3089
        this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit);
×
3090
      }
×
3091

3092
      /** Get expanded {@code generatedSepaDebit}. */
3093
      public PaymentMethod getGeneratedSepaDebitObject() {
3094
        return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null;
×
3095
      }
3096

3097
      public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) {
3098
        this.generatedSepaDebit =
×
3099
            new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
3100
      }
×
3101

3102
      /** Get ID of expandable {@code generatedSepaDebitMandate} object. */
3103
      public String getGeneratedSepaDebitMandate() {
3104
        return (this.generatedSepaDebitMandate != null)
×
3105
            ? this.generatedSepaDebitMandate.getId()
×
3106
            : null;
×
3107
      }
3108

3109
      public void setGeneratedSepaDebitMandate(String id) {
3110
        this.generatedSepaDebitMandate =
×
3111
            ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate);
×
3112
      }
×
3113

3114
      /** Get expanded {@code generatedSepaDebitMandate}. */
3115
      public Mandate getGeneratedSepaDebitMandateObject() {
3116
        return (this.generatedSepaDebitMandate != null)
×
3117
            ? this.generatedSepaDebitMandate.getExpanded()
×
3118
            : null;
×
3119
      }
3120

3121
      public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) {
3122
        this.generatedSepaDebitMandate =
×
3123
            new ExpandableField<Mandate>(expandableObject.getId(), expandableObject);
×
3124
      }
×
3125
    }
3126

3127
    @Getter
3128
    @Setter
3129
    @EqualsAndHashCode(callSuper = false)
3130
    public static class StripeAccount extends StripeObject {}
×
3131

3132
    @Getter
3133
    @Setter
3134
    @EqualsAndHashCode(callSuper = false)
3135
    public static class Swish extends StripeObject {
×
3136
      /**
3137
       * Uniquely identifies the payer's Swish account. You can use this attribute to check whether
3138
       * two Swish transactions were paid for by the same payer
3139
       */
3140
      @SerializedName("fingerprint")
3141
      String fingerprint;
3142

3143
      /** Payer bank reference number for the payment. */
3144
      @SerializedName("payment_reference")
3145
      String paymentReference;
3146

3147
      /** The last four digits of the Swish account phone number. */
3148
      @SerializedName("verified_phone_last4")
3149
      String verifiedPhoneLast4;
3150
    }
3151

3152
    @Getter
3153
    @Setter
3154
    @EqualsAndHashCode(callSuper = false)
3155
    public static class Twint extends StripeObject {}
×
3156

3157
    @Getter
3158
    @Setter
3159
    @EqualsAndHashCode(callSuper = false)
3160
    public static class UsBankAccount extends StripeObject {
×
3161
      /**
3162
       * Account holder type: individual or company.
3163
       *
3164
       * <p>One of {@code company}, or {@code individual}.
3165
       */
3166
      @SerializedName("account_holder_type")
3167
      String accountHolderType;
3168

3169
      /**
3170
       * Account type: checkings or savings. Defaults to checking if omitted.
3171
       *
3172
       * <p>One of {@code checking}, or {@code savings}.
3173
       */
3174
      @SerializedName("account_type")
3175
      String accountType;
3176

3177
      /** Name of the bank associated with the bank account. */
3178
      @SerializedName("bank_name")
3179
      String bankName;
3180

3181
      /**
3182
       * Uniquely identifies this particular bank account. You can use this attribute to check
3183
       * whether two bank accounts are the same.
3184
       */
3185
      @SerializedName("fingerprint")
3186
      String fingerprint;
3187

3188
      /** Last four digits of the bank account number. */
3189
      @SerializedName("last4")
3190
      String last4;
3191

3192
      /** ID of the mandate used to make this payment. */
3193
      @SerializedName("mandate")
3194
      @Getter(lombok.AccessLevel.NONE)
3195
      @Setter(lombok.AccessLevel.NONE)
3196
      ExpandableField<Mandate> mandate;
3197

3198
      /** Reference number to locate ACH payments with customer's bank. */
3199
      @SerializedName("payment_reference")
3200
      String paymentReference;
3201

3202
      /** Routing number of the bank account. */
3203
      @SerializedName("routing_number")
3204
      String routingNumber;
3205

3206
      /** Get ID of expandable {@code mandate} object. */
3207
      public String getMandate() {
3208
        return (this.mandate != null) ? this.mandate.getId() : null;
×
3209
      }
3210

3211
      public void setMandate(String id) {
3212
        this.mandate = ApiResource.setExpandableFieldId(id, this.mandate);
×
3213
      }
×
3214

3215
      /** Get expanded {@code mandate}. */
3216
      public Mandate getMandateObject() {
3217
        return (this.mandate != null) ? this.mandate.getExpanded() : null;
×
3218
      }
3219

3220
      public void setMandateObject(Mandate expandableObject) {
3221
        this.mandate = new ExpandableField<Mandate>(expandableObject.getId(), expandableObject);
×
3222
      }
×
3223
    }
3224

3225
    @Getter
3226
    @Setter
3227
    @EqualsAndHashCode(callSuper = false)
3228
    public static class Wechat extends StripeObject {}
×
3229

3230
    @Getter
3231
    @Setter
3232
    @EqualsAndHashCode(callSuper = false)
3233
    public static class WechatPay extends StripeObject {
×
3234
      /**
3235
       * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check
3236
       * whether two WeChat accounts are the same.
3237
       */
3238
      @SerializedName("fingerprint")
3239
      String fingerprint;
3240

3241
      /** Transaction ID of this particular WeChat Pay transaction. */
3242
      @SerializedName("transaction_id")
3243
      String transactionId;
3244
    }
3245

3246
    @Getter
3247
    @Setter
3248
    @EqualsAndHashCode(callSuper = false)
3249
    public static class Zip extends StripeObject {}
×
3250
  }
3251

3252
  /**
3253
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
3254
   * Session</a> for more information.
3255
   */
3256
  @Getter
3257
  @Setter
3258
  @EqualsAndHashCode(callSuper = false)
3259
  public static class RadarOptions extends StripeObject {
×
3260
    /**
3261
     * A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot of
3262
     * the browser metadata and device details that help Radar make more accurate predictions on
3263
     * your payments.
3264
     */
3265
    @SerializedName("session")
3266
    String session;
3267
  }
3268

3269
  @Getter
3270
  @Setter
3271
  @EqualsAndHashCode(callSuper = false)
3272
  public static class TransferData extends StripeObject {
1✔
3273
    /**
3274
     * The amount transferred to the destination account, if specified. By default, the entire
3275
     * charge amount is transferred to the destination account.
3276
     */
3277
    @SerializedName("amount")
3278
    Long amount;
3279

3280
    /**
3281
     * ID of an existing, connected Stripe account to transfer funds to if {@code transfer_data} was
3282
     * specified in the charge request.
3283
     */
3284
    @SerializedName("destination")
3285
    @Getter(lombok.AccessLevel.NONE)
3286
    @Setter(lombok.AccessLevel.NONE)
3287
    ExpandableField<Account> destination;
3288

3289
    /** Get ID of expandable {@code destination} object. */
3290
    public String getDestination() {
3291
      return (this.destination != null) ? this.destination.getId() : null;
1✔
3292
    }
3293

3294
    public void setDestination(String id) {
3295
      this.destination = ApiResource.setExpandableFieldId(id, this.destination);
×
3296
    }
×
3297

3298
    /** Get expanded {@code destination}. */
3299
    public Account getDestinationObject() {
3300
      return (this.destination != null) ? this.destination.getExpanded() : null;
1✔
3301
    }
3302

3303
    public void setDestinationObject(Account expandableObject) {
3304
      this.destination = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
3305
    }
×
3306
  }
3307

3308
  @Override
3309
  public void setResponseGetter(StripeResponseGetter responseGetter) {
3310
    super.setResponseGetter(responseGetter);
1✔
3311
    trySetResponseGetter(application, responseGetter);
1✔
3312
    trySetResponseGetter(applicationFee, responseGetter);
1✔
3313
    trySetResponseGetter(balanceTransaction, responseGetter);
1✔
3314
    trySetResponseGetter(billingDetails, responseGetter);
1✔
3315
    trySetResponseGetter(customer, responseGetter);
1✔
3316
    trySetResponseGetter(failureBalanceTransaction, responseGetter);
1✔
3317
    trySetResponseGetter(fraudDetails, responseGetter);
1✔
3318
    trySetResponseGetter(invoice, responseGetter);
1✔
3319
    trySetResponseGetter(level3, responseGetter);
1✔
3320
    trySetResponseGetter(onBehalfOf, responseGetter);
1✔
3321
    trySetResponseGetter(outcome, responseGetter);
1✔
3322
    trySetResponseGetter(paymentIntent, responseGetter);
1✔
3323
    trySetResponseGetter(paymentMethodDetails, responseGetter);
1✔
3324
    trySetResponseGetter(radarOptions, responseGetter);
1✔
3325
    trySetResponseGetter(refunds, responseGetter);
1✔
3326
    trySetResponseGetter(review, responseGetter);
1✔
3327
    trySetResponseGetter(shipping, responseGetter);
1✔
3328
    trySetResponseGetter(source, responseGetter);
1✔
3329
    trySetResponseGetter(sourceTransfer, responseGetter);
1✔
3330
    trySetResponseGetter(transfer, responseGetter);
1✔
3331
    trySetResponseGetter(transferData, responseGetter);
1✔
3332
  }
1✔
3333
}
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

© 2026 Coveralls, Inc