• 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

49.78
/src/main/java/com/stripe/model/PaymentMethod.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.PaymentMethodAttachParams;
13
import com.stripe.param.PaymentMethodCreateParams;
14
import com.stripe.param.PaymentMethodDetachParams;
15
import com.stripe.param.PaymentMethodListParams;
16
import com.stripe.param.PaymentMethodRetrieveParams;
17
import com.stripe.param.PaymentMethodUpdateParams;
18
import java.util.List;
19
import java.util.Map;
20
import lombok.EqualsAndHashCode;
21
import lombok.Getter;
22
import lombok.Setter;
23

24
/**
25
 * PaymentMethod objects represent your customer's payment instruments. You can use them with <a
26
 * href="https://stripe.com/docs/payments/payment-intents">PaymentIntents</a> to collect payments or
27
 * save them to Customer objects to store instrument details for future payments.
28
 *
29
 * <p>Related guides: <a href="https://stripe.com/docs/payments/payment-methods">Payment Methods</a>
30
 * and <a href="https://stripe.com/docs/payments/more-payment-scenarios">More Payment Scenarios</a>.
31
 */
32
@Getter
33
@Setter
34
@EqualsAndHashCode(callSuper = false)
35
public class PaymentMethod extends ApiResource implements HasId, MetadataStore<PaymentMethod> {
1✔
36
  @SerializedName("acss_debit")
37
  AcssDebit acssDebit;
38

39
  @SerializedName("affirm")
40
  Affirm affirm;
41

42
  @SerializedName("afterpay_clearpay")
43
  AfterpayClearpay afterpayClearpay;
44

45
  @SerializedName("alipay")
46
  Alipay alipay;
47

48
  /**
49
   * This field indicates whether this payment method can be shown again to its customer in a
50
   * checkout flow. Stripe products such as Checkout and Elements use this field to determine
51
   * whether a payment method can be shown as a saved payment method in a checkout flow. The field
52
   * defaults to “unspecified”.
53
   *
54
   * <p>One of {@code always}, {@code limited}, or {@code unspecified}.
55
   */
56
  @SerializedName("allow_redisplay")
57
  String allowRedisplay;
58

59
  @SerializedName("alma")
60
  Alma alma;
61

62
  @SerializedName("amazon_pay")
63
  AmazonPay amazonPay;
64

65
  @SerializedName("au_becs_debit")
66
  AuBecsDebit auBecsDebit;
67

68
  @SerializedName("bacs_debit")
69
  BacsDebit bacsDebit;
70

71
  @SerializedName("bancontact")
72
  Bancontact bancontact;
73

74
  @SerializedName("billing_details")
75
  BillingDetails billingDetails;
76

77
  @SerializedName("blik")
78
  Blik blik;
79

80
  @SerializedName("boleto")
81
  Boleto boleto;
82

83
  @SerializedName("card")
84
  Card card;
85

86
  @SerializedName("card_present")
87
  CardPresent cardPresent;
88

89
  @SerializedName("cashapp")
90
  Cashapp cashapp;
91

92
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
93
  @SerializedName("created")
94
  Long created;
95

96
  /**
97
   * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the
98
   * PaymentMethod has not been saved to a Customer.
99
   */
100
  @SerializedName("customer")
101
  @Getter(lombok.AccessLevel.NONE)
102
  @Setter(lombok.AccessLevel.NONE)
103
  ExpandableField<Customer> customer;
104

105
  @SerializedName("customer_balance")
106
  CustomerBalance customerBalance;
107

108
  @SerializedName("eps")
109
  Eps eps;
110

111
  @SerializedName("fpx")
112
  Fpx fpx;
113

114
  @SerializedName("giropay")
115
  Giropay giropay;
116

117
  @SerializedName("gopay")
118
  Gopay gopay;
119

120
  @SerializedName("grabpay")
121
  Grabpay grabpay;
122

123
  /** Unique identifier for the object. */
124
  @Getter(onMethod_ = {@Override})
125
  @SerializedName("id")
126
  String id;
127

128
  @SerializedName("ideal")
129
  Ideal ideal;
130

131
  @SerializedName("interac_present")
132
  InteracPresent interacPresent;
133

134
  @SerializedName("kakao_pay")
135
  KakaoPay kakaoPay;
136

137
  @SerializedName("klarna")
138
  Klarna klarna;
139

140
  @SerializedName("konbini")
141
  Konbini konbini;
142

143
  @SerializedName("kr_card")
144
  KrCard krCard;
145

146
  @SerializedName("link")
147
  Link link;
148

149
  /**
150
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
151
   * object exists in test mode.
152
   */
153
  @SerializedName("livemode")
154
  Boolean livemode;
155

156
  @SerializedName("mb_way")
157
  MbWay mbWay;
158

159
  /**
160
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
161
   * to an object. This can be useful for storing additional information about the object in a
162
   * structured format.
163
   */
164
  @Getter(onMethod_ = {@Override})
165
  @SerializedName("metadata")
166
  Map<String, String> metadata;
167

168
  @SerializedName("mobilepay")
169
  Mobilepay mobilepay;
170

171
  @SerializedName("multibanco")
172
  Multibanco multibanco;
173

174
  @SerializedName("naver_pay")
175
  NaverPay naverPay;
176

177
  /**
178
   * String representing the object's type. Objects of the same type share the same value.
179
   *
180
   * <p>Equal to {@code payment_method}.
181
   */
182
  @SerializedName("object")
183
  String object;
184

185
  @SerializedName("oxxo")
186
  Oxxo oxxo;
187

188
  @SerializedName("p24")
189
  P24 p24;
190

191
  @SerializedName("payco")
192
  Payco payco;
193

194
  @SerializedName("paynow")
195
  Paynow paynow;
196

197
  @SerializedName("paypal")
198
  Paypal paypal;
199

200
  @SerializedName("payto")
201
  Payto payto;
202

203
  @SerializedName("pix")
204
  Pix pix;
205

206
  @SerializedName("promptpay")
207
  Promptpay promptpay;
208

209
  @SerializedName("qris")
210
  Qris qris;
211

212
  /**
213
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
214
   * Session</a> for more information.
215
   */
216
  @SerializedName("radar_options")
217
  RadarOptions radarOptions;
218

219
  @SerializedName("rechnung")
220
  Rechnung rechnung;
221

222
  @SerializedName("revolut_pay")
223
  RevolutPay revolutPay;
224

225
  @SerializedName("samsung_pay")
226
  SamsungPay samsungPay;
227

228
  @SerializedName("sepa_debit")
229
  SepaDebit sepaDebit;
230

231
  @SerializedName("shopeepay")
232
  Shopeepay shopeepay;
233

234
  @SerializedName("sofort")
235
  Sofort sofort;
236

237
  @SerializedName("swish")
238
  Swish swish;
239

240
  @SerializedName("twint")
241
  Twint twint;
242

243
  /**
244
   * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name
245
   * matching this value. It contains additional information specific to the PaymentMethod type.
246
   *
247
   * <p>One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code
248
   * alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact},
249
   * {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code cashapp}, {@code
250
   * customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, {@code grabpay},
251
   * {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini},
252
   * {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code
253
   * naver_pay}, {@code oxxo}, {@code p24}, {@code payco}, {@code paynow}, {@code paypal}, {@code
254
   * payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay},
255
   * {@code samsung_pay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code swish},
256
   * {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
257
   */
258
  @SerializedName("type")
259
  String type;
260

261
  @SerializedName("us_bank_account")
262
  UsBankAccount usBankAccount;
263

264
  @SerializedName("wechat_pay")
265
  WechatPay wechatPay;
266

267
  @SerializedName("zip")
268
  Zip zip;
269

270
  /** Get ID of expandable {@code customer} object. */
271
  public String getCustomer() {
272
    return (this.customer != null) ? this.customer.getId() : null;
×
273
  }
274

275
  public void setCustomer(String id) {
276
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
277
  }
×
278

279
  /** Get expanded {@code customer}. */
280
  public Customer getCustomerObject() {
281
    return (this.customer != null) ? this.customer.getExpanded() : null;
×
282
  }
283

284
  public void setCustomerObject(Customer expandableObject) {
285
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
286
  }
×
287

288
  /**
289
   * Attaches a PaymentMethod object to a Customer.
290
   *
291
   * <p>To attach a new PaymentMethod to a customer for future payments, we recommend you use a <a
292
   * href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent with <a
293
   * href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>.
294
   * These approaches will perform any necessary steps to set up the PaymentMethod for future
295
   * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a
296
   * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the
297
   * PaymentMethod for future use, which makes later declines and payment friction more likely. See
298
   * <a href="https://stripe.com/docs/payments/payment-intents#future-usage">Optimizing cards for
299
   * future payments</a> for more information about setting up future payments.
300
   *
301
   * <p>To use this PaymentMethod as the default for invoice or subscription payments, set <a
302
   * href="https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method">{@code
303
   * invoice_settings.default_payment_method}</a>, on the Customer to the PaymentMethod’s ID.
304
   */
305
  public PaymentMethod attach(Map<String, Object> params) throws StripeException {
306
    return attach(params, (RequestOptions) null);
1✔
307
  }
308

309
  /**
310
   * Attaches a PaymentMethod object to a Customer.
311
   *
312
   * <p>To attach a new PaymentMethod to a customer for future payments, we recommend you use a <a
313
   * href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent with <a
314
   * href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>.
315
   * These approaches will perform any necessary steps to set up the PaymentMethod for future
316
   * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a
317
   * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the
318
   * PaymentMethod for future use, which makes later declines and payment friction more likely. See
319
   * <a href="https://stripe.com/docs/payments/payment-intents#future-usage">Optimizing cards for
320
   * future payments</a> for more information about setting up future payments.
321
   *
322
   * <p>To use this PaymentMethod as the default for invoice or subscription payments, set <a
323
   * href="https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method">{@code
324
   * invoice_settings.default_payment_method}</a>, on the Customer to the PaymentMethod’s ID.
325
   */
326
  public PaymentMethod attach(Map<String, Object> params, RequestOptions options)
327
      throws StripeException {
328
    String path =
1✔
329
        String.format("/v1/payment_methods/%s/attach", ApiResource.urlEncodeId(this.getId()));
1✔
330
    ApiRequest request =
1✔
331
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
332
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
333
  }
334

335
  /**
336
   * Attaches a PaymentMethod object to a Customer.
337
   *
338
   * <p>To attach a new PaymentMethod to a customer for future payments, we recommend you use a <a
339
   * href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent with <a
340
   * href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>.
341
   * These approaches will perform any necessary steps to set up the PaymentMethod for future
342
   * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a
343
   * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the
344
   * PaymentMethod for future use, which makes later declines and payment friction more likely. See
345
   * <a href="https://stripe.com/docs/payments/payment-intents#future-usage">Optimizing cards for
346
   * future payments</a> for more information about setting up future payments.
347
   *
348
   * <p>To use this PaymentMethod as the default for invoice or subscription payments, set <a
349
   * href="https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method">{@code
350
   * invoice_settings.default_payment_method}</a>, on the Customer to the PaymentMethod’s ID.
351
   */
352
  public PaymentMethod attach(PaymentMethodAttachParams params) throws StripeException {
353
    return attach(params, (RequestOptions) null);
1✔
354
  }
355

356
  /**
357
   * Attaches a PaymentMethod object to a Customer.
358
   *
359
   * <p>To attach a new PaymentMethod to a customer for future payments, we recommend you use a <a
360
   * href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent with <a
361
   * href="https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>.
362
   * These approaches will perform any necessary steps to set up the PaymentMethod for future
363
   * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a
364
   * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the
365
   * PaymentMethod for future use, which makes later declines and payment friction more likely. See
366
   * <a href="https://stripe.com/docs/payments/payment-intents#future-usage">Optimizing cards for
367
   * future payments</a> for more information about setting up future payments.
368
   *
369
   * <p>To use this PaymentMethod as the default for invoice or subscription payments, set <a
370
   * href="https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method">{@code
371
   * invoice_settings.default_payment_method}</a>, on the Customer to the PaymentMethod’s ID.
372
   */
373
  public PaymentMethod attach(PaymentMethodAttachParams params, RequestOptions options)
374
      throws StripeException {
375
    String path =
1✔
376
        String.format("/v1/payment_methods/%s/attach", ApiResource.urlEncodeId(this.getId()));
1✔
377
    ApiResource.checkNullTypedParams(path, params);
1✔
378
    ApiRequest request =
1✔
379
        new ApiRequest(
380
            BaseAddress.API,
381
            ApiResource.RequestMethod.POST,
382
            path,
383
            ApiRequestParams.paramsToMap(params),
1✔
384
            options);
385
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
386
  }
387

388
  /**
389
   * Creates a PaymentMethod object. Read the <a
390
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
391
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
392
   *
393
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
394
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
395
   * payment immediately or the <a
396
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
397
   * method details ahead of a future payment.
398
   */
399
  public static PaymentMethod create(Map<String, Object> params) throws StripeException {
400
    return create(params, (RequestOptions) null);
1✔
401
  }
402

403
  /**
404
   * Creates a PaymentMethod object. Read the <a
405
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
406
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
407
   *
408
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
409
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
410
   * payment immediately or the <a
411
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
412
   * method details ahead of a future payment.
413
   */
414
  public static PaymentMethod create(Map<String, Object> params, RequestOptions options)
415
      throws StripeException {
416
    String path = "/v1/payment_methods";
1✔
417
    ApiRequest request =
1✔
418
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
419
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
1✔
420
  }
421

422
  /**
423
   * Creates a PaymentMethod object. Read the <a
424
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
425
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
426
   *
427
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
428
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
429
   * payment immediately or the <a
430
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
431
   * method details ahead of a future payment.
432
   */
433
  public static PaymentMethod create(PaymentMethodCreateParams params) throws StripeException {
434
    return create(params, (RequestOptions) null);
×
435
  }
436

437
  /**
438
   * Creates a PaymentMethod object. Read the <a
439
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
440
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
441
   *
442
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
443
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
444
   * payment immediately or the <a
445
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
446
   * method details ahead of a future payment.
447
   */
448
  public static PaymentMethod create(PaymentMethodCreateParams params, RequestOptions options)
449
      throws StripeException {
450
    String path = "/v1/payment_methods";
×
451
    ApiResource.checkNullTypedParams(path, params);
×
452
    ApiRequest request =
×
453
        new ApiRequest(
454
            BaseAddress.API,
455
            ApiResource.RequestMethod.POST,
456
            path,
457
            ApiRequestParams.paramsToMap(params),
×
458
            options);
459
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
×
460
  }
461

462
  /**
463
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
464
   * longer be used for a payment or re-attached to a Customer.
465
   */
466
  public PaymentMethod detach() throws StripeException {
467
    return detach((Map<String, Object>) null, (RequestOptions) null);
1✔
468
  }
469

470
  /**
471
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
472
   * longer be used for a payment or re-attached to a Customer.
473
   */
474
  public PaymentMethod detach(RequestOptions options) throws StripeException {
475
    return detach((Map<String, Object>) null, options);
×
476
  }
477

478
  /**
479
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
480
   * longer be used for a payment or re-attached to a Customer.
481
   */
482
  public PaymentMethod detach(Map<String, Object> params) throws StripeException {
483
    return detach(params, (RequestOptions) null);
×
484
  }
485

486
  /**
487
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
488
   * longer be used for a payment or re-attached to a Customer.
489
   */
490
  public PaymentMethod detach(Map<String, Object> params, RequestOptions options)
491
      throws StripeException {
492
    String path =
1✔
493
        String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()));
