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

stripe / stripe-java / #16562

18 Oct 2024 07:00PM UTC coverage: 12.614% (-0.1%) from 12.74%
#16562

push

github

web-flow
Merge pull request #1897 from stripe/latest-codegen-beta

Update generated code for beta

49 of 1978 new or added lines in 47 files covered. (2.48%)

68 existing lines in 20 files now uncovered.

18798 of 149026 relevant lines covered (12.61%)

0.13 hits per line

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

0.0
/src/main/java/com/stripe/model/ConfirmationToken.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.ConfirmationTokenCreateParams;
13
import com.stripe.param.ConfirmationTokenRetrieveParams;
14
import java.util.List;
15
import java.util.Map;
16
import lombok.EqualsAndHashCode;
17
import lombok.Getter;
18
import lombok.Setter;
19

20
/**
21
 * ConfirmationTokens help transport client side data collected by Stripe JS over to your server for
22
 * confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on
23
 * the ConfirmationToken are written onto the Intent.
24
 *
25
 * <p>To learn more about how to use ConfirmationToken, visit the related guides: - <a
26
 * href="https://stripe.com/docs/payments/finalize-payments-on-the-server">Finalize payments on the
27
 * server</a> - <a href="https://stripe.com/docs/payments/build-a-two-step-confirmation">Build
28
 * two-step confirmation</a>.
29
 */