1✔
494
    ApiRequest request =
1✔
495
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
496
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
497
  }
498

499
  /**
500
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
501
   * longer be used for a payment or re-attached to a Customer.
502
   */
503
  public PaymentMethod detach(PaymentMethodDetachParams params) throws StripeException {
504
    return detach(params, (RequestOptions) null);
1✔
505
  }
506

507
  /**
508
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
509
   * longer be used for a payment or re-attached to a Customer.
510
   */
511
  public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions options)
512
      throws StripeException {
513
    String path =
1✔
514
        String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()));
1✔
515
    ApiResource.checkNullTypedParams(path, params);
1✔
516
    ApiRequest request =
1✔
517
        new ApiRequest(
518
            BaseAddress.API,
519
            ApiResource.RequestMethod.POST,
520
            path,
521
            ApiRequestParams.paramsToMap(params),
1✔
522
            options);
523
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
524
  }
525

526
  /**
527
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
528
   * attached to a Customer for payments, you should use the <a
529
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
530
   * PaymentMethods</a> API instead.
531
   */
532
  public static PaymentMethodCollection list(Map<String, Object> params) throws StripeException {
533
    return list(params, (RequestOptions) null);
1✔
534
  }
535

536
  /**
537
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
538
   * attached to a Customer for payments, you should use the <a
539
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
540
   * PaymentMethods</a> API instead.
541
   */
542
  public static PaymentMethodCollection list(Map<String, Object> params, RequestOptions options)
543
      throws StripeException {
544
    String path = "/v1/payment_methods";
1✔
545
    ApiRequest request =
1✔
546
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
547
    return getGlobalResponseGetter().request(request, PaymentMethodCollection.class);
1✔
548
  }
549

550
  /**
551
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
552
   * attached to a Customer for payments, you should use the <a
553
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
554
   * PaymentMethods</a> API instead.
555
   */
556
  public static PaymentMethodCollection list(PaymentMethodListParams params)
557
      throws StripeException {
558
    return list(params, (RequestOptions) null);
1✔
559
  }
560

561
  /**
562
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
563
   * attached to a Customer for payments, you should use the <a
564
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
565
   * PaymentMethods</a> API instead.
566
   */
567
  public static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options)
568
      throws StripeException {
569
    String path = "/v1/payment_methods";
1✔
570
    ApiResource.checkNullTypedParams(path, params);
1✔
571
    ApiRequest request =
1✔
572
        new ApiRequest(
573
            BaseAddress.API,
574
            ApiResource.RequestMethod.GET,
575
            path,
576
            ApiRequestParams.paramsToMap(params),
1✔
577
            options);
578
    return getGlobalResponseGetter().request(request, PaymentMethodCollection.class);
1✔
579
  }
580

581
  /**
582
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
583
   * attached to a Customer, you should use <a
584
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
585
   * PaymentMethods</a>
586
   */
587
  public static PaymentMethod retrieve(String paymentMethod) throws StripeException {
588
    return retrieve(paymentMethod, (Map<String, Object>) null, (RequestOptions) null);
1✔
589
  }
590

591
  /**
592
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
593
   * attached to a Customer, you should use <a
594
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
595
   * PaymentMethods</a>
596
   */
597
  public static PaymentMethod retrieve(String paymentMethod, RequestOptions options)
598
      throws StripeException {
599
    return retrieve(paymentMethod, (Map<String, Object>) null, options);
×
600
  }
601

602
  /**
603
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
604
   * attached to a Customer, you should use <a
605
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
606
   * PaymentMethods</a>
607
   */
608
  public static PaymentMethod retrieve(
609
      String paymentMethod, Map<String, Object> params, RequestOptions options)
610
      throws StripeException {
611
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod));
1✔
612
    ApiRequest request =
1✔
613
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
614
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
1✔
615
  }
616

617
  /**
618
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
619
   * attached to a Customer, you should use <a
620
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
621
   * PaymentMethods</a>
622
   */
623
  public static PaymentMethod retrieve(
624
      String paymentMethod, PaymentMethodRetrieveParams params, RequestOptions options)
625
      throws StripeException {
626
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod));
×
627
    ApiResource.checkNullTypedParams(path, params);
×
628
    ApiRequest request =
×
629
        new ApiRequest(
630
            BaseAddress.API,
631
            ApiResource.RequestMethod.GET,
632
            path,
633
            ApiRequestParams.paramsToMap(params),
×
634
            options);
635
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
×
636
  }
637

638
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
639
  @Override
640
  public PaymentMethod update(Map<String, Object> params) throws StripeException {
641
    return update(params, (RequestOptions) null);
1✔
642
  }
643

644
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
645
  @Override
646
  public PaymentMethod update(Map<String, Object> params, RequestOptions options)
647
      throws StripeException {
648
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()));
1✔
649
    ApiRequest request =
1✔
650
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
651
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
652
  }
653

654
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
655
  public PaymentMethod update(PaymentMethodUpdateParams params) throws StripeException {
656
    return update(params, (RequestOptions) null);
1✔
657
  }
658

659
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
660
  public PaymentMethod update(PaymentMethodUpdateParams params, RequestOptions options)
661
      throws StripeException {
662
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()));
1✔
663
    ApiResource.checkNullTypedParams(path, params);
1✔
664
    ApiRequest request =
1✔
665
        new ApiRequest(
666
            BaseAddress.API,
667
            ApiResource.RequestMethod.POST,
668
            path,
669
            ApiRequestParams.paramsToMap(params),
1✔
670
            options);
671
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
672
  }
673

674
  /**
675
   * For more details about AcssDebit, please refer to the <a href="https://docs.stripe.com/api">API
676
   * Reference.</a>
677
   */
678
  @Getter
679
  @Setter
680
  @EqualsAndHashCode(callSuper = false)
681
  public static class AcssDebit extends StripeObject {
×
682
    /** Name of the bank associated with the bank account. */
683
    @SerializedName("bank_name")
684
    String bankName;
685

686
    /**
687
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
688
     * two bank accounts are the same.
689
     */
690
    @SerializedName("fingerprint")
691
    String fingerprint;
692

693
    /** Institution number of the bank account. */
694
    @SerializedName("institution_number")
695
    String institutionNumber;
696

697
    /** Last four digits of the bank account number. */
698
    @SerializedName("last4")
699
    String last4;
700

701
    /** Transit number of the bank account. */
702
    @SerializedName("transit_number")
703
    String transitNumber;
704
  }
705

706
  /**
707
   * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
708
   * Reference.</a>
709
   */
710
  @Getter
711
  @Setter
712
  @EqualsAndHashCode(callSuper = false)
713
  public static class Affirm extends StripeObject {}
×
714

715
  /**
716
   * For more details about AfterpayClearpay, please refer to the <a
717
   * href="https://docs.stripe.com/api">API Reference.</a>
718
   */
719
  @Getter
720
  @Setter
721
  @EqualsAndHashCode(callSuper = false)
722
  public static class AfterpayClearpay extends StripeObject {}
×
723

724
  /**
725
   * For more details about Alipay, please refer to the <a href="https://docs.stripe.com/api">API
726
   * Reference.</a>
727
   */
728
  @Getter
729
  @Setter
730
  @EqualsAndHashCode(callSuper = false)
731
  public static class Alipay extends StripeObject {}
×
732

733
  /**
734
   * For more details about Alma, please refer to the <a href="https://docs.stripe.com/api">API
735
   * Reference.</a>
736
   */
737
  @Getter
738
  @Setter
739
  @EqualsAndHashCode(callSuper = false)
NEW
740
  public static class Alma extends StripeObject {}
×
741

742
  /**
743
   * For more details about AmazonPay, please refer to the <a href="https://docs.stripe.com/api">API
744
   * Reference.</a>
745
   */
746
  @Getter
747
  @Setter
748
  @EqualsAndHashCode(callSuper = false)
749
  public static class AmazonPay extends StripeObject {}
×
750

751
  /**
752
   * For more details about AuBecsDebit, please refer to the <a
753
   * href="https://docs.stripe.com/api">API Reference.</a>
754
   */
755
  @Getter
756
  @Setter
757
  @EqualsAndHashCode(callSuper = false)
758
  public static class AuBecsDebit extends StripeObject {
×
759
    /** Six-digit number identifying bank and branch associated with this bank account. */
760
    @SerializedName("bsb_number")
761
    String bsbNumber;
762

763
    /**
764
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
765
     * two bank accounts are the same.
766
     */
767
    @SerializedName("fingerprint")
768
    String fingerprint;
769

770
    /** Last four digits of the bank account number. */
771
    @SerializedName("last4")
772
    String last4;
773
  }
774

775
  /**
776
   * For more details about BacsDebit, please refer to the <a href="https://docs.stripe.com/api">API
777
   * Reference.</a>
778
   */
779
  @Getter
780
  @Setter
781
  @EqualsAndHashCode(callSuper = false)
782
  public static class BacsDebit extends StripeObject {
×
783
    /**
784
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
785
     * two bank accounts are the same.
786
     */
787
    @SerializedName("fingerprint")
788
    String fingerprint;
789

790
    /** Last four digits of the bank account number. */
791
    @SerializedName("last4")
792
    String last4;
793

794
    /** Sort code of the bank account. (e.g., {@code 10-20-30}) */
795
    @SerializedName("sort_code")
796
    String sortCode;
797
  }
798

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

808
  /**
809
   * For more details about BillingDetails, please refer to the <a
810
   * href="https://docs.stripe.com/api">API Reference.</a>
811
   */
812
  @Getter
813
  @Setter
814
  @EqualsAndHashCode(callSuper = false)
815
  public static class BillingDetails extends StripeObject {
1✔
816
    /** Billing address. */
817
    @SerializedName("address")
818
    Address address;
819

820
    /** Email address. */
821
    @SerializedName("email")
822
    String email;
823

824
    /** Full name. */
825
    @SerializedName("name")
826
    String name;
827

828
    /** Billing phone number (including extension). */
829
    @SerializedName("phone")
830
    String phone;
831
  }
832

833
  /**
834
   * For more details about Blik, please refer to the <a href="https://docs.stripe.com/api">API
835
   * Reference.</a>
836
   */
837
  @Getter
838
  @Setter
839
  @EqualsAndHashCode(callSuper = false)
840
  public static class Blik extends StripeObject {}
×
841

842
  /**
843
   * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
844
   * Reference.</a>
845
   */
846
  @Getter
847
  @Setter
848
  @EqualsAndHashCode(callSuper = false)
849
  public static class Boleto extends StripeObject {
×
850
    /** Uniquely identifies the customer tax id (CNPJ or CPF). */
851
    @SerializedName("tax_id")
852
    String taxId;
853
  }
854

855
  /**
856
   * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
857
   * Reference.</a>
858
   */
859
  @Getter
860
  @Setter
861
  @EqualsAndHashCode(callSuper = false)