30
@Getter
31
@Setter
32
@EqualsAndHashCode(callSuper = false)
33
public class ConfirmationToken extends ApiResource implements HasId {
×
34
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
35
  @SerializedName("created")
36
  Long created;
37

38
  /**
39
   * Time at which this ConfirmationToken expires and can no longer be used to confirm a
40
   * PaymentIntent or SetupIntent.
41
   */
42
  @SerializedName("expires_at")
43
  Long expiresAt;
44

45
  /** Unique identifier for the object. */
46
  @Getter(onMethod_ = {@Override})
47
  @SerializedName("id")
48
  String id;
49

50
  /**
51
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
52
   * object exists in test mode.
53
   */
54
  @SerializedName("livemode")
55
  Boolean livemode;
56

57
  /** Data used for generating a Mandate. */
58
  @SerializedName("mandate_data")
59
  MandateData mandateData;
60

61
  /**
62
   * String representing the object's type. Objects of the same type share the same value.
63
   *
64
   * <p>Equal to {@code confirmation_token}.
65
   */
66
  @SerializedName("object")
67
  String object;
68

69
  /**
70
   * ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this
71
   * ConfirmationToken has not yet been used.
72
   */
73
  @SerializedName("payment_intent")
74
  String paymentIntent;
75

76
  /** Payment-method-specific configuration for this ConfirmationToken. */
77
  @SerializedName("payment_method_options")
78
  PaymentMethodOptions paymentMethodOptions;
79

80
  /**
81
   * Payment details collected by the Payment Element, used to create a PaymentMethod when a
82
   * PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
83
   */
84
  @SerializedName("payment_method_preview")
85
  PaymentMethodPreview paymentMethodPreview;
86

87
  /** Return URL used to confirm the Intent. */
88
  @SerializedName("return_url")
89
  String returnUrl;
90

91
  /**
92
   * Indicates that you intend to make future payments with this ConfirmationToken's payment method.
93
   *
94
   * <p>The presence of this property will <a
95
   * href="https://stripe.com/docs/payments/save-during-payment">attach the payment method</a> to
96
   * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required
97
   * actions from the user are complete.
98
   *
99
   * <p>One of {@code off_session}, or {@code on_session}.
100
   */
101
  @SerializedName("setup_future_usage")
102
  String setupFutureUsage;
103

104
  /**
105
   * ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this
106
   * ConfirmationToken has not yet been used.
107
   */
108
  @SerializedName("setup_intent")
109
  String setupIntent;
110

111
  /** Shipping information collected on this ConfirmationToken. */
112
  @SerializedName("shipping")
113
  Shipping shipping;
114

115
  /**
116
   * Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to {@code true}
117
   * on ConfirmationToken.
118
   */
119
  @SerializedName("use_stripe_sdk")
120
  Boolean useStripeSdk;
121

122
  /** Retrieves an existing ConfirmationToken object. */
123
  public static ConfirmationToken retrieve(String confirmationToken) throws StripeException {
124
    return retrieve(confirmationToken, (Map<String, Object>) null, (RequestOptions) null);
×
125
  }
126

127
  /** Retrieves an existing ConfirmationToken object. */
128
  public static ConfirmationToken retrieve(String confirmationToken, RequestOptions options)
129
      throws StripeException {
130
    return retrieve(confirmationToken, (Map<String, Object>) null, options);
×
131
  }
132

133
  /** Retrieves an existing ConfirmationToken object. */
134
  public static ConfirmationToken retrieve(
135
      String confirmationToken, Map<String, Object> params, RequestOptions options)
136
      throws StripeException {
137
    String path =
×
138
        String.format("/v1/confirmation_tokens/%s", ApiResource.urlEncodeId(confirmationToken));
×
139
    ApiRequest request =
×
140
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
141
    return getGlobalResponseGetter().request(request, ConfirmationToken.class);
×
142
  }
143

144
  /** Retrieves an existing ConfirmationToken object. */
145
  public static ConfirmationToken retrieve(
146
      String confirmationToken, ConfirmationTokenRetrieveParams params, RequestOptions options)
147
      throws StripeException {
148
    String path =
×
149
        String.format("/v1/confirmation_tokens/%s", ApiResource.urlEncodeId(confirmationToken));
×
150
    ApiResource.checkNullTypedParams(path, params);
×
151
    ApiRequest request =
×
152
        new ApiRequest(
153
            BaseAddress.API,
154
            ApiResource.RequestMethod.GET,
155
            path,
156
            ApiRequestParams.paramsToMap(params),
×
157
            options);
158
    return getGlobalResponseGetter().request(request, ConfirmationToken.class);
×
159
  }
160

161
  /** Data used for generating a Mandate. */
162
  @Getter
163
  @Setter
164
  @EqualsAndHashCode(callSuper = false)
165
  public static class MandateData extends StripeObject {
×
166
    /** This hash contains details about the customer acceptance of the Mandate. */
167
    @SerializedName("customer_acceptance")
168
    CustomerAcceptance customerAcceptance;
169

170
    /** This hash contains details about the customer acceptance of the Mandate. */
171
    @Getter
172
    @Setter
173
    @EqualsAndHashCode(callSuper = false)
174
    public static class CustomerAcceptance extends StripeObject {
×
175
      /**
176
       * If this is a Mandate accepted online, this hash contains details about the online
177
       * acceptance.
178
       */
179
      @SerializedName("online")
180
      Online online;
181

182
      /** The type of customer acceptance information included with the Mandate. */
183
      @SerializedName("type")
184
      String type;
185

186
      /** This hash contains details about the online acceptance. */
187
      @Getter
188
      @Setter
189
      @EqualsAndHashCode(callSuper = false)
190
      public static class Online extends StripeObject {
×
191
        /** The IP address from which the Mandate was accepted by the customer. */
192
        @SerializedName("ip_address")
193
        String ipAddress;
194

195
        /** The user agent of the browser from which the Mandate was accepted by the customer. */
196
        @SerializedName("user_agent")
197
        String userAgent;
198
      }
199
    }
200
  }
201

202
  /** Payment-method-specific configuration. */
203
  @Getter
204
  @Setter
205
  @EqualsAndHashCode(callSuper = false)
206
  public static class PaymentMethodOptions extends StripeObject {
×
207
    /** This hash contains the card payment method options. */
208
    @SerializedName("card")
209
    Card card;
210

211
    /** This hash contains the card payment method options. */
212
    @Getter
213
    @Setter
214
    @EqualsAndHashCode(callSuper = false)
215
    public static class Card extends StripeObject {
×
216
      /** The {@code cvc_update} Token collected from the Payment Element. */
217
      @SerializedName("cvc_token")
218
      String cvcToken;
219
    }
220
  }
221

222
  /** Details of the PaymentMethod collected by Payment Element. */
223
  @Getter
224
  @Setter
225
  @EqualsAndHashCode(callSuper = false)
226
  public static class PaymentMethodPreview extends StripeObject {
×
227
    @SerializedName("acss_debit")
228
    AcssDebit acssDebit;
229

230
    @SerializedName("affirm")
231
    Affirm affirm;
232

233
    @SerializedName("afterpay_clearpay")
234
    AfterpayClearpay afterpayClearpay;
235

236
    @SerializedName("alipay")
237
    Alipay alipay;
238

239
    /**
240
     * This field indicates whether this payment method can be shown again to its customer in a
241
     * checkout flow. Stripe products such as Checkout and Elements use this field to determine
242
     * whether a payment method can be shown as a saved payment method in a checkout flow. The field
243
     * defaults to “unspecified”.
244
     *
245
     * <p>One of {@code always}, {@code limited}, or {@code unspecified}.
246
     */
247
    @SerializedName("allow_redisplay")
248
    String allowRedisplay;
249

250
    @SerializedName("alma")
251
    Alma alma;
252

253
    @SerializedName("amazon_pay")
254
    AmazonPay amazonPay;
255

256
    @SerializedName("au_becs_debit")
257
    AuBecsDebit auBecsDebit;
258

259
    @SerializedName("bacs_debit")
260
    BacsDebit bacsDebit;
261

262
    @SerializedName("bancontact")
263
    Bancontact bancontact;
264

265
    @SerializedName("billing_details")
266
    BillingDetails billingDetails;
267

268
    @SerializedName("blik")
269
    Blik blik;
270

271
    @SerializedName("boleto")
272
    Boleto boleto;
273

274
    @SerializedName("card")
275
    Card card;
276

277
    @SerializedName("card_present")
278
    CardPresent cardPresent;
279

280
    @SerializedName("cashapp")
281
    Cashapp cashapp;
282

283
    /**
284
     * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the
285
     * PaymentMethod has not been saved to a Customer.
286
     */
287
    @SerializedName("customer")
288
    @Getter(lombok.AccessLevel.NONE)
289
    @Setter(lombok.AccessLevel.NONE)
290
    ExpandableField<Customer> customer;
291

292
    @SerializedName("customer_balance")
293
    CustomerBalance customerBalance;
294

295
    @SerializedName("eps")
296
    Eps eps;
297

298
    @SerializedName("fpx")
299
    Fpx fpx;
300

301
    @SerializedName("giropay")
302
    Giropay giropay;
303

304
    @SerializedName("gopay")
305
    Gopay gopay;
306

307
    @SerializedName("grabpay")
308
    Grabpay grabpay;
309

310
    @SerializedName("ideal")
311
    Ideal ideal;
312

313
    @SerializedName("interac_present")
314
    InteracPresent interacPresent;
315

316
    @SerializedName("kakao_pay")
317
    KakaoPay kakaoPay;
318

319
    @SerializedName("klarna")
320
    Klarna klarna;
321

322
    @SerializedName("konbini")
323
    Konbini konbini;
324

325
    @SerializedName("kr_card")
326
    KrCard krCard;
327

328
    @SerializedName("link")
329
    Link link;
330

331
    @SerializedName("mb_way")
332
    MbWay mbWay;
333

334
    @SerializedName("mobilepay")
335
    Mobilepay mobilepay;
336

337
    @SerializedName("multibanco")
338
    Multibanco multibanco;
339

340
    @SerializedName("naver_pay")
341
    NaverPay naverPay;
342

343
    @SerializedName("oxxo")
344
    Oxxo oxxo;
345

346
    @SerializedName("p24")
347
    P24 p24;
348

349
    @SerializedName("payco")
350
    Payco payco;
351

352
    @SerializedName("paynow")
353
    Paynow paynow;
354

355
    @SerializedName("paypal")
356
    Paypal paypal;
357

358
    @SerializedName("payto")
359
    Payto payto;
360

361
    @SerializedName("pix")
362
    Pix pix;
363

364
    @SerializedName("promptpay")
365
    Promptpay promptpay;
366

367
    @SerializedName("qris")
368
    Qris qris;
369

370
    @SerializedName("rechnung")
371
    Rechnung rechnung;
372

373
    @SerializedName("revolut_pay")
374
    RevolutPay revolutPay;
375

376
    @SerializedName("samsung_pay")
377
    SamsungPay samsungPay;
378

379
    @SerializedName("sepa_debit")
380
    SepaDebit sepaDebit;
381

382
    @SerializedName("shopeepay")
383
    Shopeepay shopeepay;
384

385
    @SerializedName("sofort")
386
    Sofort sofort;
387

388
    @SerializedName("swish")
389
    Swish swish;
390

391
    @SerializedName("twint")
392
    Twint twint;
393

394
    /**
395
     * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a
396
     * name matching this value. It contains additional information specific to the PaymentMethod
397
     * type.
398
     *
399
     * <p>One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay},
400
     * {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code
401
     * bancontact}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code
402
     * cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code gopay},
403
     * {@code grabpay}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna},
404
     * {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code
405
     * multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code payco}, {@code paynow},
406
     * {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code
407
     * rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code shopeepay},
408
     * {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or
409
     * {@code zip}.
410
     */
411
    @SerializedName("type")
412
    String type;
413

414
    @SerializedName("us_bank_account")
415
    UsBankAccount usBankAccount;
416

417
    @SerializedName("wechat_pay")
418
    WechatPay wechatPay;
419

420
    @SerializedName("zip")
421
    Zip zip;
422

423
    /** Get ID of expandable {@code customer} object. */
424
    public String getCustomer() {
425
      return (this.customer != null) ? this.customer.getId() : null;
×
426
    }
427

428
    public void setCustomer(String id) {
429
      this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
430
    }
×
431

432
    /** Get expanded {@code customer}. */
433
    public Customer getCustomerObject() {
434
      return (this.customer != null) ? this.customer.getExpanded() : null;
×
435
    }
436

437
    public void setCustomerObject(Customer expandableObject) {
438
      this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
439
    }
×
440

441
    /**
442
     * For more details about AcssDebit, please refer to the <a
443
     * href="https://docs.stripe.com/api">API Reference.</a>
444
     */
445
    @Getter
446
    @Setter
447
    @EqualsAndHashCode(callSuper = false)
448
    public static class AcssDebit extends StripeObject {
×
449
      /** Name of the bank associated with the bank account. */
450
      @SerializedName("bank_name")
451
      String bankName;
452

453
      /**
454
       * Uniquely identifies this particular bank account. You can use this attribute to check
455
       * whether two bank accounts are the same.
456
       */
457
      @SerializedName("fingerprint")
458
      String fingerprint;
459

460
      /** Institution number of the bank account. */
461
      @SerializedName("institution_number")
462
      String institutionNumber;
463

464
      /** Last four digits of the bank account number. */
465
      @SerializedName("last4")
466
      String last4;
467

468
      /** Transit number of the bank account. */
469
      @SerializedName("transit_number")
470
      String transitNumber;
471
    }
472

473
    /**
474
     * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
475
     * Reference.</a>
476
     */
477
    @Getter
478
    @Setter
479
    @EqualsAndHashCode(callSuper = false)
480
    public static class Affirm extends StripeObject {}
×
481

482
    /**
483
     * For more details about AfterpayClearpay, please refer to the <a
484
     * href="https://docs.stripe.com/api">API Reference.</a>
485
     */
486
    @Getter
487
    @Setter
488
    @EqualsAndHashCode(callSuper = false)
489
    public static class AfterpayClearpay extends StripeObject {}
×
490

491
    /**
492
     * For more details about Alipay, please refer to the <a href="https://docs.stripe.com/api">API
493
     * Reference.</a>
494
     */
495
    @Getter
496
    @Setter
497
    @EqualsAndHashCode(callSuper = false)
498
    public static class Alipay extends StripeObject {}
×
499

500
    /**
501
     * For more details about Alma, please refer to the <a href="https://docs.stripe.com/api">API
502
     * Reference.</a>
503
     */
504
    @Getter
505
    @Setter
506
    @EqualsAndHashCode(callSuper = false)
NEW
507
    public static class Alma extends StripeObject {}
×
508

509
    /**
510
     * For more details about AmazonPay, please refer to the <a
511
     * href="https://docs.stripe.com/api">API Reference.</a>
512
     */
513
    @Getter
514
    @Setter
515
    @EqualsAndHashCode(callSuper = false)
516
    public static class AmazonPay extends StripeObject {}
×
517

518
    /**
519
     * For more details about AuBecsDebit, please refer to the <a
520
     * href="https://docs.stripe.com/api">API Reference.</a>
521
     */
522
    @Getter
523
    @Setter
524
    @EqualsAndHashCode(callSuper = false)
525
    public static class AuBecsDebit extends StripeObject {
×
526
      /** Six-digit number identifying bank and branch associated with this bank account. */
527
      @SerializedName("bsb_number")
528
      String bsbNumber;
529

530
      /**
531
       * Uniquely identifies this particular bank account. You can use this attribute to check
532
       * whether two bank accounts are the same.
533
       */
534
      @SerializedName("fingerprint")
535
      String fingerprint;
536

537
      /** Last four digits of the bank account number. */
538
      @SerializedName("last4")
539
      String last4;
540
    }
541

542
    /**
543
     * For more details about BacsDebit, please refer to the <a
544
     * href="https://docs.stripe.com/api">API Reference.</a>
545
     */
546
    @Getter
547
    @Setter
548
    @EqualsAndHashCode(callSuper = false)
549
    public static class BacsDebit extends StripeObject {
×
550
      /**
551
       * Uniquely identifies this particular bank account. You can use this attribute to check
552
       * whether two bank accounts are the same.
553
       */
554
      @SerializedName("fingerprint")
555
      String fingerprint;
556

557
      /** Last four digits of the bank account number. */
558
      @SerializedName("last4")
559
      String last4;
560

561
      /** Sort code of the bank account. (e.g., {@code 10-20-30}) */
562
      @SerializedName("sort_code")
563
      String sortCode;
564
    }
565

566
    /**
567
     * For more details about Bancontact, please refer to the <a
568
     * href="https://docs.stripe.com/api">API Reference.</a>
569
     */
570
    @Getter
571
    @Setter
572
    @EqualsAndHashCode(callSuper = false)
573
    public static class Bancontact extends StripeObject {}
×
574

575
    /**
576
     * For more details about BillingDetails, please refer to the <a
577
     * href="https://docs.stripe.com/api">API Reference.</a>
578
     */
579
    @Getter
580
    @Setter
581
    @EqualsAndHashCode(callSuper = false)
582
    public static class BillingDetails extends StripeObject {
×
583
      /** Billing address. */
584
      @SerializedName("address")
585
      Address address;
586

587
      /** Email address. */
588
      @SerializedName("email")
589
      String email;
590

591
      /** Full name. */
592
      @SerializedName("name")
593
      String name;
594

595
      /** Billing phone number (including extension). */
596
      @SerializedName("phone")
597
      String phone;
598
    }
599

600
    /**
601
     * For more details about Blik, please refer to the <a href="https://docs.stripe.com/api">API
602
     * Reference.</a>
603
     */
604
    @Getter
605
    @Setter
606
    @EqualsAndHashCode(callSuper = false)
607
    public static class Blik extends StripeObject {}
×
608

609
    /**
610
     * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
611
     * Reference.</a>
612
     */
613
    @Getter
614
    @Setter
615
    @EqualsAndHashCode(callSuper = false)
616
    public static class Boleto extends StripeObject {
×
617
      /** Uniquely identifies the customer tax id (CNPJ or CPF). */
618
      @SerializedName("tax_id")
619
      String taxId;
620
    }
621

622
    /**
623
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
624
     * Reference.</a>
625
     */
626
    @Getter
627
    @Setter
628
    @EqualsAndHashCode(callSuper = false)
629
    public static class Card extends StripeObject {
×
630
      /**
631
       * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
632
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
633
       */
634
      @SerializedName("brand")
635
      String brand;
636

637
      /** Checks on Card address and CVC if provided. */
638
      @SerializedName("checks")
639
      Checks checks;
640

641
      /**
642
       * Two-letter ISO code representing the country of the card. You could use this attribute to
643
       * get a sense of the international breakdown of cards you've collected.
644
       */
645
      @SerializedName("country")
646
      String country;
647

648
      /**
649
       * A high-level description of the type of cards issued in this range. (For internal use only
650
       * and not typically available in standard API requests.)
651
       */
652
      @SerializedName("description")
653
      String description;
654

655
      /**
656
       * The brand to use when displaying the card, this accounts for customer's brand choice on
657
       * dual-branded cards. Can be {@code american_express}, {@code cartes_bancaires}, {@code
658
       * diners_club}, {@code discover}, {@code eftpos_australia}, {@code interac}, {@code jcb},
659
       * {@code mastercard}, {@code union_pay}, {@code visa}, or {@code other} and may contain more
660
       * values in the future.
661
       */
662
      @SerializedName("display_brand")
663
      String displayBrand;
664

665
      /** Two-digit number representing the card's expiration month. */
666
      @SerializedName("exp_month")
667
      Long expMonth;
668

669
      /** Four-digit number representing the card's expiration year. */
670
      @SerializedName("exp_year")
671
      Long expYear;
672

673
      /**
674
       * Uniquely identifies this particular card number. You can use this attribute to check
675
       * whether two customers who’ve signed up with you are using the same card number, for
676
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
677
       * tokenized number might be provided instead of the underlying card number.
678
       *
679
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
680
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
681
       */
682
      @SerializedName("fingerprint")
683
      String fingerprint;
684

685
      /**
686
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
687
       * unknown}.
688
       */
689
      @SerializedName("funding")
690
      String funding;
691

692
      /** Details of the original PaymentMethod that created this object. */
693
      @SerializedName("generated_from")
694
      GeneratedFrom generatedFrom;
695

696
      /**
697
       * Issuer identification number of the card. (For internal use only and not typically
698
       * available in standard API requests.)
699
       */
700
      @SerializedName("iin")
701
      String iin;
702

703
      /**
704
       * The name of the card's issuing bank. (For internal use only and not typically available in
705
       * standard API requests.)
706
       */
707
      @SerializedName("issuer")
708
      String issuer;
709

710
      /** The last four digits of the card. */
711
      @SerializedName("last4")
712
      String last4;
713

714
      /** Contains information about card networks that can be used to process the payment. */
715
      @SerializedName("networks")
716
      Networks networks;
717

718
      /** Contains details on how this Card may be used for 3D Secure authentication. */
719
      @SerializedName("three_d_secure_usage")
720
      ThreeDSecureUsage threeDSecureUsage;
721

722
      /** If this Card is part of a card wallet, this contains the details of the card wallet. */
723
      @SerializedName("wallet")
724
      Wallet wallet;
725

726
      /**
727
       * For more details about Checks, please refer to the <a
728
       * href="https://docs.stripe.com/api">API Reference.</a>
729
       */
730
      @Getter
731
      @Setter
732
      @EqualsAndHashCode(callSuper = false)
733
      public static class Checks extends StripeObject {
×
734
        /**
735
         * If a address line1 was provided, results of the check, one of {@code pass}, {@code fail},
736
         * {@code unavailable}, or {@code unchecked}.
737
         */
738
        @SerializedName("address_line1_check")
739
        String addressLine1Check;
740

741
        /**
742
         * If a address postal code was provided, results of the check, one of {@code pass}, {@code
743
         * fail}, {@code unavailable}, or {@code unchecked}.
744
         */
745
        @SerializedName("address_postal_code_check")
746
        String addressPostalCodeCheck;
747

748
        /**
749
         * If a CVC was provided, results of the check, one of {@code pass}, {@code fail}, {@code
750
         * unavailable}, or {@code unchecked}.
751
         */
752
        @SerializedName("cvc_check")
753
        String cvcCheck;
754
      }
755

756
      /**
757
       * For more details about GeneratedFrom, please refer to the <a
758
       * href="https://docs.stripe.com/api">API Reference.</a>
759
       */
760
      @Getter
761
      @Setter
762
      @EqualsAndHashCode(callSuper = false)
763
      public static class GeneratedFrom extends StripeObject {
×
764
        /** The charge that created this object. */
765
        @SerializedName("charge")
766
        String charge;
767

768
        /** Transaction-specific details of the payment method used in the payment. */
769
        @SerializedName("payment_method_details")
770
        PaymentMethodDetails paymentMethodDetails;
771

772
        /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
773
        @SerializedName("setup_attempt")
774
        @Getter(lombok.AccessLevel.NONE)
775
        @Setter(lombok.AccessLevel.NONE)
776
        ExpandableField<SetupAttempt> setupAttempt;
777

778
        /** Get ID of expandable {@code setupAttempt} object. */
779
        public String getSetupAttempt() {
780
          return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
781
        }
782

783
        public void setSetupAttempt(String id) {
784
          this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
785
        }
×
786

787
        /** Get expanded {@code setupAttempt}. */
788
        public SetupAttempt getSetupAttemptObject() {
789
          return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
790
        }
791

792
        public void setSetupAttemptObject(SetupAttempt expandableObject) {
793
          this.setupAttempt =
×
794
              new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
795
        }
×
796

797
        /**
798
         * For more details about PaymentMethodDetails, please refer to the <a
799
         * href="https://docs.stripe.com/api">API Reference.</a>
800
         */
801
        @Getter
802
        @Setter
803
        @EqualsAndHashCode(callSuper = false)
804
        public static class PaymentMethodDetails extends StripeObject {
×
805
          @SerializedName("card_present")
806
          CardPresent cardPresent;
807

808
          /**
809
           * The type of payment method transaction-specific details from the transaction that
810
           * generated this {@code card} payment method. Always {@code card_present}.
811
           */
812
          @SerializedName("type")
813
          String type;
814

815
          /**
816
           * For more details about CardPresent, please refer to the <a
817
           * href="https://docs.stripe.com/api">API Reference.</a>
818
           */
819
          @Getter
820
          @Setter
821
          @EqualsAndHashCode(callSuper = false)
822
          public static class CardPresent extends StripeObject {
×
823
            /** The authorized amount. */
824
            @SerializedName("amount_authorized")
825
            Long amountAuthorized;
826

827
            /**
828
             * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
829
             * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
830
             */
831
            @SerializedName("brand")
832
            String brand;
833

834
            /**
835
             * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that
836
             * identifies the specific program or product associated with a card.
837
             */
838
            @SerializedName("brand_product")
839
            String brandProduct;
840

841
            /**
842
             * When using manual capture, a future timestamp after which the charge will be
843
             * automatically refunded if uncaptured.
844
             */
845
            @SerializedName("capture_before")
846
            Long captureBefore;
847

848
            /**
849
             * The cardholder name as read from the card, in <a
850
             * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
851
             * alphanumeric characters, special characters and first/last name separator ({@code
852
             * /}). In some cases, the cardholder name may not be available depending on how the
853
             * issuer has configured the card. Cardholder name is typically not available on swipe
854
             * or contactless payments, such as those made with Apple Pay and Google Pay.
855
             */
856
            @SerializedName("cardholder_name")
857
            String cardholderName;
858

859
            /**
860
             * Two-letter ISO code representing the country of the card. You could use this
861
             * attribute to get a sense of the international breakdown of cards you've collected.
862
             */
863
            @SerializedName("country")
864
            String country;
865

866
            /**
867
             * A high-level description of the type of cards issued in this range. (For internal use
868
             * only and not typically available in standard API requests.)
869
             */
870
            @SerializedName("description")
871
            String description;
872

873
            /** Authorization response cryptogram. */
874
            @SerializedName("emv_auth_data")
875
            String emvAuthData;
876

877
            /** Two-digit number representing the card's expiration month. */
878
            @SerializedName("exp_month")
879
            Long expMonth;
880

881
            /** Four-digit number representing the card's expiration year. */
882
            @SerializedName("exp_year")
883
            Long expYear;
884

885
            /**
886
             * Uniquely identifies this particular card number. You can use this attribute to check
887
             * whether two customers who’ve signed up with you are using the same card number, for
888
             * example. For payment methods that tokenize card information (Apple Pay, Google Pay),
889
             * the tokenized number might be provided instead of the underlying card number.
890
             *
891
             * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
892
             * fingerprints for the same card---one for India and one for the rest of the
893
             * world.</em>
894
             */
895
            @SerializedName("fingerprint")
896
            String fingerprint;
897

898
            /**
899
             * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
900
             * unknown}.
901
             */
902
            @SerializedName("funding")
903
            String funding;
904

905
            /**
906
             * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be
907
             * attached to a Customer for future transactions. Only present if it was possible to
908
             * generate a card PaymentMethod.
909
             */
910
            @SerializedName("generated_card")
911
            String generatedCard;
912

913
            /**
914
             * Issuer identification number of the card. (For internal use only and not typically
915
             * available in standard API requests.)
916
             */
917
            @SerializedName("iin")
918
            String iin;
919

920
            /**
921
             * Whether this <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a>
922
             * is eligible for incremental authorizations. Request support using <a
923
             * 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>.
924
             */
925
            @SerializedName("incremental_authorization_supported")
926
            Boolean incrementalAuthorizationSupported;
927

928
            /**
929
             * The name of the card's issuing bank. (For internal use only and not typically
930
             * available in standard API requests.)
931
             */
932
            @SerializedName("issuer")
933
            String issuer;
934

935
            /** The last four digits of the card. */
936
            @SerializedName("last4")
937
            String last4;
938

939
            /**
940
             * Identifies which network this charge was processed on. Can be {@code amex}, {@code
941
             * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
942
             * interac}, {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
943
             * unknown}.
944
             */
945
            @SerializedName("network")
946
            String network;
947

948
            /**
949
             * This is used by the financial networks to identify a transaction. Visa calls this the
950
             * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this
951
             * the Acquirer Reference Data. The first three digits of the Trace ID is the Financial
952
             * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4
953
             * digits represent the date (MM/DD). This field will be available for successful Visa,
954
             * Mastercard, or American Express transactions and always null for other card brands.
955
             */
956
            @SerializedName("network_transaction_id")
957
            String networkTransactionId;
958

959
            /** Details about payments collected offline. */
960
            @SerializedName("offline")
961
            Offline offline;
962

963
            /** Defines whether the authorized amount can be over-captured or not. */
964
            @SerializedName("overcapture_supported")
965
            Boolean overcaptureSupported;
966

967
            /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
968
            @SerializedName("preferred_locales")
969
            List<String> preferredLocales;
970

971
            /**
972
             * How card details were read in this transaction.
973
             *
974
             * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code
975
             * contactless_magstripe_mode}, {@code magnetic_stripe_fallback}, or {@code
976
             * magnetic_stripe_track2}.
977
             */
978
            @SerializedName("read_method")
979
            String readMethod;
980

981
            /**
982
             * A collection of fields required to be displayed on receipts. Only required for EMV
983
             * transactions.
984
             */
985
            @SerializedName("receipt")
986
            Receipt receipt;
987

988
            @SerializedName("wallet")
989
            Wallet wallet;
990

991
            /**
992
             * For more details about Offline, please refer to the <a
993
             * href="https://docs.stripe.com/api">API Reference.</a>
994
             */
995
            @Getter
996
            @Setter
997
            @EqualsAndHashCode(callSuper = false)
998
            public static class Offline extends StripeObject {
×
999
              /** Time at which the payment was collected while offline. */
1000
              @SerializedName("stored_at")
1001
              Long storedAt;
1002

1003
              /**
1004
               * The method used to process this payment method offline. Only deferred is allowed.
1005
               *
1006
               * <p>Equal to {@code deferred}.
1007
               */
1008
              @SerializedName("type")
1009
              String type;
1010
            }
1011

1012
            /**
1013
             * For more details about Receipt, please refer to the <a
1014
             * href="https://docs.stripe.com/api">API Reference.</a>
1015
             */
1016
            @Getter
1017
            @Setter
1018
            @EqualsAndHashCode(callSuper = false)
1019
            public static class Receipt extends StripeObject {
×
1020
              /**
1021
               * The type of account being debited or credited
1022
               *
1023
               * <p>One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}.
1024
               */
1025
              @SerializedName("account_type")
1026
              String accountType;
1027

1028
              /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */
1029
              @SerializedName("application_cryptogram")
1030
              String applicationCryptogram;
1031

1032
              /** Mnenomic of the Application Identifier. */
1033
              @SerializedName("application_preferred_name")
1034
              String applicationPreferredName;
1035

1036
              /** Identifier for this transaction. */
1037
              @SerializedName("authorization_code")
1038
              String authorizationCode;
1039

1040
              /** EMV tag 8A. A code returned by the card issuer. */
1041
              @SerializedName("authorization_response_code")
1042
              String authorizationResponseCode;
1043

1044
              /**
1045
               * Describes the method used by the cardholder to verify ownership of the card. One of
1046
               * the following: {@code approval}, {@code failure}, {@code none}, {@code
1047
               * offline_pin}, {@code offline_pin_and_signature}, {@code online_pin}, or {@code
1048
               * signature}.
1049
               */
1050
              @SerializedName("cardholder_verification_method")
1051
              String cardholderVerificationMethod;
1052

1053
              /**
1054
               * EMV tag 84. Similar to the application identifier stored on the integrated circuit
1055
               * chip.
1056
               */
1057
              @SerializedName("dedicated_file_name")
1058
              String dedicatedFileName;
1059

1060
              /** The outcome of a series of EMV functions performed by the card reader. */
1061
              @SerializedName("terminal_verification_results")
1062
              String terminalVerificationResults;
1063

1064
              /** An indication of various EMV functions performed during the transaction. */
1065
              @SerializedName("transaction_status_information")
1066
              String transactionStatusInformation;
1067
            }
1068

1069
            /**
1070
             * For more details about Wallet, please refer to the <a
1071
             * href="https://docs.stripe.com/api">API Reference.</a>
1072
             */
1073
            @Getter
1074
            @Setter
1075
            @EqualsAndHashCode(callSuper = false)
1076
            public static class Wallet extends StripeObject {
×
1077
              /**
1078
               * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1079
               * samsung_pay}, or {@code unknown}.
1080
               */
1081
              @SerializedName("type")
1082
              String type;
1083
            }
1084
          }
1085
        }
1086
      }
1087

1088
      /**
1089
       * For more details about Networks, please refer to the <a
1090
       * href="https://docs.stripe.com/api">API Reference.</a>
1091
       */
1092
      @Getter
1093
      @Setter
1094
      @EqualsAndHashCode(callSuper = false)
1095
      public static class Networks extends StripeObject {
×
1096
        /** All available networks for the card. */
1097
        @SerializedName("available")
1098
        List<String> available;
1099

1100
        /**
1101
         * The preferred network for co-branded cards. Can be {@code cartes_bancaires}, {@code
1102
         * mastercard}, {@code visa} or {@code invalid_preference} if requested network is not valid
1103
         * for the card.
1104
         */
1105
        @SerializedName("preferred")
1106
        String preferred;
1107
      }
1108

1109
      /**
1110
       * For more details about ThreeDSecureUsage, please refer to the <a
1111
       * href="https://docs.stripe.com/api">API Reference.</a>
1112
       */
1113
      @Getter
1114
      @Setter
1115
      @EqualsAndHashCode(callSuper = false)
1116
      public static class ThreeDSecureUsage extends StripeObject {
×
1117
        /** Whether 3D Secure is supported on this card. */
1118
        @SerializedName("supported")
1119
        Boolean supported;
1120
      }
1121

1122
      /**
1123
       * For more details about Wallet, please refer to the <a
1124
       * href="https://docs.stripe.com/api">API Reference.</a>
1125
       */
1126
      @Getter
1127
      @Setter
1128
      @EqualsAndHashCode(callSuper = false)
1129
      public static class Wallet extends StripeObject {
×
1130
        @SerializedName("amex_express_checkout")
1131
        AmexExpressCheckout amexExpressCheckout;
1132

1133
        @SerializedName("apple_pay")
1134
        ApplePay applePay;
1135

1136
        /** (For tokenized numbers only.) The last four digits of the device account number. */
1137
        @SerializedName("dynamic_last4")
1138
        String dynamicLast4;
1139

1140
        @SerializedName("google_pay")
1141
        GooglePay googlePay;
1142

1143
        @SerializedName("link")
1144
        Link link;
1145

1146
        @SerializedName("masterpass")
1147
        Masterpass masterpass;
1148

1149
        @SerializedName("samsung_pay")
1150
        SamsungPay samsungPay;
1151

1152
        /**
1153
         * The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
1154
         * {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
1155
         * {@code link}. An additional hash is included on the Wallet subhash with a name matching
1156
         * this value. It contains additional information specific to the card wallet type.
1157
         */
1158
        @SerializedName("type")
1159
        String type;
1160

1161
        @SerializedName("visa_checkout")
1162
        VisaCheckout visaCheckout;
1163

1164
        /**
1165
         * For more details about AmexExpressCheckout, please refer to the <a
1166
         * href="https://docs.stripe.com/api">API Reference.</a>
1167
         */
1168
        @Getter
1169
        @Setter
1170
        @EqualsAndHashCode(callSuper = false)
1171
        public static class AmexExpressCheckout extends StripeObject {}
×
1172

1173
        /**
1174
         * For more details about ApplePay, please refer to the <a
1175
         * href="https://docs.stripe.com/api">API Reference.</a>
1176
         */
1177
        @Getter
1178
        @Setter
1179
        @EqualsAndHashCode(callSuper = false)
1180
        public static class ApplePay extends StripeObject {}
×
1181

1182
        /**
1183
         * For more details about GooglePay, please refer to the <a
1184
         * href="https://docs.stripe.com/api">API Reference.</a>
1185
         */
1186
        @Getter
1187
        @Setter
1188
        @EqualsAndHashCode(callSuper = false)
1189
        public static class GooglePay extends StripeObject {}
×
1190

1191
        /**
1192
         * For more details about Link, please refer to the <a
1193
         * href="https://docs.stripe.com/api">API Reference.</a>
1194
         */
1195
        @Getter
1196
        @Setter
1197
        @EqualsAndHashCode(callSuper = false)
1198
        public static class Link extends StripeObject {}
×
1199

1200
        /**
1201
         * For more details about Masterpass, please refer to the <a
1202
         * href="https://docs.stripe.com/api">API Reference.</a>
1203
         */
1204
        @Getter
1205
        @Setter
1206
        @EqualsAndHashCode(callSuper = false)
1207
        public static class Masterpass extends StripeObject {
×
1208
          /**
1209
           * Owner's verified billing address. Values are verified or provided by the wallet
1210
           * directly (if supported) at the time of authorization or settlement. They cannot be set
1211
           * or mutated.
1212
           */
1213
          @SerializedName("billing_address")
1214
          Address billingAddress;
1215

1216
          /**
1217
           * Owner's verified email. Values are verified or provided by the wallet directly (if
1218
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
1219
           */
1220
          @SerializedName("email")
1221
          String email;
1222

1223
          /**
1224
           * Owner's verified full name. Values are verified or provided by the wallet directly (if
1225
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
1226
           */
1227
          @SerializedName("name")
1228
          String name;
1229

1230
          /**
1231
           * Owner's verified shipping address. Values are verified or provided by the wallet
1232
           * directly (if supported) at the time of authorization or settlement. They cannot be set
1233
           * or mutated.
1234
           */
1235
          @SerializedName("shipping_address")
1236
          Address shippingAddress;
1237
        }
1238

1239
        /**
1240
         * For more details about SamsungPay, please refer to the <a
1241
         * href="https://docs.stripe.com/api">API Reference.</a>
1242
         */
1243
        @Getter
1244
        @Setter
1245
        @EqualsAndHashCode(callSuper = false)
1246
        public static class SamsungPay extends StripeObject {}
×
1247

1248
        /**
1249
         * For more details about VisaCheckout, please refer to the <a
1250
         * href="https://docs.stripe.com/api">API Reference.</a>
1251
         */
1252
        @Getter
1253
        @Setter
1254
        @EqualsAndHashCode(callSuper = false)
1255
        public static class VisaCheckout extends StripeObject {
×
1256
          /**
1257
           * Owner's verified billing address. Values are verified or provided by the wallet
1258
           * directly (if supported) at the time of authorization or settlement. They cannot be set
1259
           * or mutated.
1260
           */
1261
          @SerializedName("billing_address")
1262
          Address billingAddress;
1263

1264
          /**
1265
           * Owner's verified email. Values are verified or provided by the wallet directly (if
1266
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
1267
           */
1268
          @SerializedName("email")
1269
          String email;
1270

1271
          /**
1272
           * Owner's verified full name. Values are verified or provided by the wallet directly (if
1273
           * supported) at the time of authorization or settlement. They cannot be set or mutated.
1274
           */
1275
          @SerializedName("name")
1276
          String name;
1277

1278
          /**
1279
           * Owner's verified shipping address. Values are verified or provided by the wallet
1280
           * directly (if supported) at the time of authorization or settlement. They cannot be set
1281
           * or mutated.
1282
           */
1283
          @SerializedName("shipping_address")
1284
          Address shippingAddress;
1285
        }
1286
      }
1287
    }
1288

1289
    /**
1290
     * For more details about CardPresent, please refer to the <a
1291
     * href="https://docs.stripe.com/api">API Reference.</a>
1292
     */
1293
    @Getter
1294
    @Setter
1295
    @EqualsAndHashCode(callSuper = false)
1296
    public static class CardPresent extends StripeObject {
×
1297
      /**
1298
       * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
1299
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1300
       */
1301
      @SerializedName("brand")
1302
      String brand;
1303

1304
      /**
1305
       * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that identifies
1306
       * the specific program or product associated with a card.
1307
       */
1308
      @SerializedName("brand_product")
1309
      String brandProduct;
1310

1311
      /**
1312
       * The cardholder name as read from the card, in <a
1313
       * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1314
       * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1315
       * some cases, the cardholder name may not be available depending on how the issuer has
1316
       * configured the card. Cardholder name is typically not available on swipe or contactless
1317
       * payments, such as those made with Apple Pay and Google Pay.
1318
       */
1319
      @SerializedName("cardholder_name")
1320
      String cardholderName;
1321

1322
      /**
1323
       * Two-letter ISO code representing the country of the card. You could use this attribute to
1324
       * get a sense of the international breakdown of cards you've collected.
1325
       */
1326
      @SerializedName("country")
1327
      String country;
1328

1329
      /**
1330
       * A high-level description of the type of cards issued in this range. (For internal use only
1331
       * and not typically available in standard API requests.)
1332
       */
1333
      @SerializedName("description")
1334
      String description;
1335

1336
      /** Two-digit number representing the card's expiration month. */
1337
      @SerializedName("exp_month")
1338
      Long expMonth;
1339

1340
      /** Four-digit number representing the card's expiration year. */
1341
      @SerializedName("exp_year")
1342
      Long expYear;
1343

1344
      /**
1345
       * Uniquely identifies this particular card number. You can use this attribute to check
1346
       * whether two customers who’ve signed up with you are using the same card number, for
1347
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
1348
       * tokenized number might be provided instead of the underlying card number.
1349
       *
1350
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1351
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
1352
       */
1353
      @SerializedName("fingerprint")
1354
      String fingerprint;
1355

1356
      /**
1357
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
1358
       * unknown}.
1359
       */
1360
      @SerializedName("funding")
1361
      String funding;
1362

1363
      /**
1364
       * Issuer identification number of the card. (For internal use only and not typically
1365
       * available in standard API requests.)
1366
       */
1367
      @SerializedName("iin")
1368
      String iin;
1369

1370
      /**
1371
       * The name of the card's issuing bank. (For internal use only and not typically available in
1372
       * standard API requests.)
1373
       */
1374
      @SerializedName("issuer")
1375
      String issuer;
1376

1377
      /** The last four digits of the card. */
1378
      @SerializedName("last4")
1379
      String last4;
1380

1381
      /** Contains information about card networks that can be used to process the payment. */
1382
      @SerializedName("networks")
1383
      Networks networks;
1384

1385
      /** Details about payment methods collected offline. */
1386
      @SerializedName("offline")
1387
      Offline offline;
1388

1389
      /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1390
      @SerializedName("preferred_locales")
1391
      List<String> preferredLocales;
1392

1393
      /**
1394
       * How card details were read in this transaction.
1395
       *
1396
       * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1397
       * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1398
       */
1399
      @SerializedName("read_method")
1400
      String readMethod;
1401

1402
      @SerializedName("wallet")
1403
      Wallet wallet;
1404

1405
      /**
1406
       * For more details about Networks, please refer to the <a
1407
       * href="https://docs.stripe.com/api">API Reference.</a>
1408
       */
1409
      @Getter
1410
      @Setter
1411
      @EqualsAndHashCode(callSuper = false)
1412
      public static class Networks extends StripeObject {
×
1413
        /** All available networks for the card. */
1414
        @SerializedName("available")
1415
        List<String> available;
1416

1417
        /** The preferred network for the card. */
1418
        @SerializedName("preferred")
1419
        String preferred;
1420
      }
1421

1422
      /**
1423
       * For more details about Offline, please refer to the <a
1424
       * href="https://docs.stripe.com/api">API Reference.</a>
1425
       */
1426
      @Getter
1427
      @Setter
1428
      @EqualsAndHashCode(callSuper = false)
1429
      public static class Offline extends StripeObject {
×
1430
        /** Time at which the payment was collected while offline. */
1431
        @SerializedName("stored_at")
1432
        Long storedAt;
1433

1434
        /**
1435
         * The method used to process this payment method offline. Only deferred is allowed.
1436
         *
1437
         * <p>Equal to {@code deferred}.
1438
         */
1439
        @SerializedName("type")
1440
        String type;
1441
      }
1442

1443
      /**
1444
       * For more details about Wallet, please refer to the <a
1445
       * href="https://docs.stripe.com/api">API Reference.</a>
1446
       */
1447
      @Getter
1448
      @Setter
1449
      @EqualsAndHashCode(callSuper = false)
1450
      public static class Wallet extends StripeObject {
×
1451
        /**
1452
         * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1453
         * samsung_pay}, or {@code unknown}.
1454
         */
1455
        @SerializedName("type")
1456
        String type;
1457
      }
1458
    }
1459

1460
    /**
1461
     * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
1462
     * Reference.</a>
1463
     */
1464
    @Getter
1465
    @Setter
1466
    @EqualsAndHashCode(callSuper = false)
1467
    public static class Cashapp extends StripeObject {
×
1468
      /** A unique and immutable identifier assigned by Cash App to every buyer. */
1469
      @SerializedName("buyer_id")
1470
      String buyerId;
1471

1472
      /** A public identifier for buyers using Cash App. */
1473
      @SerializedName("cashtag")
1474
      String cashtag;
1475
    }
1476

1477
    /**
1478
     * For more details about CustomerBalance, please refer to the <a
1479
     * href="https://docs.stripe.com/api">API Reference.</a>
1480
     */
1481
    @Getter
1482
    @Setter
1483
    @EqualsAndHashCode(callSuper = false)
1484
    public static class CustomerBalance extends StripeObject {}
×
1485

1486
    /**
1487
     * For more details about Eps, please refer to the <a href="https://docs.stripe.com/api">API
1488
     * Reference.</a>
1489
     */
1490
    @Getter
1491
    @Setter
1492
    @EqualsAndHashCode(callSuper = false)
1493
    public static class Eps extends StripeObject {
×
1494
      /**
1495
       * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code
1496
       * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code
1497
       * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code
1498
       * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag},
1499
       * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code
1500
       * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code
1501
       * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark},
1502
       * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code
1503
       * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag},
1504
       * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code
1505
       * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code
1506
       * vr_bank_braunau}.
1507
       */
1508
      @SerializedName("bank")
1509
      String bank;
1510
    }
1511

1512
    /**
1513
     * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
1514
     * Reference.</a>
1515
     */
1516
    @Getter
1517
    @Setter
1518
    @EqualsAndHashCode(callSuper = false)
1519
    public static class Fpx extends StripeObject {
×
1520
      /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */
1521
      @SerializedName("account_holder_type")
1522
      String accountHolderType;
1523

1524
      /**
1525
       * The customer's bank, if provided. Can be one of {@code affin_bank}, {@code agrobank},
1526
       * {@code alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code
1527
       * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code
1528
       * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code
1529
       * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code
1530
       * pb_enterprise}, or {@code bank_of_china}.
1531
       */
1532
      @SerializedName("bank")
1533
      String bank;
1534
    }
1535

1536
    /**
1537
     * For more details about Giropay, please refer to the <a href="https://docs.stripe.com/api">API
1538
     * Reference.</a>
1539
     */
1540
    @Getter
1541
    @Setter
1542
    @EqualsAndHashCode(callSuper = false)
1543
    public static class Giropay extends StripeObject {}
×
1544

1545
    /**
1546
     * For more details about Gopay, please refer to the <a href="https://docs.stripe.com/api">API
1547
     * Reference.</a>
1548
     */
1549
    @Getter
1550
    @Setter
1551
    @EqualsAndHashCode(callSuper = false)
NEW
1552
    public static class Gopay extends StripeObject {}
×
1553

1554
    /**
1555
     * For more details about Grabpay, please refer to the <a href="https://docs.stripe.com/api">API
1556
     * Reference.</a>
1557
     */
1558
    @Getter
1559
    @Setter
1560
    @EqualsAndHashCode(callSuper = false)
1561
    public static class Grabpay extends StripeObject {}
×
1562

1563
    /**
1564
     * For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
1565
     * Reference.</a>
1566
     */
1567
    @Getter
1568
    @Setter
1569
    @EqualsAndHashCode(callSuper = false)
1570
    public static class Ideal extends StripeObject {
×
1571
      /**
1572
       * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code
1573
       * bunq}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26},
1574
       * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code
1575
       * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}.
1576
       */
1577
      @SerializedName("bank")
1578
      String bank;
1579

1580
      /**
1581
       * The Bank Identifier Code of the customer's bank, if the bank was provided.
1582
       *
1583
       * <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
1584
       * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
1585
       * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code
1586
       * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
1587
       */
1588
      @SerializedName("bic")
1589
      String bic;
1590
    }
1591

1592
    /**
1593
     * For more details about InteracPresent, please refer to the <a
1594
     * href="https://docs.stripe.com/api">API Reference.</a>
1595
     */
1596
    @Getter
1597
    @Setter
1598
    @EqualsAndHashCode(callSuper = false)
1599
    public static class InteracPresent extends StripeObject {
×
1600
      /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */
1601
      @SerializedName("brand")
1602
      String brand;
1603

1604
      /**
1605
       * The cardholder name as read from the card, in <a
1606
       * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1607
       * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1608
       * some cases, the cardholder name may not be available depending on how the issuer has
1609
       * configured the card. Cardholder name is typically not available on swipe or contactless
1610
       * payments, such as those made with Apple Pay and Google Pay.
1611
       */
1612
      @SerializedName("cardholder_name")
1613
      String cardholderName;
1614

1615
      /**
1616
       * Two-letter ISO code representing the country of the card. You could use this attribute to
1617
       * get a sense of the international breakdown of cards you've collected.
1618
       */
1619
      @SerializedName("country")
1620
      String country;
1621

1622
      /**
1623
       * A high-level description of the type of cards issued in this range. (For internal use only
1624
       * and not typically available in standard API requests.)
1625
       */
1626
      @SerializedName("description")
1627
      String description;
1628

1629
      /** Two-digit number representing the card's expiration month. */
1630
      @SerializedName("exp_month")
1631
      Long expMonth;
1632

1633
      /** Four-digit number representing the card's expiration year. */
1634
      @SerializedName("exp_year")
1635
      Long expYear;
1636

1637
      /**
1638
       * Uniquely identifies this particular card number. You can use this attribute to check
1639
       * whether two customers who’ve signed up with you are using the same card number, for
1640
       * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
1641
       * tokenized number might be provided instead of the underlying card number.
1642
       *
1643
       * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1644
       * fingerprints for the same card---one for India and one for the rest of the world.</em>
1645
       */
1646
      @SerializedName("fingerprint")
1647
      String fingerprint;
1648

1649
      /**
1650
       * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
1651
       * unknown}.
1652
       */
1653
      @SerializedName("funding")
1654
      String funding;
1655

1656
      /**
1657
       * Issuer identification number of the card. (For internal use only and not typically
1658
       * available in standard API requests.)
1659
       */
1660
      @SerializedName("iin")
1661
      String iin;
1662

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

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

1674
      /** Contains information about card networks that can be used to process the payment. */
1675
      @SerializedName("networks")
1676
      Networks networks;
1677

1678
      /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1679
      @SerializedName("preferred_locales")
1680
      List<String> preferredLocales;
1681

1682
      /**
1683
       * How card details were read in this transaction.
1684
       *
1685
       * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1686
       * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1687
       */
1688
      @SerializedName("read_method")
1689
      String readMethod;
1690

1691
      /**
1692
       * For more details about Networks, please refer to the <a
1693
       * href="https://docs.stripe.com/api">API Reference.</a>
1694
       */
1695
      @Getter
1696
      @Setter
1697
      @EqualsAndHashCode(callSuper = false)
1698
      public static class Networks extends StripeObject {
×
1699
        /** All available networks for the card. */
1700
        @SerializedName("available")
1701
        List<String> available;
1702

1703
        /** The preferred network for the card. */
1704
        @SerializedName("preferred")
1705
        String preferred;
1706
      }
1707
    }
1708

1709
    /**
1710
     * For more details about KakaoPay, please refer to the <a
1711
     * href="https://docs.stripe.com/api">API Reference.</a>
1712
     */
1713
    @Getter
1714
    @Setter
1715
    @EqualsAndHashCode(callSuper = false)
1716
    public static class KakaoPay extends StripeObject {}
×
1717

1718
    /**
1719
     * For more details about Klarna, please refer to the <a href="https://docs.stripe.com/api">API
1720
     * Reference.</a>
1721
     */
1722
    @Getter
1723
    @Setter
1724
    @EqualsAndHashCode(callSuper = false)
1725
    public static class Klarna extends StripeObject {
×
1726
      /** The customer's date of birth, if provided. */
1727
      @SerializedName("dob")
1728
      Dob dob;
1729

1730
      /**
1731
       * For more details about Dob, please refer to the <a href="https://docs.stripe.com/api">API
1732
       * Reference.</a>
1733
       */
1734
      @Getter
1735
      @Setter
1736
      @EqualsAndHashCode(callSuper = false)
1737
      public static class Dob extends StripeObject {
×
1738
        /** The day of birth, between 1 and 31. */
1739
        @SerializedName("day")
1740
        Long day;
1741

1742
        /** The month of birth, between 1 and 12. */
1743
        @SerializedName("month")
1744
        Long month;
1745

1746
        /** The four-digit year of birth. */
1747
        @SerializedName("year")
1748
        Long year;
1749
      }
1750
    }
1751

1752
    /**
1753
     * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
1754
     * Reference.</a>
1755
     */
1756
    @Getter
1757
    @Setter
1758
    @EqualsAndHashCode(callSuper = false)
1759
    public static class Konbini extends StripeObject {}
×
1760

1761
    /**
1762
     * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
1763
     * Reference.</a>
1764
     */
1765
    @Getter
1766
    @Setter
1767
    @EqualsAndHashCode(callSuper = false)
1768
    public static class KrCard extends StripeObject {
×
1769
      /**
1770
       * The local credit or debit card brand.
1771
       *
1772
       * <p>One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code
1773
       * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code
1774
       * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code
1775
       * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or
1776
       * {@code woori}.
1777
       */
1778
      @SerializedName("brand")
1779
      String brand;
1780

1781
      /** The last four digits of the card. This may not be present for American Express cards. */
1782
      @SerializedName("last4")
1783
      String last4;
1784
    }
1785

1786
    /**
1787
     * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
1788
     * Reference.</a>
1789
     */
1790
    @Getter
1791
    @Setter
1792
    @EqualsAndHashCode(callSuper = false)
1793
    public static class Link extends StripeObject {
×
1794
      /** Account owner's email address. */
1795
      @SerializedName("email")
1796
      String email;
1797

1798
      /** [Deprecated] This is a legacy parameter that no longer has any function. */
1799
      @SerializedName("persistent_token")
1800
      @Deprecated
1801
      String persistentToken;
1802
    }
1803

1804
    /**
1805
     * For more details about MbWay, please refer to the <a href="https://docs.stripe.com/api">API
1806
     * Reference.</a>
1807
     */
1808
    @Getter
1809
    @Setter
1810
    @EqualsAndHashCode(callSuper = false)
1811
    public static class MbWay extends StripeObject {}
×
1812

1813
    /**
1814
     * For more details about Mobilepay, please refer to the <a
1815
     * href="https://docs.stripe.com/api">API Reference.</a>
1816
     */
1817
    @Getter
1818
    @Setter
1819
    @EqualsAndHashCode(callSuper = false)
1820
    public static class Mobilepay extends StripeObject {}
×
1821

1822
    /**
1823
     * For more details about Multibanco, please refer to the <a
1824
     * href="https://docs.stripe.com/api">API Reference.</a>
1825
     */
1826
    @Getter
1827
    @Setter
1828
    @EqualsAndHashCode(callSuper = false)
1829
    public static class Multibanco extends StripeObject {}
×
1830

1831
    /**
1832
     * For more details about NaverPay, please refer to the <a
1833
     * href="https://docs.stripe.com/api">API Reference.</a>
1834
     */
1835
    @Getter
1836
    @Setter
1837
    @EqualsAndHashCode(callSuper = false)
1838
    public static class NaverPay extends StripeObject {
×
1839
      /**
1840
       * Whether to fund this transaction with Naver Pay points or a card.
1841
       *
1842
       * <p>One of {@code card}, or {@code points}.
1843
       */
1844
      @SerializedName("funding")
1845
      String funding;
1846
    }
1847

1848
    /**
1849
     * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
1850
     * Reference.</a>
1851
     */
1852
    @Getter
1853
    @Setter
1854
    @EqualsAndHashCode(callSuper = false)
1855
    public static class Oxxo extends StripeObject {}
×
1856

1857
    /**
1858
     * For more details about P24, please refer to the <a href="https://docs.stripe.com/api">API
1859
     * Reference.</a>
1860
     */
1861
    @Getter
1862
    @Setter
1863
    @EqualsAndHashCode(callSuper = false)
1864
    public static class P24 extends StripeObject {
×
1865
      /**
1866
       * The customer's bank, if provided.
1867
       *
1868
       * <p>One of {@code alior_bank}, {@code bank_millennium}, {@code bank_nowy_bfg_sa}, {@code
1869
       * bank_pekao_sa}, {@code banki_spbdzielcze}, {@code blik}, {@code bnp_paribas}, {@code boz},
1870
       * {@code citi_handlowy}, {@code credit_agricole}, {@code envelobank}, {@code
1871
       * etransfer_pocztowy24}, {@code getin_bank}, {@code ideabank}, {@code ing}, {@code inteligo},
1872
       * {@code mbank_mtransfer}, {@code nest_przelew}, {@code noble_pay}, {@code pbac_z_ipko},
1873
       * {@code plus_bank}, {@code santander_przelew24}, {@code tmobile_usbugi_bankowe}, {@code
1874
       * toyota_bank}, {@code velobank}, or {@code volkswagen_bank}.
1875
       */
1876
      @SerializedName("bank")
1877
      String bank;
1878
    }
1879

1880
    /**
1881
     * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
1882
     * Reference.</a>
1883
     */
1884
    @Getter
1885
    @Setter
1886
    @EqualsAndHashCode(callSuper = false)
1887
    public static class Payco extends StripeObject {}
×
1888

1889
    /**
1890
     * For more details about Paynow, please refer to the <a href="https://docs.stripe.com/api">API
1891
     * Reference.</a>
1892
     */
1893
    @Getter
1894
    @Setter
1895
    @EqualsAndHashCode(callSuper = false)
1896
    public static class Paynow extends StripeObject {}
×
1897

1898
    /**
1899
     * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
1900
     * Reference.</a>
1901
     */
1902
    @Getter
1903
    @Setter
1904
    @EqualsAndHashCode(callSuper = false)
1905
    public static class Paypal extends StripeObject {
×
1906
      /**
1907
       * Uniquely identifies this particular PayPal account. You can use this attribute to check
1908
       * whether two PayPal accounts are the same.
1909
       */
1910
      @SerializedName("fingerprint")
1911
      String fingerprint;
1912

1913
      /**
1914
       * Owner's email. Values are provided by PayPal directly (if supported) at the time of
1915
       * authorization or settlement. They cannot be set or mutated.
1916
       */
1917
      @SerializedName("payer_email")
1918
      String payerEmail;
1919

1920
      /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */
1921
      @SerializedName("payer_id")
1922
      String payerId;
1923

1924
      /**
1925
       * Owner's verified email. Values are verified or provided by PayPal directly (if supported)
1926
       * at the time of authorization or settlement. They cannot be set or mutated.
1927
       */
1928
      @SerializedName("verified_email")
1929
      String verifiedEmail;
1930
    }
1931

1932
    /**
1933
     * For more details about Payto, please refer to the <a href="https://docs.stripe.com/api">API
1934
     * Reference.</a>
1935
     */
1936
    @Getter
1937
    @Setter
1938
    @EqualsAndHashCode(callSuper = false)
1939
    public static class Payto extends StripeObject {
×
1940
      /** Bank-State-Branch number of the bank account. */
1941
      @SerializedName("bsb_number")
1942
      String bsbNumber;
1943

1944
      /** Last four digits of the bank account number. */
1945
      @SerializedName("last4")
1946
      String last4;
1947

1948
      /** The PayID alias for the bank account. */
1949
      @SerializedName("pay_id")
1950
      String payId;
1951
    }
1952

1953
    /**
1954
     * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
1955
     * Reference.</a>
1956
     */
1957
    @Getter
1958
    @Setter
1959
    @EqualsAndHashCode(callSuper = false)
1960
    public static class Pix extends StripeObject {}
×
1961

1962
    /**
1963
     * For more details about Promptpay, please refer to the <a
1964
     * href="https://docs.stripe.com/api">API Reference.</a>
1965
     */
1966
    @Getter
1967
    @Setter
1968
    @EqualsAndHashCode(callSuper = false)
1969
    public static class Promptpay extends StripeObject {}
×
1970

1971
    /**
1972
     * For more details about Qris, please refer to the <a href="https://docs.stripe.com/api">API
1973
     * Reference.</a>
1974
     */
1975
    @Getter
1976
    @Setter
1977
    @EqualsAndHashCode(callSuper = false)
NEW
1978
    public static class Qris extends StripeObject {}
×
1979

1980
    /**
1981
     * For more details about Rechnung, please refer to the <a
1982
     * href="https://docs.stripe.com/api">API Reference.</a>
1983
     */
1984
    @Getter
1985
    @Setter
1986
    @EqualsAndHashCode(callSuper = false)
1987
    public static class Rechnung extends StripeObject {
×
1988
      @SerializedName("dob")
1989
      Dob dob;
1990

1991
      /**
1992
       * For more details about Dob, please refer to the <a href="https://docs.stripe.com/api">API
1993
       * Reference.</a>
1994
       */
1995
      @Getter
1996
      @Setter
1997
      @EqualsAndHashCode(callSuper = false)
1998
      public static class Dob extends StripeObject {
×
1999
        /** The day of birth, between 1 and 31. */
2000
        @SerializedName("day")
2001
        Long day;
2002

2003
        /** The month of birth, between 1 and 12. */
2004
        @SerializedName("month")
2005
        Long month;
2006

2007
        /** The four-digit year of birth. */
2008
        @SerializedName("year")
2009
        Long year;
2010
      }
2011
    }
2012

2013
    /**
2014
     * For more details about RevolutPay, please refer to the <a
2015
     * href="https://docs.stripe.com/api">API Reference.</a>
2016
     */
2017
    @Getter
2018
    @Setter
2019
    @EqualsAndHashCode(callSuper = false)
2020
    public static class RevolutPay extends StripeObject {}
×
2021

2022
    /**
2023
     * For more details about SamsungPay, please refer to the <a
2024
     * href="https://docs.stripe.com/api">API Reference.</a>
2025
     */
2026
    @Getter
2027
    @Setter
2028
    @EqualsAndHashCode(callSuper = false)
2029
    public static class SamsungPay extends StripeObject {}
×
2030

2031
    /**
2032
     * For more details about SepaDebit, please refer to the <a
2033
     * href="https://docs.stripe.com/api">API Reference.</a>
2034
     */
2035
    @Getter
2036
    @Setter
2037
    @EqualsAndHashCode(callSuper = false)
2038
    public static class SepaDebit extends StripeObject {
×
2039
      /** Bank code of bank associated with the bank account. */
2040
      @SerializedName("bank_code")
2041
      String bankCode;
2042

2043
      /** Branch code of bank associated with the bank account. */
2044
      @SerializedName("branch_code")
2045
      String branchCode;
2046

2047
      /** Two-letter ISO code representing the country the bank account is located in. */
2048
      @SerializedName("country")
2049
      String country;
2050

2051
      /**
2052
       * Uniquely identifies this particular bank account. You can use this attribute to check
2053
       * whether two bank accounts are the same.
2054
       */
2055
      @SerializedName("fingerprint")
2056
      String fingerprint;
2057

2058
      /** Information about the object that generated this PaymentMethod. */
2059
      @SerializedName("generated_from")
2060
      GeneratedFrom generatedFrom;
2061

2062
      /** Last four characters of the IBAN. */
2063
      @SerializedName("last4")
2064
      String last4;
2065

2066
      /**
2067
       * For more details about GeneratedFrom, please refer to the <a
2068
       * href="https://docs.stripe.com/api">API Reference.</a>
2069
       */
2070
      @Getter
2071
      @Setter
2072
      @EqualsAndHashCode(callSuper = false)
2073
      public static class GeneratedFrom extends StripeObject {
×
2074
        /** The ID of the Charge that generated this PaymentMethod, if any. */
2075
        @SerializedName("charge")
2076
        @Getter(lombok.AccessLevel.NONE)
2077
        @Setter(lombok.AccessLevel.NONE)
2078
        ExpandableField<Charge> charge;
2079

2080
        /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
2081
        @SerializedName("setup_attempt")
2082
        @Getter(lombok.AccessLevel.NONE)
2083
        @Setter(lombok.AccessLevel.NONE)
2084
        ExpandableField<SetupAttempt> setupAttempt;
2085

2086
        /** Get ID of expandable {@code charge} object. */
2087
        public String getCharge() {
2088
          return (this.charge != null) ? this.charge.getId() : null;
×
2089
        }
2090

2091
        public void setCharge(String id) {
2092
          this.charge = ApiResource.setExpandableFieldId(id, this.charge);
×
2093
        }
×
2094

2095
        /** Get expanded {@code charge}. */
2096
        public Charge getChargeObject() {
2097
          return (this.charge != null) ? this.charge.getExpanded() : null;
×
2098
        }
2099

2100
        public void setChargeObject(Charge expandableObject) {
2101
          this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
2102
        }
×
2103

2104
        /** Get ID of expandable {@code setupAttempt} object. */
2105
        public String getSetupAttempt() {
2106
          return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
2107
        }
2108

2109
        public void setSetupAttempt(String id) {
2110
          this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
2111
        }
×
2112

2113
        /** Get expanded {@code setupAttempt}. */
2114
        public SetupAttempt getSetupAttemptObject() {
2115
          return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
2116
        }
2117

2118
        public void setSetupAttemptObject(SetupAttempt expandableObject) {
2119
          this.setupAttempt =
×
2120
              new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
2121
        }
×
2122
      }
2123
    }
2124

2125
    /**
2126
     * For more details about Shopeepay, please refer to the <a
2127
     * href="https://docs.stripe.com/api">API Reference.</a>
2128
     */
2129
    @Getter
2130
    @Setter
2131
    @EqualsAndHashCode(callSuper = false)
NEW
2132
    public static class Shopeepay extends StripeObject {}
×
2133

2134
    /**
2135
     * For more details about Sofort, please refer to the <a href="https://docs.stripe.com/api">API
2136
     * Reference.</a>
2137
     */
2138
    @Getter
2139
    @Setter
2140
    @EqualsAndHashCode(callSuper = false)
2141
    public static class Sofort extends StripeObject {
×
2142
      /** Two-letter ISO code representing the country the bank account is located in. */
2143
      @SerializedName("country")
2144
      String country;
2145
    }
2146

2147
    /**
2148
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
2149
     * Reference.</a>
2150
     */
2151
    @Getter
2152
    @Setter
2153
    @EqualsAndHashCode(callSuper = false)
2154
    public static class Swish extends StripeObject {}
×
2155

2156
    /**
2157
     * For more details about Twint, please refer to the <a href="https://docs.stripe.com/api">API
2158
     * Reference.</a>
2159
     */
2160
    @Getter
2161
    @Setter
2162
    @EqualsAndHashCode(callSuper = false)
2163
    public static class Twint extends StripeObject {}
×
2164

2165
    /**
2166
     * For more details about UsBankAccount, please refer to the <a
2167
     * href="https://docs.stripe.com/api">API Reference.</a>
2168
     */
2169
    @Getter
2170
    @Setter
2171
    @EqualsAndHashCode(callSuper = false)
2172
    public static class UsBankAccount extends StripeObject {
×
2173
      /**
2174
       * Account holder type: individual or company.
2175
       *
2176
       * <p>One of {@code company}, or {@code individual}.
2177
       */
2178
      @SerializedName("account_holder_type")
2179
      String accountHolderType;
2180

2181
      /** Account number of the bank account. */
2182
      @SerializedName("account_number")
2183
      String accountNumber;
2184

2185
      /**
2186
       * Account type: checkings or savings. Defaults to checking if omitted.
2187
       *
2188
       * <p>One of {@code checking}, or {@code savings}.
2189
       */
2190
      @SerializedName("account_type")
2191
      String accountType;
2192

2193
      /** The name of the bank. */
2194
      @SerializedName("bank_name")
2195
      String bankName;
2196

2197
      /** The ID of the Financial Connections Account used to create the payment method. */
2198
      @SerializedName("financial_connections_account")
2199
      String financialConnectionsAccount;
2200

2201
      /**
2202
       * Uniquely identifies this particular bank account. You can use this attribute to check
2203
       * whether two bank accounts are the same.
2204
       */
2205
      @SerializedName("fingerprint")
2206
      String fingerprint;
2207

2208
      /** Last four digits of the bank account number. */
2209
      @SerializedName("last4")
2210
      String last4;
2211

2212
      /** Contains information about US bank account networks that can be used. */
2213
      @SerializedName("networks")
2214
      Networks networks;
2215

2216
      /** Routing number of the bank account. */
2217
      @SerializedName("routing_number")
2218
      String routingNumber;
2219

2220
      /** Contains information about the future reusability of this PaymentMethod. */
2221
      @SerializedName("status_details")
2222
      StatusDetails statusDetails;
2223

2224
      /**
2225
       * For more details about Networks, please refer to the <a
2226
       * href="https://docs.stripe.com/api">API Reference.</a>
2227
       */
2228
      @Getter
2229
      @Setter
2230
      @EqualsAndHashCode(callSuper = false)
2231
      public static class Networks extends StripeObject {
×
2232
        /** The preferred network. */
2233
        @SerializedName("preferred")
2234
        String preferred;
2235

2236
        /** All supported networks. */
2237
        @SerializedName("supported")
2238
        List<String> supported;
2239
      }
2240

2241
      /**
2242
       * For more details about StatusDetails, please refer to the <a
2243
       * href="https://docs.stripe.com/api">API Reference.</a>
2244
       */
2245
      @Getter
2246
      @Setter
2247
      @EqualsAndHashCode(callSuper = false)
2248
      public static class StatusDetails extends StripeObject {
×
2249
        @SerializedName("blocked")
2250
        Blocked blocked;
2251

2252
        /**
2253
         * For more details about Blocked, please refer to the <a
2254
         * href="https://docs.stripe.com/api">API Reference.</a>
2255
         */
2256
        @Getter
2257
        @Setter
2258
        @EqualsAndHashCode(callSuper = false)
2259
        public static class Blocked extends StripeObject {
×
2260
          /**
2261
           * The ACH network code that resulted in this block.
2262
           *
2263
           * <p>One of {@code R02}, {@code R03}, {@code R04}, {@code R05}, {@code R07}, {@code R08},
2264
           * {@code R10}, {@code R11}, {@code R16}, {@code R20}, {@code R29}, or {@code R31}.
2265
           */
2266
          @SerializedName("network_code")
2267
          String networkCode;
2268

2269
          /**
2270
           * The reason why this PaymentMethod's fingerprint has been blocked
2271
           *
2272
           * <p>One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code
2273
           * bank_account_invalid_details}, {@code bank_account_restricted}, {@code
2274
           * bank_account_unusable}, or {@code debit_not_authorized}.
2275
           */
2276
          @SerializedName("reason")
2277
          String reason;
2278
        }
2279
      }
2280
    }
2281

2282
    /**
2283
     * For more details about WechatPay, please refer to the <a
2284
     * href="https://docs.stripe.com/api">API Reference.</a>
2285
     */
2286
    @Getter
2287
    @Setter
2288
    @EqualsAndHashCode(callSuper = false)
2289
    public static class WechatPay extends StripeObject {}
×
2290

2291
    /**
2292
     * For more details about Zip, please refer to the <a href="https://docs.stripe.com/api">API
2293
     * Reference.</a>
2294
     */
2295
    @Getter
2296
    @Setter
2297
    @EqualsAndHashCode(callSuper = false)
2298
    public static class Zip extends StripeObject {}
×
2299
  }
2300

2301
  /**
2302
   * For more details about Shipping, please refer to the <a href="https://docs.stripe.com/api">API
2303
   * Reference.</a>
2304
   */
2305
  @Getter
2306
  @Setter
2307
  @EqualsAndHashCode(callSuper = false)
2308
  public static class Shipping extends StripeObject {
×
2309
    @SerializedName("address")
2310
    Address address;
2311

2312
    /** Recipient name. */
2313
    @SerializedName("name")
2314
    String name;
2315

2316
    /** Recipient phone (including extension). */
2317
    @SerializedName("phone")
2318
    String phone;
2319
  }
2320

2321
  public static class TestHelpers {
2322
    private TestHelpers() {}
2323

2324
    /** Creates a test mode Confirmation Token server side for your integration tests. */
2325
    public static ConfirmationToken create(Map<String, Object> params) throws StripeException {
2326
      return create(params, (RequestOptions) null);
×
2327
    }
2328

2329
    /** Creates a test mode Confirmation Token server side for your integration tests. */
2330
    public static ConfirmationToken create(Map<String, Object> params, RequestOptions options)
2331
        throws StripeException {
2332
      String path = "/v1/test_helpers/confirmation_tokens";
×
2333
      ApiRequest request =
×
2334
          new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
2335
      return getGlobalResponseGetter().request(request, ConfirmationToken.class);
×
2336
    }
2337

2338
    /** Creates a test mode Confirmation Token server side for your integration tests. */
2339
    public static ConfirmationToken create(ConfirmationTokenCreateParams params)
2340
        throws StripeException {
2341
      return create(params, (RequestOptions) null);
×
2342
    }
2343

2344
    /** Creates a test mode Confirmation Token server side for your integration tests. */
2345
    public static ConfirmationToken create(
2346
        ConfirmationTokenCreateParams params, RequestOptions options) throws StripeException {
2347
      String path = "/v1/test_helpers/confirmation_tokens";
×
2348
      ApiResource.checkNullTypedParams(path, params);
×
2349
      ApiRequest request =
×
2350
          new ApiRequest(
2351
              BaseAddress.API,
2352
              ApiResource.RequestMethod.POST,
2353
              path,
2354
              ApiRequestParams.paramsToMap(params),
×
2355
              options);
2356
      return getGlobalResponseGetter().request(request, ConfirmationToken.class);
×
2357
    }
2358
  }
2359

2360
  @Override
2361
  public void setResponseGetter(StripeResponseGetter responseGetter) {
2362
    super.setResponseGetter(responseGetter);
×
2363
    trySetResponseGetter(mandateData, responseGetter);
×
2364
    trySetResponseGetter(paymentMethodOptions, responseGetter);
×
2365
    trySetResponseGetter(paymentMethodPreview, responseGetter);
×
2366
    trySetResponseGetter(shipping, responseGetter);
×
2367
  }
×
2368
}
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