862
  public static class Card extends StripeObject {
1✔
863
    /**
864
     * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
865
     * jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
866
     */
867
    @SerializedName("brand")
868
    String brand;
869

870
    /** Checks on Card address and CVC if provided. */
871
    @SerializedName("checks")
872
    Checks checks;
873

874
    /**
875
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
876
     * a sense of the international breakdown of cards you've collected.
877
     */
878
    @SerializedName("country")
879
    String country;
880

881
    /**
882
     * A high-level description of the type of cards issued in this range. (For internal use only
883
     * and not typically available in standard API requests.)
884
     */
885
    @SerializedName("description")
886
    String description;
887

888
    /**
889
     * The brand to use when displaying the card, this accounts for customer's brand choice on
890
     * dual-branded cards. Can be {@code american_express}, {@code cartes_bancaires}, {@code
891
     * diners_club}, {@code discover}, {@code eftpos_australia}, {@code interac}, {@code jcb},
892
     * {@code mastercard}, {@code union_pay}, {@code visa}, or {@code other} and may contain more
893
     * values in the future.
894
     */
895
    @SerializedName("display_brand")
896
    String displayBrand;
897

898
    /** Two-digit number representing the card's expiration month. */
899
    @SerializedName("exp_month")
900
    Long expMonth;
901

902
    /** Four-digit number representing the card's expiration year. */
903
    @SerializedName("exp_year")
904
    Long expYear;
905

906
    /**
907
     * Uniquely identifies this particular card number. You can use this attribute to check whether
908
     * two customers who’ve signed up with you are using the same card number, for example. For
909
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
910
     * might be provided instead of the underlying card number.
911
     *
912
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
913
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
914
     */
915
    @SerializedName("fingerprint")
916
    String fingerprint;
917

918
    /**
919
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
920
     */
921
    @SerializedName("funding")
922
    String funding;
923

924
    /** Details of the original PaymentMethod that created this object. */
925
    @SerializedName("generated_from")
926
    GeneratedFrom generatedFrom;
927

928
    /**
929
     * Issuer identification number of the card. (For internal use only and not typically available
930
     * in standard API requests.)
931
     */
932
    @SerializedName("iin")
933
    String iin;
934

935
    /**
936
     * The name of the card's issuing bank. (For internal use only and not typically available in
937
     * standard API requests.)
938
     */
939
    @SerializedName("issuer")
940
    String issuer;
941

942
    /** The last four digits of the card. */
943
    @SerializedName("last4")
944
    String last4;
945

946
    /** Contains information about card networks that can be used to process the payment. */
947
    @SerializedName("networks")
948
    Networks networks;
949

950
    /** Contains details on how this Card may be used for 3D Secure authentication. */
951
    @SerializedName("three_d_secure_usage")
952
    ThreeDSecureUsage threeDSecureUsage;
953

954
    /** If this Card is part of a card wallet, this contains the details of the card wallet. */
955
    @SerializedName("wallet")
956
    Wallet wallet;
957

958
    /**
959
     * For more details about Checks, please refer to the <a href="https://docs.stripe.com/api">API
960
     * Reference.</a>
961
     */
962
    @Getter
963
    @Setter
964
    @EqualsAndHashCode(callSuper = false)
965
    public static class Checks extends StripeObject {
1✔
966
      /**
967
       * If a address line1 was provided, results of the check, one of {@code pass}, {@code fail},
968
       * {@code unavailable}, or {@code unchecked}.
969
       */
970
      @SerializedName("address_line1_check")
971
      String addressLine1Check;
972

973
      /**
974
       * If a address postal code was provided, results of the check, one of {@code pass}, {@code
975
       * fail}, {@code unavailable}, or {@code unchecked}.
976
       */
977
      @SerializedName("address_postal_code_check")
978
      String addressPostalCodeCheck;
979

980
      /**
981
       * If a CVC was provided, results of the check, one of {@code pass}, {@code fail}, {@code
982
       * unavailable}, or {@code unchecked}.
983
       */
984
      @SerializedName("cvc_check")
985
      String cvcCheck;
986
    }
987

988
    /**
989
     * For more details about GeneratedFrom, please refer to the <a
990
     * href="https://docs.stripe.com/api">API Reference.</a>
991
     */
992
    @Getter
993
    @Setter
994
    @EqualsAndHashCode(callSuper = false)
995
    public static class GeneratedFrom extends StripeObject {
×
996
      /** The charge that created this object. */
997
      @SerializedName("charge")
998
      String charge;
999

1000
      /** Transaction-specific details of the payment method used in the payment. */
1001
      @SerializedName("payment_method_details")
1002
      PaymentMethodDetails paymentMethodDetails;
1003

1004
      /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
1005
      @SerializedName("setup_attempt")
1006
      @Getter(lombok.AccessLevel.NONE)
1007
      @Setter(lombok.AccessLevel.NONE)
1008
      ExpandableField<SetupAttempt> setupAttempt;
1009

1010
      /** Get ID of expandable {@code setupAttempt} object. */
1011
      public String getSetupAttempt() {
1012
        return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
1013
      }
1014

1015
      public void setSetupAttempt(String id) {
1016
        this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
1017
      }
×
1018

1019
      /** Get expanded {@code setupAttempt}. */
1020
      public SetupAttempt getSetupAttemptObject() {
1021
        return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
1022
      }
1023

1024
      public void setSetupAttemptObject(SetupAttempt expandableObject) {
1025
        this.setupAttempt =
×
1026
            new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
1027
      }
×
1028

1029
      /**
1030
       * For more details about PaymentMethodDetails, please refer to the <a
1031
       * href="https://docs.stripe.com/api">API Reference.</a>
1032
       */
1033
      @Getter
1034
      @Setter
1035
      @EqualsAndHashCode(callSuper = false)
1036
      public static class PaymentMethodDetails extends StripeObject {
×
1037
        @SerializedName("card_present")
1038
        CardPresent cardPresent;
1039

1040
        /**
1041
         * The type of payment method transaction-specific details from the transaction that
1042
         * generated this {@code card} payment method. Always {@code card_present}.
1043
         */
1044
        @SerializedName("type")
1045
        String type;
1046

1047
        /**
1048
         * For more details about CardPresent, please refer to the <a
1049
         * href="https://docs.stripe.com/api">API Reference.</a>
1050
         */
1051
        @Getter
1052
        @Setter
1053
        @EqualsAndHashCode(callSuper = false)
1054
        public static class CardPresent extends StripeObject {
×
1055
          /** The authorized amount. */
1056
          @SerializedName("amount_authorized")
1057
          Long amountAuthorized;
1058

1059
          /**
1060
           * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
1061
           * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1062
           */
1063
          @SerializedName("brand")
1064
          String brand;
1065

1066
          /**
1067
           * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that
1068
           * identifies the specific program or product associated with a card.
1069
           */
1070
          @SerializedName("brand_product")
1071
          String brandProduct;
1072

1073
          /**
1074
           * When using manual capture, a future timestamp after which the charge will be
1075
           * automatically refunded if uncaptured.
1076
           */
1077
          @SerializedName("capture_before")
1078
          Long captureBefore;
1079

1080
          /**
1081
           * The cardholder name as read from the card, in <a
1082
           * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1083
           * alphanumeric characters, special characters and first/last name separator ({@code /}).
1084
           * In some cases, the cardholder name may not be available depending on how the issuer has
1085
           * configured the card. Cardholder name is typically not available on swipe or contactless
1086
           * payments, such as those made with Apple Pay and Google Pay.
1087
           */
1088
          @SerializedName("cardholder_name")
1089
          String cardholderName;
1090

1091
          /**
1092
           * Two-letter ISO code representing the country of the card. You could use this attribute
1093
           * to get a sense of the international breakdown of cards you've collected.
1094
           */
1095
          @SerializedName("country")
1096
          String country;
1097

1098
          /**
1099
           * A high-level description of the type of cards issued in this range. (For internal use
1100
           * only and not typically available in standard API requests.)
1101
           */
1102
          @SerializedName("description")
1103
          String description;
1104

1105
          /** Authorization response cryptogram. */
1106
          @SerializedName("emv_auth_data")
1107
          String emvAuthData;
1108

1109
          /** Two-digit number representing the card's expiration month. */
1110
          @SerializedName("exp_month")
1111
          Long expMonth;
1112

1113
          /** Four-digit number representing the card's expiration year. */
1114
          @SerializedName("exp_year")
1115
          Long expYear;
1116

1117
          /**
1118
           * Uniquely identifies this particular card number. You can use this attribute to check
1119
           * whether two customers who’ve signed up with you are using the same card number, for
1120
           * example. For payment methods that tokenize card information (Apple Pay, Google Pay),
1121
           * the tokenized number might be provided instead of the underlying card number.
1122
           *
1123
           * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1124
           * fingerprints for the same card---one for India and one for the rest of the world.</em>
1125
           */
1126
          @SerializedName("fingerprint")
1127
          String fingerprint;
1128

1129
          /**
1130
           * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
1131
           * unknown}.
1132
           */
1133
          @SerializedName("funding")
1134
          String funding;
1135

1136
          /**
1137
           * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be
1138
           * attached to a Customer for future transactions. Only present if it was possible to
1139
           * generate a card PaymentMethod.
1140
           */
1141
          @SerializedName("generated_card")
1142
          String generatedCard;
1143

1144
          /**
1145
           * Issuer identification number of the card. (For internal use only and not typically
1146
           * available in standard API requests.)
1147
           */
1148
          @SerializedName("iin")
1149
          String iin;
1150

1151
          /**
1152
           * Whether this <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> is
1153
           * eligible for incremental authorizations. Request support using <a
1154
           * 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>.
1155
           */
1156
          @SerializedName("incremental_authorization_supported")
1157
          Boolean incrementalAuthorizationSupported;
1158

1159
          /**
1160
           * The name of the card's issuing bank. (For internal use only and not typically available
1161
           * in standard API requests.)
1162
           */
1163
          @SerializedName("issuer")
1164
          String issuer;
1165

1166
          /** The last four digits of the card. */
1167
          @SerializedName("last4")
1168
          String last4;
1169

1170
          /**
1171
           * Identifies which network this charge was processed on. Can be {@code amex}, {@code
1172
           * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
1173
           * interac}, {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
1174
           * unknown}.
1175
           */
1176
          @SerializedName("network")
1177
          String network;
1178

1179
          /**
1180
           * This is used by the financial networks to identify a transaction. Visa calls this the
1181
           * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the
1182
           * Acquirer Reference Data. The first three digits of the Trace ID is the Financial
1183
           * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits
1184
           * represent the date (MM/DD). This field will be available for successful Visa,
1185
           * Mastercard, or American Express transactions and always null for other card brands.
1186
           */
1187
          @SerializedName("network_transaction_id")
1188
          String networkTransactionId;
1189

1190
          /** Details about payments collected offline. */
1191
          @SerializedName("offline")
1192
          Offline offline;
1193

1194
          /** Defines whether the authorized amount can be over-captured or not. */
1195
          @SerializedName("overcapture_supported")
1196
          Boolean overcaptureSupported;
1197

1198
          /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1199
          @SerializedName("preferred_locales")
1200
          List<String> preferredLocales;
1201

1202
          /**
1203
           * How card details were read in this transaction.
1204
           *
1205
           * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code
1206
           * contactless_magstripe_mode}, {@code magnetic_stripe_fallback}, or {@code
1207
           * magnetic_stripe_track2}.
1208
           */
1209
          @SerializedName("read_method")
1210
          String readMethod;
1211

1212
          /**
1213
           * A collection of fields required to be displayed on receipts. Only required for EMV
1214
           * transactions.
1215
           */
1216
          @SerializedName("receipt")
1217
          Receipt receipt;
1218

1219
          @SerializedName("wallet")
1220
          Wallet wallet;
1221

1222
          /**
1223
           * For more details about Offline, please refer to the <a
1224
           * href="https://docs.stripe.com/api">API Reference.</a>
1225
           */
1226
          @Getter
1227
          @Setter
1228
          @EqualsAndHashCode(callSuper = false)
1229
          public static class Offline extends StripeObject {
×
1230
            /** Time at which the payment was collected while offline. */
1231
            @SerializedName("stored_at")
1232
            Long storedAt;
1233

1234
            /**
1235
             * The method used to process this payment method offline. Only deferred is allowed.
1236
             *
1237
             * <p>Equal to {@code deferred}.
1238
             */
1239
            @SerializedName("type")
1240
            String type;
1241
          }
1242

1243
          /**
1244
           * For more details about Receipt, please refer to the <a
1245
           * href="https://docs.stripe.com/api">API Reference.</a>
1246
           */
1247
          @Getter
1248
          @Setter
1249
          @EqualsAndHashCode(callSuper = false)
1250
          public static class Receipt extends StripeObject {
×
1251
            /**
1252
             * The type of account being debited or credited
1253
             *
1254
             * <p>One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}.
1255
             */
1256
            @SerializedName("account_type")
1257
            String accountType;
1258

1259
            /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */
1260
            @SerializedName("application_cryptogram")
1261
            String applicationCryptogram;
1262

1263
            /** Mnenomic of the Application Identifier. */
1264
            @SerializedName("application_preferred_name")
1265
            String applicationPreferredName;
1266

1267
            /** Identifier for this transaction. */
1268
            @SerializedName("authorization_code")
1269
            String authorizationCode;
1270

1271
            /** EMV tag 8A. A code returned by the card issuer. */
1272
            @SerializedName("authorization_response_code")
1273
            String authorizationResponseCode;
1274

1275
            /**
1276
             * Describes the method used by the cardholder to verify ownership of the card. One of
1277
             * the following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin},
1278
             * {@code offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
1279
             */
1280
            @SerializedName("cardholder_verification_method")
1281
            String cardholderVerificationMethod;
1282

1283
            /**
1284
             * EMV tag 84. Similar to the application identifier stored on the integrated circuit
1285
             * chip.
1286
             */
1287
            @SerializedName("dedicated_file_name")
1288
            String dedicatedFileName;
1289

1290
            /** The outcome of a series of EMV functions performed by the card reader. */
1291
            @SerializedName("terminal_verification_results")
1292
            String terminalVerificationResults;
1293

1294
            /** An indication of various EMV functions performed during the transaction. */
1295
            @SerializedName("transaction_status_information")
1296
            String transactionStatusInformation;
1297
          }
1298

1299
          /**
1300
           * For more details about Wallet, please refer to the <a
1301
           * href="https://docs.stripe.com/api">API Reference.</a>
1302
           */
1303
          @Getter
1304
          @Setter
1305
          @EqualsAndHashCode(callSuper = false)
1306
          public static class Wallet extends StripeObject {
×
1307
            /**
1308
             * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1309
             * samsung_pay}, or {@code unknown}.
1310
             */
1311
            @SerializedName("type")
1312
            String type;
1313
          }
1314
        }
1315
      }
1316
    }
1317

1318
    /**
1319
     * For more details about Networks, please refer to the <a
1320
     * href="https://docs.stripe.com/api">API Reference.</a>
1321
     */
1322
    @Getter
1323
    @Setter
1324
    @EqualsAndHashCode(callSuper = false)
1325
    public static class Networks extends StripeObject {
1✔
1326
      /** All available networks for the card. */
1327
      @SerializedName("available")
1328
      List<String> available;
1329

1330
      /**
1331
       * The preferred network for co-branded cards. Can be {@code cartes_bancaires}, {@code
1332
       * mastercard}, {@code visa} or {@code invalid_preference} if requested network is not valid
1333
       * for the card.
1334
       */
1335
      @SerializedName("preferred")
1336
      String preferred;
1337
    }
1338

1339
    /**
1340
     * For more details about ThreeDSecureUsage, please refer to the <a
1341
     * href="https://docs.stripe.com/api">API Reference.</a>
1342
     */
1343
    @Getter
1344
    @Setter
1345
    @EqualsAndHashCode(callSuper = false)
1346
    public static class ThreeDSecureUsage extends StripeObject {
1✔
1347
      /** Whether 3D Secure is supported on this card. */
1348
      @SerializedName("supported")
1349
      Boolean supported;
1350
    }
1351

1352
    /**
1353
     * For more details about Wallet, please refer to the <a href="https://docs.stripe.com/api">API
1354
     * Reference.</a>
1355
     */
1356
    @Getter
1357
    @Setter
1358
    @EqualsAndHashCode(callSuper = false)
1359
    public static class Wallet extends StripeObject {
×
1360
      @SerializedName("amex_express_checkout")
1361
      AmexExpressCheckout amexExpressCheckout;
1362

1363
      @SerializedName("apple_pay")
1364
      ApplePay applePay;
1365

1366
      /** (For tokenized numbers only.) The last four digits of the device account number. */
1367
      @SerializedName("dynamic_last4")
1368
      String dynamicLast4;
1369

1370
      @SerializedName("google_pay")
1371
      GooglePay googlePay;
1372

1373
      @SerializedName("link")
1374
      Link link;
1375

1376
      @SerializedName("masterpass")
1377
      Masterpass masterpass;
1378

1379
      @SerializedName("samsung_pay")
1380
      SamsungPay samsungPay;
1381

1382
      /**
1383
       * The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
1384
       * {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
1385
       * {@code link}. An additional hash is included on the Wallet subhash with a name matching
1386
       * this value. It contains additional information specific to the card wallet type.
1387
       */
1388
      @SerializedName("type")
1389
      String type;
1390

1391
      @SerializedName("visa_checkout")
1392
      VisaCheckout visaCheckout;
1393

1394
      /**
1395
       * For more details about AmexExpressCheckout, please refer to the <a
1396
       * href="https://docs.stripe.com/api">API Reference.</a>
1397
       */
1398
      @Getter
1399
      @Setter
1400
      @EqualsAndHashCode(callSuper = false)
1401
      public static class AmexExpressCheckout extends StripeObject {}
×
1402

1403
      /**
1404
       * For more details about ApplePay, please refer to the <a
1405
       * href="https://docs.stripe.com/api">API Reference.</a>
1406
       */
1407
      @Getter
1408
      @Setter
1409
      @EqualsAndHashCode(callSuper = false)
1410
      public static class ApplePay extends StripeObject {}
×
1411

1412
      /**
1413
       * For more details about GooglePay, please refer to the <a
1414
       * href="https://docs.stripe.com/api">API Reference.</a>
1415
       */
1416
      @Getter
1417
      @Setter
1418
      @EqualsAndHashCode(callSuper = false)
1419
      public static class GooglePay extends StripeObject {}
×
1420

1421
      /**
1422
       * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
1423
       * Reference.</a>
1424
       */
1425
      @Getter
1426
      @Setter
1427
      @EqualsAndHashCode(callSuper = false)
1428
      public static class Link extends StripeObject {}
×
1429

1430
      /**
1431
       * For more details about Masterpass, please refer to the <a
1432
       * href="https://docs.stripe.com/api">API Reference.</a>
1433
       */
1434
      @Getter
1435
      @Setter
1436
      @EqualsAndHashCode(callSuper = false)
1437
      public static class Masterpass extends StripeObject {
×
1438
        /**
1439
         * Owner's verified billing address. Values are verified or provided by the wallet directly
1440
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1441
         */
1442
        @SerializedName("billing_address")
1443
        Address billingAddress;
1444

1445
        /**
1446
         * Owner's verified email. Values are verified or provided by the wallet directly (if
1447
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1448
         */
1449
        @SerializedName("email")
1450
        String email;
1451

1452
        /**
1453
         * Owner's verified full name. Values are verified or provided by the wallet directly (if
1454
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1455
         */
1456
        @SerializedName("name")
1457
        String name;
1458

1459
        /**
1460
         * Owner's verified shipping address. Values are verified or provided by the wallet directly
1461
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1462
         */
1463
        @SerializedName("shipping_address")
1464
        Address shippingAddress;
1465
      }
1466

1467
      /**
1468
       * For more details about SamsungPay, please refer to the <a
1469
       * href="https://docs.stripe.com/api">API Reference.</a>
1470
       */
1471
      @Getter
1472
      @Setter
1473
      @EqualsAndHashCode(callSuper = false)
1474
      public static class SamsungPay extends StripeObject {}
×
1475

1476
      /**
1477
       * For more details about VisaCheckout, please refer to the <a
1478
       * href="https://docs.stripe.com/api">API Reference.</a>
1479
       */
1480
      @Getter
1481
      @Setter
1482
      @EqualsAndHashCode(callSuper = false)
1483
      public static class VisaCheckout extends StripeObject {
×
1484
        /**
1485
         * Owner's verified billing address. Values are verified or provided by the wallet directly
1486
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1487
         */
1488
        @SerializedName("billing_address")
1489
        Address billingAddress;
1490

1491
        /**
1492
         * Owner's verified email. Values are verified or provided by the wallet directly (if
1493
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1494
         */
1495
        @SerializedName("email")
1496
        String email;
1497

1498
        /**
1499
         * Owner's verified full name. Values are verified or provided by the wallet directly (if
1500
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1501
         */
1502
        @SerializedName("name")
1503
        String name;
1504

1505
        /**
1506
         * Owner's verified shipping address. Values are verified or provided by the wallet directly
1507
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1508
         */
1509
        @SerializedName("shipping_address")
1510
        Address shippingAddress;
1511
      }
1512
    }
1513
  }
1514

1515
  /**
1516
   * For more details about CardPresent, please refer to the <a
1517
   * href="https://docs.stripe.com/api">API Reference.</a>
1518
   */
1519
  @Getter
1520
  @Setter
1521
  @EqualsAndHashCode(callSuper = false)
1522
  public static class CardPresent extends StripeObject {
×
1523
    /**
1524
     * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
1525
     * jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1526
     */
1527
    @SerializedName("brand")
1528
    String brand;
1529

1530
    /**
1531
     * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that identifies the
1532
     * specific program or product associated with a card.
1533
     */
1534
    @SerializedName("brand_product")
1535
    String brandProduct;
1536

1537
    /**
1538
     * The cardholder name as read from the card, in <a
1539
     * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1540
     * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1541
     * some cases, the cardholder name may not be available depending on how the issuer has
1542
     * configured the card. Cardholder name is typically not available on swipe or contactless
1543
     * payments, such as those made with Apple Pay and Google Pay.
1544
     */
1545
    @SerializedName("cardholder_name")
1546
    String cardholderName;
1547

1548
    /**
1549
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
1550
     * a sense of the international breakdown of cards you've collected.
1551
     */
1552
    @SerializedName("country")
1553
    String country;
1554

1555
    /**
1556
     * A high-level description of the type of cards issued in this range. (For internal use only
1557
     * and not typically available in standard API requests.)
1558
     */
1559
    @SerializedName("description")
1560
    String description;
1561

1562
    /** Two-digit number representing the card's expiration month. */
1563
    @SerializedName("exp_month")
1564
    Long expMonth;
1565

1566
    /** Four-digit number representing the card's expiration year. */
1567
    @SerializedName("exp_year")
1568
    Long expYear;
1569

1570
    /**
1571
     * Uniquely identifies this particular card number. You can use this attribute to check whether
1572
     * two customers who’ve signed up with you are using the same card number, for example. For
1573
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
1574
     * might be provided instead of the underlying card number.
1575
     *
1576
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1577
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
1578
     */
1579
    @SerializedName("fingerprint")
1580
    String fingerprint;
1581

1582
    /**
1583
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
1584
     */
1585
    @SerializedName("funding")
1586
    String funding;
1587

1588
    /**
1589
     * Issuer identification number of the card. (For internal use only and not typically available
1590
     * in standard API requests.)
1591
     */
1592
    @SerializedName("iin")
1593
    String iin;
1594

1595
    /**
1596
     * The name of the card's issuing bank. (For internal use only and not typically available in
1597
     * standard API requests.)
1598
     */
1599
    @SerializedName("issuer")
1600
    String issuer;
1601

1602
    /** The last four digits of the card. */
1603
    @SerializedName("last4")
1604
    String last4;
1605

1606
    /** Contains information about card networks that can be used to process the payment. */
1607
    @SerializedName("networks")
1608
    Networks networks;
1609

1610
    /** Details about payment methods collected offline. */
1611
    @SerializedName("offline")
1612
    Offline offline;
1613

1614
    /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1615
    @SerializedName("preferred_locales")
1616
    List<String> preferredLocales;
1617

1618
    /**
1619
     * How card details were read in this transaction.
1620
     *
1621
     * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1622
     * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1623
     */
1624
    @SerializedName("read_method")
1625
    String readMethod;
1626

1627
    @SerializedName("wallet")
1628
    Wallet wallet;
1629

1630
    /**
1631
     * For more details about Networks, please refer to the <a
1632
     * href="https://docs.stripe.com/api">API Reference.</a>
1633
     */
1634
    @Getter
1635
    @Setter
1636
    @EqualsAndHashCode(callSuper = false)
1637
    public static class Networks extends StripeObject {
×
1638
      /** All available networks for the card. */
1639
      @SerializedName("available")
1640
      List<String> available;
1641

1642
      /** The preferred network for the card. */
1643
      @SerializedName("preferred")
1644
      String preferred;
1645
    }
1646

1647
    /**
1648
     * For more details about Offline, please refer to the <a href="https://docs.stripe.com/api">API
1649
     * Reference.</a>
1650
     */
1651
    @Getter
1652
    @Setter
1653
    @EqualsAndHashCode(callSuper = false)
1654
    public static class Offline extends StripeObject {
×
1655
      /** Time at which the payment was collected while offline. */
1656
      @SerializedName("stored_at")
1657
      Long storedAt;
1658

1659
      /**
1660
       * The method used to process this payment method offline. Only deferred is allowed.
1661
       *
1662
       * <p>Equal to {@code deferred}.
1663
       */
1664
      @SerializedName("type")
1665
      String type;
1666
    }
1667

1668
    /**
1669
     * For more details about Wallet, please refer to the <a href="https://docs.stripe.com/api">API
1670
     * Reference.</a>
1671
     */
1672
    @Getter
1673
    @Setter
1674
    @EqualsAndHashCode(callSuper = false)
1675
    public static class Wallet extends StripeObject {
×
1676
      /**
1677
       * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1678
       * samsung_pay}, or {@code unknown}.
1679
       */
1680
      @SerializedName("type")
1681
      String type;
1682
    }
1683
  }
1684

1685
  /**
1686
   * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
1687
   * Reference.</a>
1688
   */
1689
  @Getter
1690
  @Setter
1691
  @EqualsAndHashCode(callSuper = false)
1692
  public static class Cashapp extends StripeObject {
×
1693
    /** A unique and immutable identifier assigned by Cash App to every buyer. */
1694
    @SerializedName("buyer_id")
1695
    String buyerId;
1696

1697
    /** A public identifier for buyers using Cash App. */
1698
    @SerializedName("cashtag")
1699
    String cashtag;
1700
  }
1701

1702
  /**
1703
   * For more details about CustomerBalance, please refer to the <a
1704
   * href="https://docs.stripe.com/api">API Reference.</a>
1705
   */
1706
  @Getter
1707
  @Setter
1708
  @EqualsAndHashCode(callSuper = false)
1709
  public static class CustomerBalance extends StripeObject {}
×
1710

1711
  /**
1712
   * For more details about Eps, please refer to the <a href="https://docs.stripe.com/api">API
1713
   * Reference.</a>
1714
   */
1715
  @Getter
1716
  @Setter
1717
  @EqualsAndHashCode(callSuper = false)
1718
  public static class Eps extends StripeObject {
×
1719
    /**
1720
     * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code
1721
     * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code
1722
     * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code
1723
     * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag},
1724
     * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code
1725
     * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code
1726
     * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark},
1727
     * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code
1728
     * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag},
1729
     * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code
1730
     * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code
1731
     * vr_bank_braunau}.
1732
     */
1733
    @SerializedName("bank")
1734
    String bank;
1735
  }
1736

1737
  /**
1738
   * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
1739
   * Reference.</a>
1740
   */
1741
  @Getter
1742
  @Setter
1743
  @EqualsAndHashCode(callSuper = false)
1744
  public static class Fpx extends StripeObject {
×
1745
    /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */
1746
    @SerializedName("account_holder_type")
1747
    String accountHolderType;
1748

1749
    /**
1750
     * The customer's bank, if provided. Can be one of {@code affin_bank}, {@code agrobank}, {@code
1751
     * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code
1752
     * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code kfh},
1753
     * {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code
1754
     * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code
1755
     * pb_enterprise}, or {@code bank_of_china}.
1756
     */
1757
    @SerializedName("bank")
1758
    String bank;
1759
  }
1760

1761
  /**
1762
   * For more details about Giropay, 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 Giropay extends StripeObject {}
×
1769

1770
  /**
1771
   * For more details about Gopay, please refer to the <a href="https://docs.stripe.com/api">API
1772
   * Reference.</a>
1773
   */
1774
  @Getter
1775
  @Setter
1776
  @EqualsAndHashCode(callSuper = false)
NEW
1777
  public static class Gopay extends StripeObject {}
×
1778

1779
  /**
1780
   * For more details about Grabpay, please refer to the <a href="https://docs.stripe.com/api">API
1781
   * Reference.</a>
1782
   */
1783
  @Getter
1784
  @Setter
1785
  @EqualsAndHashCode(callSuper = false)
1786
  public static class Grabpay extends StripeObject {}
×
1787

1788
  /**
1789
   * For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
1790
   * Reference.</a>
1791
   */
1792
  @Getter
1793
  @Setter
1794
  @EqualsAndHashCode(callSuper = false)
1795
  public static class Ideal extends StripeObject {
×
1796
    /**
1797
     * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code
1798
     * bunq}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code
1799
     * nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code
1800
     * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}.
1801
     */
1802
    @SerializedName("bank")
1803
    String bank;
1804

1805
    /**
1806
     * The Bank Identifier Code of the customer's bank, if the bank was provided.
1807
     *
1808
     * <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
1809
     * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
1810
     * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code
1811
     * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
1812
     */
1813
    @SerializedName("bic")
1814
    String bic;
1815
  }
1816

1817
  /**
1818
   * For more details about InteracPresent, please refer to the <a
1819
   * href="https://docs.stripe.com/api">API Reference.</a>
1820
   */
1821
  @Getter
1822
  @Setter
1823
  @EqualsAndHashCode(callSuper = false)
1824
  public static class InteracPresent extends StripeObject {
×
1825
    /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */
1826
    @SerializedName("brand")
1827
    String brand;
1828

1829
    /**
1830
     * The cardholder name as read from the card, in <a
1831
     * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1832
     * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1833
     * some cases, the cardholder name may not be available depending on how the issuer has
1834
     * configured the card. Cardholder name is typically not available on swipe or contactless
1835
     * payments, such as those made with Apple Pay and Google Pay.
1836
     */
1837
    @SerializedName("cardholder_name")
1838
    String cardholderName;
1839

1840
    /**
1841
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
1842
     * a sense of the international breakdown of cards you've collected.
1843
     */
1844
    @SerializedName("country")
1845
    String country;
1846

1847
    /**
1848
     * A high-level description of the type of cards issued in this range. (For internal use only
1849
     * and not typically available in standard API requests.)
1850
     */
1851
    @SerializedName("description")
1852
    String description;
1853

1854
    /** Two-digit number representing the card's expiration month. */
1855
    @SerializedName("exp_month")
1856
    Long expMonth;
1857

1858
    /** Four-digit number representing the card's expiration year. */
1859
    @SerializedName("exp_year")
1860
    Long expYear;
1861

1862
    /**
1863
     * Uniquely identifies this particular card number. You can use this attribute to check whether
1864
     * two customers who’ve signed up with you are using the same card number, for example. For
1865
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
1866
     * might be provided instead of the underlying card number.
1867
     *
1868
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1869
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
1870
     */
1871
    @SerializedName("fingerprint")
1872
    String fingerprint;
1873

1874
    /**
1875
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
1876
     */
1877
    @SerializedName("funding")
1878
    String funding;
1879

1880
    /**
1881
     * Issuer identification number of the card. (For internal use only and not typically available
1882
     * in standard API requests.)
1883
     */
1884
    @SerializedName("iin")
1885
    String iin;
1886

1887
    /**
1888
     * The name of the card's issuing bank. (For internal use only and not typically available in
1889
     * standard API requests.)
1890
     */
1891
    @SerializedName("issuer")
1892
    String issuer;
1893

1894
    /** The last four digits of the card. */
1895
    @SerializedName("last4")
1896
    String last4;
1897

1898
    /** Contains information about card networks that can be used to process the payment. */
1899
    @SerializedName("networks")
1900
    Networks networks;
1901

1902
    /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1903
    @SerializedName("preferred_locales")
1904
    List<String> preferredLocales;
1905

1906
    /**
1907
     * How card details were read in this transaction.
1908
     *
1909
     * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1910
     * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1911
     */
1912
    @SerializedName("read_method")
1913
    String readMethod;
1914

1915
    /**
1916
     * For more details about Networks, please refer to the <a
1917
     * href="https://docs.stripe.com/api">API Reference.</a>
1918
     */
1919
    @Getter
1920
    @Setter
1921
    @EqualsAndHashCode(callSuper = false)
1922
    public static class Networks extends StripeObject {
×
1923
      /** All available networks for the card. */
1924
      @SerializedName("available")
1925
      List<String> available;
1926

1927
      /** The preferred network for the card. */
1928
      @SerializedName("preferred")
1929
      String preferred;
1930
    }
1931
  }
1932

1933
  /**
1934
   * For more details about KakaoPay, please refer to the <a href="https://docs.stripe.com/api">API
1935
   * Reference.</a>
1936
   */
1937
  @Getter
1938
  @Setter
1939
  @EqualsAndHashCode(callSuper = false)
1940
  public static class KakaoPay extends StripeObject {}
×
1941

1942
  /**
1943
   * For more details about Klarna, please refer to the <a href="https://docs.stripe.com/api">API
1944
   * Reference.</a>
1945
   */
1946
  @Getter
1947
  @Setter
1948
  @EqualsAndHashCode(callSuper = false)
1949
  public static class Klarna extends StripeObject {
×
1950
    /** The customer's date of birth, if provided. */
1951
    @SerializedName("dob")
1952
    Dob dob;
1953

1954
    /**
1955
     * For more details about Dob, please refer to the <a href="https://docs.stripe.com/api">API
1956
     * Reference.</a>
1957
     */
1958
    @Getter
1959
    @Setter
1960
    @EqualsAndHashCode(callSuper = false)
1961
    public static class Dob extends StripeObject {
×
1962
      /** The day of birth, between 1 and 31. */
1963
      @SerializedName("day")
1964
      Long day;
1965

1966
      /** The month of birth, between 1 and 12. */
1967
      @SerializedName("month")
1968
      Long month;
1969

1970
      /** The four-digit year of birth. */
1971
      @SerializedName("year")
1972
      Long year;
1973
    }
1974
  }
1975

1976
  /**
1977
   * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
1978
   * Reference.</a>
1979
   */
1980
  @Getter
1981
  @Setter
1982
  @EqualsAndHashCode(callSuper = false)
1983
  public static class Konbini extends StripeObject {}
×
1984

1985
  /**
1986
   * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
1987
   * Reference.</a>
1988
   */
1989
  @Getter
1990
  @Setter
1991
  @EqualsAndHashCode(callSuper = false)
1992
  public static class KrCard extends StripeObject {
×
1993
    /**
1994
     * The local credit or debit card brand.
1995
     *
1996
     * <p>One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code
1997
     * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code
1998
     * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code
1999
     * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or {@code
2000
     * woori}.
2001
     */
2002
    @SerializedName("brand")
2003
    String brand;
2004

2005
    /** The last four digits of the card. This may not be present for American Express cards. */
2006
    @SerializedName("last4")
2007
    String last4;
2008
  }
2009

2010
  /**
2011
   * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
2012
   * Reference.</a>
2013
   */
2014
  @Getter
2015
  @Setter
2016
  @EqualsAndHashCode(callSuper = false)
2017
  public static class Link extends StripeObject {
×
2018
    /** Account owner's email address. */
2019
    @SerializedName("email")
2020
    String email;
2021

2022
    /** [Deprecated] This is a legacy parameter that no longer has any function. */
2023
    @SerializedName("persistent_token")
2024
    @Deprecated
2025
    String persistentToken;
2026
  }
2027

2028
  /**
2029
   * For more details about MbWay, please refer to the <a href="https://docs.stripe.com/api">API
2030
   * Reference.</a>
2031
   */
2032
  @Getter
2033
  @Setter
2034
  @EqualsAndHashCode(callSuper = false)
2035
  public static class MbWay extends StripeObject {}
×
2036

2037
  /**
2038
   * For more details about Mobilepay, please refer to the <a href="https://docs.stripe.com/api">API
2039
   * Reference.</a>
2040
   */
2041
  @Getter
2042
  @Setter
2043
  @EqualsAndHashCode(callSuper = false)
2044
  public static class Mobilepay extends StripeObject {}
×
2045

2046
  /**
2047
   * For more details about Multibanco, please refer to the <a
2048
   * href="https://docs.stripe.com/api">API Reference.</a>
2049
   */
2050
  @Getter
2051
  @Setter
2052
  @EqualsAndHashCode(callSuper = false)
2053
  public static class Multibanco extends StripeObject {}
×
2054

2055
  /**
2056
   * For more details about NaverPay, please refer to the <a href="https://docs.stripe.com/api">API
2057
   * Reference.</a>
2058
   */
2059
  @Getter
2060
  @Setter
2061
  @EqualsAndHashCode(callSuper = false)
2062
  public static class NaverPay extends StripeObject {
×
2063
    /**
2064
     * Whether to fund this transaction with Naver Pay points or a card.
2065
     *
2066
     * <p>One of {@code card}, or {@code points}.
2067
     */
2068
    @SerializedName("funding")
2069
    String funding;
2070
  }
2071

2072
  /**
2073
   * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
2074
   * Reference.</a>
2075
   */
2076
  @Getter
2077
  @Setter
2078
  @EqualsAndHashCode(callSuper = false)
2079
  public static class Oxxo extends StripeObject {}
×
2080

2081
  /**
2082
   * For more details about P24, please refer to the <a href="https://docs.stripe.com/api">API
2083
   * Reference.</a>
2084
   */
2085
  @Getter
2086
  @Setter
2087
  @EqualsAndHashCode(callSuper = false)
2088
  public static class P24 extends StripeObject {
×
2089
    /**
2090
     * The customer's bank, if provided.
2091
     *
2092
     * <p>One of {@code alior_bank}, {@code bank_millennium}, {@code bank_nowy_bfg_sa}, {@code
2093
     * bank_pekao_sa}, {@code banki_spbdzielcze}, {@code blik}, {@code bnp_paribas}, {@code boz},
2094
     * {@code citi_handlowy}, {@code credit_agricole}, {@code envelobank}, {@code
2095
     * etransfer_pocztowy24}, {@code getin_bank}, {@code ideabank}, {@code ing}, {@code inteligo},
2096
     * {@code mbank_mtransfer}, {@code nest_przelew}, {@code noble_pay}, {@code pbac_z_ipko}, {@code
2097
     * plus_bank}, {@code santander_przelew24}, {@code tmobile_usbugi_bankowe}, {@code toyota_bank},
2098
     * {@code velobank}, or {@code volkswagen_bank}.
2099
     */
2100
    @SerializedName("bank")
2101
    String bank;
2102
  }
2103

2104
  /**
2105
   * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
2106
   * Reference.</a>
2107
   */
2108
  @Getter
2109
  @Setter
2110
  @EqualsAndHashCode(callSuper = false)
2111
  public static class Payco extends StripeObject {}
×
2112

2113
  /**
2114
   * For more details about Paynow, please refer to the <a href="https://docs.stripe.com/api">API
2115
   * Reference.</a>
2116
   */
2117
  @Getter
2118
  @Setter
2119
  @EqualsAndHashCode(callSuper = false)
2120
  public static class Paynow extends StripeObject {}
×
2121

2122
  /**
2123
   * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
2124
   * Reference.</a>
2125
   */
2126
  @Getter
2127
  @Setter
2128
  @EqualsAndHashCode(callSuper = false)
2129
  public static class Paypal extends StripeObject {
×
2130
    /**
2131
     * Uniquely identifies this particular PayPal account. You can use this attribute to check
2132
     * whether two PayPal accounts are the same.
2133
     */
2134
    @SerializedName("fingerprint")
2135
    String fingerprint;
2136

2137
    /**
2138
     * Owner's email. Values are provided by PayPal directly (if supported) at the time of
2139
     * authorization or settlement. They cannot be set or mutated.
2140
     */
2141
    @SerializedName("payer_email")
2142
    String payerEmail;
2143

2144
    /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */
2145
    @SerializedName("payer_id")
2146
    String payerId;
2147

2148
    /**
2149
     * Owner's verified email. Values are verified or provided by PayPal directly (if supported) at
2150
     * the time of authorization or settlement. They cannot be set or mutated.
2151
     */
2152
    @SerializedName("verified_email")
2153
    String verifiedEmail;
2154
  }
2155

2156
  /**
2157
   * For more details about Payto, 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 Payto extends StripeObject {
×
2164
    /** Bank-State-Branch number of the bank account. */
2165
    @SerializedName("bsb_number")
2166
    String bsbNumber;
2167

2168
    /** Last four digits of the bank account number. */
2169
    @SerializedName("last4")
2170
    String last4;
2171

2172
    /** The PayID alias for the bank account. */
2173
    @SerializedName("pay_id")
2174
    String payId;
2175
  }
2176

2177
  /**
2178
   * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
2179
   * Reference.</a>
2180
   */
2181
  @Getter
2182
  @Setter
2183
  @EqualsAndHashCode(callSuper = false)
2184
  public static class Pix extends StripeObject {}
×
2185

2186
  /**
2187
   * For more details about Promptpay, please refer to the <a href="https://docs.stripe.com/api">API
2188
   * Reference.</a>
2189
   */
2190
  @Getter
2191
  @Setter
2192
  @EqualsAndHashCode(callSuper = false)
2193
  public static class Promptpay extends StripeObject {}
×
2194

2195
  /**
2196
   * For more details about Qris, please refer to the <a href="https://docs.stripe.com/api">API
2197
   * Reference.</a>
2198
   */
2199
  @Getter
2200
  @Setter
2201
  @EqualsAndHashCode(callSuper = false)
NEW
2202
  public static class Qris extends StripeObject {}
×
2203

2204
  /**
2205
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
2206
   * Session</a> for more information.
2207
   */
2208
  @Getter
2209
  @Setter
2210
  @EqualsAndHashCode(callSuper = false)
2211
  public static class RadarOptions extends StripeObject {
×
2212
    /**
2213
     * A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot of
2214
     * the browser metadata and device details that help Radar make more accurate predictions on
2215
     * your payments.
2216
     */
2217
    @SerializedName("session")
2218
    String session;
2219
  }
2220

2221
  /**
2222
   * For more details about Rechnung, please refer to the <a href="https://docs.stripe.com/api">API
2223
   * Reference.</a>
2224
   */
2225
  @Getter
2226
  @Setter
2227
  @EqualsAndHashCode(callSuper = false)
2228
  public static class Rechnung extends StripeObject {
×
2229
    @SerializedName("dob")
2230
    Dob dob;
2231

2232
    /**
2233
     * For more details about Dob, please refer to the <a href="https://docs.stripe.com/api">API
2234
     * Reference.</a>
2235
     */
2236
    @Getter
2237
    @Setter
2238
    @EqualsAndHashCode(callSuper = false)
2239
    public static class Dob extends StripeObject {
×
2240
      /** The day of birth, between 1 and 31. */
2241
      @SerializedName("day")
2242
      Long day;
2243

2244
      /** The month of birth, between 1 and 12. */
2245
      @SerializedName("month")
2246
      Long month;
2247

2248
      /** The four-digit year of birth. */
2249
      @SerializedName("year")
2250
      Long year;
2251
    }
2252
  }
2253

2254
  /**
2255
   * For more details about RevolutPay, please refer to the <a
2256
   * href="https://docs.stripe.com/api">API Reference.</a>
2257
   */
2258
  @Getter
2259
  @Setter
2260
  @EqualsAndHashCode(callSuper = false)
2261
  public static class RevolutPay extends StripeObject {}
×
2262

2263
  /**
2264
   * For more details about SamsungPay, please refer to the <a
2265
   * href="https://docs.stripe.com/api">API Reference.</a>
2266
   */
2267
  @Getter
2268
  @Setter
2269
  @EqualsAndHashCode(callSuper = false)
2270
  public static class SamsungPay extends StripeObject {}
×
2271

2272
  /**
2273
   * For more details about SepaDebit, please refer to the <a href="https://docs.stripe.com/api">API
2274
   * Reference.</a>
2275
   */
2276
  @Getter
2277
  @Setter
2278
  @EqualsAndHashCode(callSuper = false)
2279
  public static class SepaDebit extends StripeObject {
×
2280
    /** Bank code of bank associated with the bank account. */
2281
    @SerializedName("bank_code")
2282
    String bankCode;
2283

2284
    /** Branch code of bank associated with the bank account. */
2285
    @SerializedName("branch_code")
2286
    String branchCode;
2287

2288
    /** Two-letter ISO code representing the country the bank account is located in. */
2289
    @SerializedName("country")
2290
    String country;
2291

2292
    /**
2293
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
2294
     * two bank accounts are the same.
2295
     */
2296
    @SerializedName("fingerprint")
2297
    String fingerprint;
2298

2299
    /** Information about the object that generated this PaymentMethod. */
2300
    @SerializedName("generated_from")
2301
    GeneratedFrom generatedFrom;
2302

2303
    /** Last four characters of the IBAN. */
2304
    @SerializedName("last4")
2305
    String last4;
2306

2307
    /**
2308
     * For more details about GeneratedFrom, please refer to the <a
2309
     * href="https://docs.stripe.com/api">API Reference.</a>
2310
     */
2311
    @Getter
2312
    @Setter
2313
    @EqualsAndHashCode(callSuper = false)
2314
    public static class GeneratedFrom extends StripeObject {
×
2315
      /** The ID of the Charge that generated this PaymentMethod, if any. */
2316
      @SerializedName("charge")
2317
      @Getter(lombok.AccessLevel.NONE)
2318
      @Setter(lombok.AccessLevel.NONE)
2319
      ExpandableField<Charge> charge;
2320

2321
      /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
2322
      @SerializedName("setup_attempt")
2323
      @Getter(lombok.AccessLevel.NONE)
2324
      @Setter(lombok.AccessLevel.NONE)
2325
      ExpandableField<SetupAttempt> setupAttempt;
2326

2327
      /** Get ID of expandable {@code charge} object. */
2328
      public String getCharge() {
2329
        return (this.charge != null) ? this.charge.getId() : null;
×
2330
      }
2331

2332
      public void setCharge(String id) {
2333
        this.charge = ApiResource.setExpandableFieldId(id, this.charge);
×
2334
      }
×
2335

2336
      /** Get expanded {@code charge}. */
2337
      public Charge getChargeObject() {
2338
        return (this.charge != null) ? this.charge.getExpanded() : null;
×
2339
      }
2340

2341
      public void setChargeObject(Charge expandableObject) {
2342
        this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
2343
      }
×
2344

2345
      /** Get ID of expandable {@code setupAttempt} object. */
2346
      public String getSetupAttempt() {
2347
        return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
2348
      }
2349

2350
      public void setSetupAttempt(String id) {
2351
        this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
2352
      }
×
2353

2354
      /** Get expanded {@code setupAttempt}. */
2355
      public SetupAttempt getSetupAttemptObject() {
2356
        return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
2357
      }
2358

2359
      public void setSetupAttemptObject(SetupAttempt expandableObject) {
2360
        this.setupAttempt =
×
2361
            new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
2362
      }
×
2363
    }
2364
  }
2365

2366
  /**
2367
   * For more details about Shopeepay, please refer to the <a href="https://docs.stripe.com/api">API
2368
   * Reference.</a>
2369
   */
2370
  @Getter
2371
  @Setter
2372
  @EqualsAndHashCode(callSuper = false)
NEW
2373
  public static class Shopeepay extends StripeObject {}
×
2374

2375
  /**
2376
   * For more details about Sofort, please refer to the <a href="https://docs.stripe.com/api">API
2377
   * Reference.</a>
2378
   */
2379
  @Getter
2380
  @Setter
2381
  @EqualsAndHashCode(callSuper = false)
2382
  public static class Sofort extends StripeObject {
×
2383
    /** Two-letter ISO code representing the country the bank account is located in. */
2384
    @SerializedName("country")
2385
    String country;
2386
  }
2387

2388
  /**
2389
   * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
2390
   * Reference.</a>
2391
   */
2392
  @Getter
2393
  @Setter
2394
  @EqualsAndHashCode(callSuper = false)
2395
  public static class Swish extends StripeObject {}
×
2396

2397
  /**
2398
   * For more details about Twint, please refer to the <a href="https://docs.stripe.com/api">API
2399
   * Reference.</a>
2400
   */
2401
  @Getter
2402
  @Setter
2403
  @EqualsAndHashCode(callSuper = false)
2404
  public static class Twint extends StripeObject {}
×
2405

2406
  /**
2407
   * For more details about UsBankAccount, please refer to the <a
2408
   * href="https://docs.stripe.com/api">API Reference.</a>
2409
   */
2410
  @Getter
2411
  @Setter
2412
  @EqualsAndHashCode(callSuper = false)
2413
  public static class UsBankAccount extends StripeObject {
×
2414
    /**
2415
     * Account holder type: individual or company.
2416
     *
2417
     * <p>One of {@code company}, or {@code individual}.
2418
     */
2419
    @SerializedName("account_holder_type")
2420
    String accountHolderType;
2421

2422
    /** Account number of the bank account. */
2423
    @SerializedName("account_number")
2424
    String accountNumber;
2425

2426
    /**
2427
     * Account type: checkings or savings. Defaults to checking if omitted.
2428
     *
2429
     * <p>One of {@code checking}, or {@code savings}.
2430
     */
2431
    @SerializedName("account_type")
2432
    String accountType;
2433

2434
    /** The name of the bank. */
2435
    @SerializedName("bank_name")
2436
    String bankName;
2437

2438
    /** The ID of the Financial Connections Account used to create the payment method. */
2439
    @SerializedName("financial_connections_account")
2440
    String financialConnectionsAccount;
2441

2442
    /**
2443
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
2444
     * two bank accounts are the same.
2445
     */
2446
    @SerializedName("fingerprint")
2447
    String fingerprint;
2448

2449
    /** Last four digits of the bank account number. */
2450
    @SerializedName("last4")
2451
    String last4;
2452

2453
    /** Contains information about US bank account networks that can be used. */
2454
    @SerializedName("networks")
2455
    Networks networks;
2456

2457
    /** Routing number of the bank account. */
2458
    @SerializedName("routing_number")
2459
    String routingNumber;
2460

2461
    /** Contains information about the future reusability of this PaymentMethod. */
2462
    @SerializedName("status_details")
2463
    StatusDetails statusDetails;
2464

2465
    /**
2466
     * For more details about Networks, please refer to the <a
2467
     * href="https://docs.stripe.com/api">API Reference.</a>
2468
     */
2469
    @Getter
2470
    @Setter
2471
    @EqualsAndHashCode(callSuper = false)
2472
    public static class Networks extends StripeObject {
×
2473
      /** The preferred network. */
2474
      @SerializedName("preferred")
2475
      String preferred;
2476

2477
      /** All supported networks. */
2478
      @SerializedName("supported")
2479
      List<String> supported;
2480
    }
2481

2482
    /**
2483
     * For more details about StatusDetails, please refer to the <a
2484
     * href="https://docs.stripe.com/api">API Reference.</a>
2485
     */
2486
    @Getter
2487
    @Setter
2488
    @EqualsAndHashCode(callSuper = false)
2489
    public static class StatusDetails extends StripeObject {
×
2490
      @SerializedName("blocked")
2491
      Blocked blocked;
2492

2493
      /**
2494
       * For more details about Blocked, please refer to the <a
2495
       * href="https://docs.stripe.com/api">API Reference.</a>
2496
       */
2497
      @Getter
2498
      @Setter
2499
      @EqualsAndHashCode(callSuper = false)
2500
      public static class Blocked extends StripeObject {
×
2501
        /**
2502
         * The ACH network code that resulted in this block.
2503
         *
2504
         * <p>One of {@code R02}, {@code R03}, {@code R04}, {@code R05}, {@code R07}, {@code R08},
2505
         * {@code R10}, {@code R11}, {@code R16}, {@code R20}, {@code R29}, or {@code R31}.
2506
         */
2507
        @SerializedName("network_code")
2508
        String networkCode;
2509

2510
        /**
2511
         * The reason why this PaymentMethod's fingerprint has been blocked
2512
         *
2513
         * <p>One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code
2514
         * bank_account_invalid_details}, {@code bank_account_restricted}, {@code
2515
         * bank_account_unusable}, or {@code debit_not_authorized}.
2516
         */
2517
        @SerializedName("reason")
2518
        String reason;
2519
      }
2520
    }
2521
  }
2522

2523
  /**
2524
   * For more details about WechatPay, please refer to the <a href="https://docs.stripe.com/api">API
2525
   * Reference.</a>
2526
   */
2527
  @Getter
2528
  @Setter
2529
  @EqualsAndHashCode(callSuper = false)
2530
  public static class WechatPay extends StripeObject {}
×
2531

2532
  /**
2533
   * For more details about Zip, please refer to the <a href="https://docs.stripe.com/api">API
2534
   * Reference.</a>
2535
   */
2536
  @Getter
2537
  @Setter
2538
  @EqualsAndHashCode(callSuper = false)
2539
  public static class Zip extends StripeObject {}
×
2540

2541
  @Override
2542
  public void setResponseGetter(StripeResponseGetter responseGetter) {
2543
    super.setResponseGetter(responseGetter);
1✔
2544
    trySetResponseGetter(acssDebit, responseGetter);
1✔
2545
    trySetResponseGetter(affirm, responseGetter);
1✔
2546
    trySetResponseGetter(afterpayClearpay, responseGetter);
1✔
2547
    trySetResponseGetter(alipay, responseGetter);
1✔
2548
    trySetResponseGetter(alma, responseGetter);
1✔
2549
    trySetResponseGetter(amazonPay, responseGetter);
1✔
2550
    trySetResponseGetter(auBecsDebit, responseGetter);
1✔
2551
    trySetResponseGetter(bacsDebit, responseGetter);
1✔
2552
    trySetResponseGetter(bancontact, responseGetter);
1✔
2553
    trySetResponseGetter(billingDetails, responseGetter);
1✔
2554
    trySetResponseGetter(blik, responseGetter);
1✔
2555
    trySetResponseGetter(boleto, responseGetter);
1✔
2556
    trySetResponseGetter(card, responseGetter);
1✔
2557
    trySetResponseGetter(cardPresent, responseGetter);
1✔
2558
    trySetResponseGetter(cashapp, responseGetter);
1✔
2559
    trySetResponseGetter(customer, responseGetter);
1✔
2560
    trySetResponseGetter(customerBalance, responseGetter);
1✔
2561
    trySetResponseGetter(eps, responseGetter);
1✔
2562
    trySetResponseGetter(fpx, responseGetter);
1✔
2563
    trySetResponseGetter(giropay, responseGetter);
1✔
2564
    trySetResponseGetter(gopay, responseGetter);
1✔
2565
    trySetResponseGetter(grabpay, responseGetter);
1✔
2566
    trySetResponseGetter(ideal, responseGetter);
1✔
2567
    trySetResponseGetter(interacPresent, responseGetter);
1✔
2568
    trySetResponseGetter(kakaoPay, responseGetter);
1✔
2569
    trySetResponseGetter(klarna, responseGetter);
1✔
2570
    trySetResponseGetter(konbini, responseGetter);
1✔
2571
    trySetResponseGetter(krCard, responseGetter);
1✔
2572
    trySetResponseGetter(link, responseGetter);
1✔
2573
    trySetResponseGetter(mbWay, responseGetter);
1✔
2574
    trySetResponseGetter(mobilepay, responseGetter);
1✔
2575
    trySetResponseGetter(multibanco, responseGetter);
1✔
2576
    trySetResponseGetter(naverPay, responseGetter);
1✔
2577
    trySetResponseGetter(oxxo, responseGetter);
1✔
2578
    trySetResponseGetter(p24, responseGetter);
1✔
2579
    trySetResponseGetter(payco, responseGetter);
1✔
2580
    trySetResponseGetter(paynow, responseGetter);
1✔
2581
    trySetResponseGetter(paypal, responseGetter);
1✔
2582
    trySetResponseGetter(payto, responseGetter);
1✔
2583
    trySetResponseGetter(pix, responseGetter);
1✔
2584
    trySetResponseGetter(promptpay, responseGetter);
1✔
2585
    trySetResponseGetter(qris, responseGetter);
1✔
2586
    trySetResponseGetter(radarOptions, responseGetter);
1✔
2587
    trySetResponseGetter(rechnung, responseGetter);
1✔
2588
    trySetResponseGetter(revolutPay, responseGetter);
1✔
2589
    trySetResponseGetter(samsungPay, responseGetter);
1✔
2590
    trySetResponseGetter(sepaDebit, responseGetter);
1✔
2591
    trySetResponseGetter(shopeepay, responseGetter);
1✔
2592
    trySetResponseGetter(sofort, responseGetter);
1✔
2593
    trySetResponseGetter(swish, responseGetter);
1✔
2594
    trySetResponseGetter(twint, responseGetter);
1✔
2595
    trySetResponseGetter(usBankAccount, responseGetter);
1✔
2596
    trySetResponseGetter(wechatPay, responseGetter);
1✔
2597
    trySetResponseGetter(zip, responseGetter);
1✔
2598
  }
1✔
2599
}
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