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

stripe / stripe-java / #16517

08 Oct 2024 06:27PM UTC coverage: 12.74% (-0.2%) from 12.899%
#16517

push

github

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

Update generated code for beta

53 of 2404 new or added lines in 50 files covered. (2.2%)

91 existing lines in 27 files now uncovered.

18753 of 147196 relevant lines covered (12.74%)

0.13 hits per line

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

49.77
/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("amazon_pay")
60
  AmazonPay amazonPay;
61

62
  @SerializedName("au_becs_debit")
63
  AuBecsDebit auBecsDebit;
64

65
  @SerializedName("bacs_debit")
66
  BacsDebit bacsDebit;
67

68
  @SerializedName("bancontact")
69
  Bancontact bancontact;
70

71
  @SerializedName("billing_details")
72
  BillingDetails billingDetails;
73

74
  @SerializedName("blik")
75
  Blik blik;
76

77
  @SerializedName("boleto")
78
  Boleto boleto;
79

80
  @SerializedName("card")
81
  Card card;
82

83
  @SerializedName("card_present")
84
  CardPresent cardPresent;
85

86
  @SerializedName("cashapp")
87
  Cashapp cashapp;
88

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

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

102
  @SerializedName("customer_balance")
103
  CustomerBalance customerBalance;
104

105
  @SerializedName("eps")
106
  Eps eps;
107

108
  @SerializedName("fpx")
109
  Fpx fpx;
110

111
  @SerializedName("giropay")
112
  Giropay giropay;
113

114
  @SerializedName("grabpay")
115
  Grabpay grabpay;
116

117
  /** Unique identifier for the object. */
118
  @Getter(onMethod_ = {@Override})
119
  @SerializedName("id")
120
  String id;
121

122
  @SerializedName("ideal")
123
  Ideal ideal;
124

125
  @SerializedName("interac_present")
126
  InteracPresent interacPresent;
127

128
  @SerializedName("kakao_pay")
129
  KakaoPay kakaoPay;
130

131
  @SerializedName("klarna")
132
  Klarna klarna;
133

134
  @SerializedName("konbini")
135
  Konbini konbini;
136

137
  @SerializedName("kr_card")
138
  KrCard krCard;
139

140
  @SerializedName("link")
141
  Link link;
142

143
  /**
144
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
145
   * object exists in test mode.
146
   */
147
  @SerializedName("livemode")
148
  Boolean livemode;
149

150
  @SerializedName("mb_way")
151
  MbWay mbWay;
152

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

162
  @SerializedName("mobilepay")
163
  Mobilepay mobilepay;
164

165
  @SerializedName("multibanco")
166
  Multibanco multibanco;
167

168
  @SerializedName("naver_pay")
169
  NaverPay naverPay;
170

171
  /**
172
   * String representing the object's type. Objects of the same type share the same value.
173
   *
174
   * <p>Equal to {@code payment_method}.
175
   */
176
  @SerializedName("object")
177
  String object;
178

179
  @SerializedName("oxxo")
180
  Oxxo oxxo;
181

182
  @SerializedName("p24")
183
  P24 p24;
184

185
  @SerializedName("payco")
186
  Payco payco;
187

188
  @SerializedName("paynow")
189
  Paynow paynow;
190

191
  @SerializedName("paypal")
192
  Paypal paypal;
193

194
  @SerializedName("payto")
195
  Payto payto;
196

197
  @SerializedName("pix")
198
  Pix pix;
199

200
  @SerializedName("promptpay")
201
  Promptpay promptpay;
202

203
  /**
204
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
205
   * Session</a> for more information.
206
   */
207
  @SerializedName("radar_options")
208
  RadarOptions radarOptions;
209

210
  @SerializedName("rechnung")
211
  Rechnung rechnung;
212

213
  @SerializedName("revolut_pay")
214
  RevolutPay revolutPay;
215

216
  @SerializedName("samsung_pay")
217
  SamsungPay samsungPay;
218

219
  @SerializedName("sepa_debit")
220
  SepaDebit sepaDebit;
221

222
  @SerializedName("sofort")
223
  Sofort sofort;
224

225
  @SerializedName("swish")
226
  Swish swish;
227

228
  @SerializedName("twint")
229
  Twint twint;
230

231
  /**
232
   * The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name
233
   * matching this value. It contains additional information specific to the PaymentMethod type.
234
   *
235
   * <p>One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code
236
   * amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact}, {@code blik},
237
   * {@code boleto}, {@code card}, {@code card_present}, {@code cashapp}, {@code customer_balance},
238
   * {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code
239
   * interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code
240
   * link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code oxxo},
241
   * {@code p24}, {@code payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code
242
   * promptpay}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit},
243
   * {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or
244
   * {@code zip}.
245
   */
246
  @SerializedName("type")
247
  String type;
248

249
  @SerializedName("us_bank_account")
250
  UsBankAccount usBankAccount;
251

252
  @SerializedName("wechat_pay")
253
  WechatPay wechatPay;
254

255
  @SerializedName("zip")
256
  Zip zip;
257

258
  /** Get ID of expandable {@code customer} object. */
259
  public String getCustomer() {
260
    return (this.customer != null) ? this.customer.getId() : null;
×
261
  }
262

263
  public void setCustomer(String id) {
264
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
265
  }
×
266

267
  /** Get expanded {@code customer}. */
268
  public Customer getCustomerObject() {
269
    return (this.customer != null) ? this.customer.getExpanded() : null;
×
270
  }
271

272
  public void setCustomerObject(Customer expandableObject) {
273
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
274
  }
×
275

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

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

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

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

376
  /**
377
   * Creates a PaymentMethod object. Read the <a
378
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
379
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
380
   *
381
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
382
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
383
   * payment immediately or the <a
384
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
385
   * method details ahead of a future payment.
386
   */
387
  public static PaymentMethod create(Map<String, Object> params) throws StripeException {
388
    return create(params, (RequestOptions) null);
1✔
389
  }
390

391
  /**
392
   * Creates a PaymentMethod object. Read the <a
393
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
394
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
395
   *
396
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
397
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
398
   * payment immediately or the <a
399
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
400
   * method details ahead of a future payment.
401
   */
402
  public static PaymentMethod create(Map<String, Object> params, RequestOptions options)
403
      throws StripeException {
404
    String path = "/v1/payment_methods";
1✔
405
    ApiRequest request =
1✔
406
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
407
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
1✔
408
  }
409

410
  /**
411
   * Creates a PaymentMethod object. Read the <a
412
   * href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
413
   * reference</a> to learn how to create PaymentMethods via Stripe.js.
414
   *
415
   * <p>Instead of creating a PaymentMethod directly, we recommend using the <a
416
   * href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
417
   * payment immediately or the <a
418
   * href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
419
   * method details ahead of a future payment.
420
   */
421
  public static PaymentMethod create(PaymentMethodCreateParams params) throws StripeException {
422
    return create(params, (RequestOptions) null);
×
423
  }
424

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

450
  /**
451
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
452
   * longer be used for a payment or re-attached to a Customer.
453
   */
454
  public PaymentMethod detach() throws StripeException {
455
    return detach((Map<String, Object>) null, (RequestOptions) null);
1✔
456
  }
457

458
  /**
459
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
460
   * longer be used for a payment or re-attached to a Customer.
461
   */
462
  public PaymentMethod detach(RequestOptions options) throws StripeException {
463
    return detach((Map<String, Object>) null, options);
×
464
  }
465

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

474
  /**
475
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
476
   * longer be used for a payment or re-attached to a Customer.
477
   */
478
  public PaymentMethod detach(Map<String, Object> params, RequestOptions options)
479
      throws StripeException {
480
    String path =
1✔
481
        String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()));
1✔
482
    ApiRequest request =
1✔
483
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
484
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
485
  }
486

487
  /**
488
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
489
   * longer be used for a payment or re-attached to a Customer.
490
   */
491
  public PaymentMethod detach(PaymentMethodDetachParams params) throws StripeException {
492
    return detach(params, (RequestOptions) null);
1✔
493
  }
494

495
  /**
496
   * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no
497
   * longer be used for a payment or re-attached to a Customer.
498
   */
499
  public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions options)
500
      throws StripeException {
501
    String path =
1✔
502
        String.format("/v1/payment_methods/%s/detach", ApiResource.urlEncodeId(this.getId()));
1✔
503
    ApiResource.checkNullTypedParams(path, params);
1✔
504
    ApiRequest request =
1✔
505
        new ApiRequest(
506
            BaseAddress.API,
507
            ApiResource.RequestMethod.POST,
508
            path,
509
            ApiRequestParams.paramsToMap(params),
1✔
510
            options);
511
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
512
  }
513

514
  /**
515
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
516
   * attached to a Customer for payments, you should use the <a
517
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
518
   * PaymentMethods</a> API instead.
519
   */
520
  public static PaymentMethodCollection list(Map<String, Object> params) throws StripeException {
521
    return list(params, (RequestOptions) null);
1✔
522
  }
523

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

538
  /**
539
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
540
   * attached to a Customer for payments, you should use the <a
541
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
542
   * PaymentMethods</a> API instead.
543
   */
544
  public static PaymentMethodCollection list(PaymentMethodListParams params)
545
      throws StripeException {
546
    return list(params, (RequestOptions) null);
1✔
547
  }
548

549
  /**
550
   * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods
551
   * attached to a Customer for payments, you should use the <a
552
   * href="https://stripe.com/docs/api/payment_methods/customer_list">List a Customer’s
553
   * PaymentMethods</a> API instead.
554
   */
555
  public static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options)
556
      throws StripeException {
557
    String path = "/v1/payment_methods";
1✔
558
    ApiResource.checkNullTypedParams(path, params);
1✔
559
    ApiRequest request =
1✔
560
        new ApiRequest(
561
            BaseAddress.API,
562
            ApiResource.RequestMethod.GET,
563
            path,
564
            ApiRequestParams.paramsToMap(params),
1✔
565
            options);
566
    return getGlobalResponseGetter().request(request, PaymentMethodCollection.class);
1✔
567
  }
568

569
  /**
570
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
571
   * attached to a Customer, you should use <a
572
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
573
   * PaymentMethods</a>
574
   */
575
  public static PaymentMethod retrieve(String paymentMethod) throws StripeException {
576
    return retrieve(paymentMethod, (Map<String, Object>) null, (RequestOptions) null);
1✔
577
  }
578

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

590
  /**
591
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
592
   * attached to a Customer, you should use <a
593
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
594
   * PaymentMethods</a>
595
   */
596
  public static PaymentMethod retrieve(
597
      String paymentMethod, Map<String, Object> params, RequestOptions options)
598
      throws StripeException {
599
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod));
1✔
600
    ApiRequest request =
1✔
601
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
602
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
1✔
603
  }
604

605
  /**
606
   * Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method
607
   * attached to a Customer, you should use <a
608
   * href="https://stripe.com/docs/api/payment_methods/customer">Retrieve a Customer’s
609
   * PaymentMethods</a>
610
   */
611
  public static PaymentMethod retrieve(
612
      String paymentMethod, PaymentMethodRetrieveParams params, RequestOptions options)
613
      throws StripeException {
614
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(paymentMethod));
×
615
    ApiResource.checkNullTypedParams(path, params);
×
616
    ApiRequest request =
×
617
        new ApiRequest(
618
            BaseAddress.API,
619
            ApiResource.RequestMethod.GET,
620
            path,
621
            ApiRequestParams.paramsToMap(params),
×
622
            options);
623
    return getGlobalResponseGetter().request(request, PaymentMethod.class);
×
624
  }
625

626
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
627
  @Override
628
  public PaymentMethod update(Map<String, Object> params) throws StripeException {
629
    return update(params, (RequestOptions) null);
1✔
630
  }
631

632
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
633
  @Override
634
  public PaymentMethod update(Map<String, Object> params, RequestOptions options)
635
      throws StripeException {
636
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()));
1✔
637
    ApiRequest request =
1✔
638
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
639
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
640
  }
641

642
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
643
  public PaymentMethod update(PaymentMethodUpdateParams params) throws StripeException {
644
    return update(params, (RequestOptions) null);
1✔
645
  }
646

647
  /** Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. */
648
  public PaymentMethod update(PaymentMethodUpdateParams params, RequestOptions options)
649
      throws StripeException {
650
    String path = String.format("/v1/payment_methods/%s", ApiResource.urlEncodeId(this.getId()));
1✔
651
    ApiResource.checkNullTypedParams(path, params);
1✔
652
    ApiRequest request =
1✔
653
        new ApiRequest(
654
            BaseAddress.API,
655
            ApiResource.RequestMethod.POST,
656
            path,
657
            ApiRequestParams.paramsToMap(params),
1✔
658
            options);
659
    return getResponseGetter().request(request, PaymentMethod.class);
1✔
660
  }
661

662
  @Getter
663
  @Setter
664
  @EqualsAndHashCode(callSuper = false)
665
  public static class AcssDebit extends StripeObject {
×
666
    /** Name of the bank associated with the bank account. */
667
    @SerializedName("bank_name")
668
    String bankName;
669

670
    /**
671
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
672
     * two bank accounts are the same.
673
     */
674
    @SerializedName("fingerprint")
675
    String fingerprint;
676

677
    /** Institution number of the bank account. */
678
    @SerializedName("institution_number")
679
    String institutionNumber;
680

681
    /** Last four digits of the bank account number. */
682
    @SerializedName("last4")
683
    String last4;
684

685
    /** Transit number of the bank account. */
686
    @SerializedName("transit_number")
687
    String transitNumber;
688
  }
689

690
  @Getter
691
  @Setter
692
  @EqualsAndHashCode(callSuper = false)
693
  public static class Affirm extends StripeObject {}
×
694

695
  @Getter
696
  @Setter
697
  @EqualsAndHashCode(callSuper = false)
698
  public static class AfterpayClearpay extends StripeObject {}
×
699

700
  @Getter
701
  @Setter
702
  @EqualsAndHashCode(callSuper = false)
703
  public static class Alipay extends StripeObject {}
×
704

705
  @Getter
706
  @Setter
707
  @EqualsAndHashCode(callSuper = false)
708
  public static class AmazonPay extends StripeObject {}
×
709

710
  @Getter
711
  @Setter
712
  @EqualsAndHashCode(callSuper = false)
713
  public static class AuBecsDebit extends StripeObject {
×
714
    /** Six-digit number identifying bank and branch associated with this bank account. */
715
    @SerializedName("bsb_number")
716
    String bsbNumber;
717

718
    /**
719
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
720
     * two bank accounts are the same.
721
     */
722
    @SerializedName("fingerprint")
723
    String fingerprint;
724

725
    /** Last four digits of the bank account number. */
726
    @SerializedName("last4")
727
    String last4;
728
  }
729

730
  @Getter
731
  @Setter
732
  @EqualsAndHashCode(callSuper = false)
733
  public static class BacsDebit extends StripeObject {
×
734
    /**
735
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
736
     * two bank accounts are the same.
737
     */
738
    @SerializedName("fingerprint")
739
    String fingerprint;
740

741
    /** Last four digits of the bank account number. */
742
    @SerializedName("last4")
743
    String last4;
744

745
    /** Sort code of the bank account. (e.g., {@code 10-20-30}) */
746
    @SerializedName("sort_code")
747
    String sortCode;
748
  }
749

750
  @Getter
751
  @Setter
752
  @EqualsAndHashCode(callSuper = false)
753
  public static class Bancontact extends StripeObject {}
×
754

755
  @Getter
756
  @Setter
757
  @EqualsAndHashCode(callSuper = false)
758
  public static class BillingDetails extends StripeObject {
1✔
759
    /** Billing address. */
760
    @SerializedName("address")
761
    Address address;
762

763
    /** Email address. */
764
    @SerializedName("email")
765
    String email;
766

767
    /** Full name. */
768
    @SerializedName("name")
769
    String name;
770

771
    /** Billing phone number (including extension). */
772
    @SerializedName("phone")
773
    String phone;
774
  }
775

776
  @Getter
777
  @Setter
778
  @EqualsAndHashCode(callSuper = false)
779
  public static class Blik extends StripeObject {}
×
780

781
  @Getter
782
  @Setter
783
  @EqualsAndHashCode(callSuper = false)
784
  public static class Boleto extends StripeObject {
×
785
    /** Uniquely identifies the customer tax id (CNPJ or CPF). */
786
    @SerializedName("tax_id")
787
    String taxId;
788
  }
789

790
  @Getter
791
  @Setter
792
  @EqualsAndHashCode(callSuper = false)
793
  public static class Card extends StripeObject {
1✔
794
    /**
795
     * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
796
     * jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
797
     */
798
    @SerializedName("brand")
799
    String brand;
800

801
    /** Checks on Card address and CVC if provided. */
802
    @SerializedName("checks")
803
    Checks checks;
804

805
    /**
806
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
807
     * a sense of the international breakdown of cards you've collected.
808
     */
809
    @SerializedName("country")
810
    String country;
811

812
    /**
813
     * A high-level description of the type of cards issued in this range. (For internal use only
814
     * and not typically available in standard API requests.)
815
     */
816
    @SerializedName("description")
817
    String description;
818

819
    /**
820
     * The brand to use when displaying the card, this accounts for customer's brand choice on
821
     * dual-branded cards. Can be {@code american_express}, {@code cartes_bancaires}, {@code
822
     * diners_club}, {@code discover}, {@code eftpos_australia}, {@code interac}, {@code jcb},
823
     * {@code mastercard}, {@code union_pay}, {@code visa}, or {@code other} and may contain more
824
     * values in the future.
825
     */
826
    @SerializedName("display_brand")
827
    String displayBrand;
828

829
    /** Two-digit number representing the card's expiration month. */
830
    @SerializedName("exp_month")
831
    Long expMonth;
832

833
    /** Four-digit number representing the card's expiration year. */
834
    @SerializedName("exp_year")
835
    Long expYear;
836

837
    /**
838
     * Uniquely identifies this particular card number. You can use this attribute to check whether
839
     * two customers who’ve signed up with you are using the same card number, for example. For
840
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
841
     * might be provided instead of the underlying card number.
842
     *
843
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
844
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
845
     */
846
    @SerializedName("fingerprint")
847
    String fingerprint;
848

849
    /**
850
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
851
     */
852
    @SerializedName("funding")
853
    String funding;
854

855
    /** Details of the original PaymentMethod that created this object. */
856
    @SerializedName("generated_from")
857
    GeneratedFrom generatedFrom;
858

859
    /**
860
     * Issuer identification number of the card. (For internal use only and not typically available
861
     * in standard API requests.)
862
     */
863
    @SerializedName("iin")
864
    String iin;
865

866
    /**
867
     * The name of the card's issuing bank. (For internal use only and not typically available in
868
     * standard API requests.)
869
     */
870
    @SerializedName("issuer")
871
    String issuer;
872

873
    /** The last four digits of the card. */
874
    @SerializedName("last4")
875
    String last4;
876

877
    /** Contains information about card networks that can be used to process the payment. */
878
    @SerializedName("networks")
879
    Networks networks;
880

881
    /** Contains details on how this Card may be used for 3D Secure authentication. */
882
    @SerializedName("three_d_secure_usage")
883
    ThreeDSecureUsage threeDSecureUsage;
884

885
    /** If this Card is part of a card wallet, this contains the details of the card wallet. */
886
    @SerializedName("wallet")
887
    Wallet wallet;
888

889
    @Getter
890
    @Setter
891
    @EqualsAndHashCode(callSuper = false)
892
    public static class Checks extends StripeObject {
1✔
893
      /**
894
       * If a address line1 was provided, results of the check, one of {@code pass}, {@code fail},
895
       * {@code unavailable}, or {@code unchecked}.
896
       */
897
      @SerializedName("address_line1_check")
898
      String addressLine1Check;
899

900
      /**
901
       * If a address postal code was provided, results of the check, one of {@code pass}, {@code
902
       * fail}, {@code unavailable}, or {@code unchecked}.
903
       */
904
      @SerializedName("address_postal_code_check")
905
      String addressPostalCodeCheck;
906

907
      /**
908
       * If a CVC was provided, results of the check, one of {@code pass}, {@code fail}, {@code
909
       * unavailable}, or {@code unchecked}.
910
       */
911
      @SerializedName("cvc_check")
912
      String cvcCheck;
913
    }
914

915
    @Getter
916
    @Setter
917
    @EqualsAndHashCode(callSuper = false)
918
    public static class GeneratedFrom extends StripeObject {
×
919
      /** The charge that created this object. */
920
      @SerializedName("charge")
921
      String charge;
922

923
      /** Transaction-specific details of the payment method used in the payment. */
924
      @SerializedName("payment_method_details")
925
      PaymentMethodDetails paymentMethodDetails;
926

927
      /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
928
      @SerializedName("setup_attempt")
929
      @Getter(lombok.AccessLevel.NONE)
930
      @Setter(lombok.AccessLevel.NONE)
931
      ExpandableField<SetupAttempt> setupAttempt;
932

933
      /** Get ID of expandable {@code setupAttempt} object. */
934
      public String getSetupAttempt() {
935
        return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
936
      }
937

938
      public void setSetupAttempt(String id) {
939
        this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
940
      }
×
941

942
      /** Get expanded {@code setupAttempt}. */
943
      public SetupAttempt getSetupAttemptObject() {
944
        return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
945
      }
946

947
      public void setSetupAttemptObject(SetupAttempt expandableObject) {
948
        this.setupAttempt =
×
949
            new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
950
      }
×
951

952
      @Getter
953
      @Setter
954
      @EqualsAndHashCode(callSuper = false)
955
      public static class PaymentMethodDetails extends StripeObject {
×
956
        @SerializedName("card_present")
957
        CardPresent cardPresent;
958

959
        /**
960
         * The type of payment method transaction-specific details from the transaction that
961
         * generated this {@code card} payment method. Always {@code card_present}.
962
         */
963
        @SerializedName("type")
964
        String type;
965

966
        @Getter
967
        @Setter
968
        @EqualsAndHashCode(callSuper = false)
969
        public static class CardPresent extends StripeObject {
×
970
          /** The authorized amount. */
971
          @SerializedName("amount_authorized")
972
          Long amountAuthorized;
973

974
          /**
975
           * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
976
           * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
977
           */
978
          @SerializedName("brand")
979
          String brand;
980

981
          /**
982
           * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that
983
           * identifies the specific program or product associated with a card.
984
           */
985
          @SerializedName("brand_product")
986
          String brandProduct;
987

988
          /**
989
           * When using manual capture, a future timestamp after which the charge will be
990
           * automatically refunded if uncaptured.
991
           */
992
          @SerializedName("capture_before")
993
          Long captureBefore;
994

995
          /**
996
           * The cardholder name as read from the card, in <a
997
           * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
998
           * alphanumeric characters, special characters and first/last name separator ({@code /}).
999
           * In some cases, the cardholder name may not be available depending on how the issuer has
1000
           * configured the card. Cardholder name is typically not available on swipe or contactless
1001
           * payments, such as those made with Apple Pay and Google Pay.
1002
           */
1003
          @SerializedName("cardholder_name")
1004
          String cardholderName;
1005

1006
          /**
1007
           * Two-letter ISO code representing the country of the card. You could use this attribute
1008
           * to get a sense of the international breakdown of cards you've collected.
1009
           */
1010
          @SerializedName("country")
1011
          String country;
1012

1013
          /**
1014
           * A high-level description of the type of cards issued in this range. (For internal use
1015
           * only and not typically available in standard API requests.)
1016
           */
1017
          @SerializedName("description")
1018
          String description;
1019

1020
          /** Authorization response cryptogram. */
1021
          @SerializedName("emv_auth_data")
1022
          String emvAuthData;
1023

1024
          /** Two-digit number representing the card's expiration month. */
1025
          @SerializedName("exp_month")
1026
          Long expMonth;
1027

1028
          /** Four-digit number representing the card's expiration year. */
1029
          @SerializedName("exp_year")
1030
          Long expYear;
1031

1032
          /**
1033
           * Uniquely identifies this particular card number. You can use this attribute to check
1034
           * whether two customers who’ve signed up with you are using the same card number, for
1035
           * example. For payment methods that tokenize card information (Apple Pay, Google Pay),
1036
           * the tokenized number might be provided instead of the underlying card number.
1037
           *
1038
           * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1039
           * fingerprints for the same card---one for India and one for the rest of the world.</em>
1040
           */
1041
          @SerializedName("fingerprint")
1042
          String fingerprint;
1043

1044
          /**
1045
           * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code
1046
           * unknown}.
1047
           */
1048
          @SerializedName("funding")
1049
          String funding;
1050

1051
          /**
1052
           * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be
1053
           * attached to a Customer for future transactions. Only present if it was possible to
1054
           * generate a card PaymentMethod.
1055
           */
1056
          @SerializedName("generated_card")
1057
          String generatedCard;
1058

1059
          /**
1060
           * Issuer identification number of the card. (For internal use only and not typically
1061
           * available in standard API requests.)
1062
           */
1063
          @SerializedName("iin")
1064
          String iin;
1065

1066
          /**
1067
           * Whether this <a href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> is
1068
           * eligible for incremental authorizations. Request support using <a
1069
           * 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>.
1070
           */
1071
          @SerializedName("incremental_authorization_supported")
1072
          Boolean incrementalAuthorizationSupported;
1073

1074
          /**
1075
           * The name of the card's issuing bank. (For internal use only and not typically available
1076
           * in standard API requests.)
1077
           */
1078
          @SerializedName("issuer")
1079
          String issuer;
1080

1081
          /** The last four digits of the card. */
1082
          @SerializedName("last4")
1083
          String last4;
1084

1085
          /**
1086
           * Identifies which network this charge was processed on. Can be {@code amex}, {@code
1087
           * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
1088
           * interac}, {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
1089
           * unknown}.
1090
           */
1091
          @SerializedName("network")
1092
          String network;
1093

1094
          /**
1095
           * This is used by the financial networks to identify a transaction. Visa calls this the
1096
           * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the
1097
           * Acquirer Reference Data. The first three digits of the Trace ID is the Financial
1098
           * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits
1099
           * represent the date (MM/DD). This field will be available for successful Visa,
1100
           * Mastercard, or American Express transactions and always null for other card brands.
1101
           */
1102
          @SerializedName("network_transaction_id")
1103
          String networkTransactionId;
1104

1105
          /** Details about payments collected offline. */
1106
          @SerializedName("offline")
1107
          Offline offline;
1108

1109
          /** Defines whether the authorized amount can be over-captured or not. */
1110
          @SerializedName("overcapture_supported")
1111
          Boolean overcaptureSupported;
1112

1113
          /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1114
          @SerializedName("preferred_locales")
1115
          List<String> preferredLocales;
1116

1117
          /**
1118
           * How card details were read in this transaction.
1119
           *
1120
           * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code
1121
           * contactless_magstripe_mode}, {@code magnetic_stripe_fallback}, or {@code
1122
           * magnetic_stripe_track2}.
1123
           */
1124
          @SerializedName("read_method")
1125
          String readMethod;
1126

1127
          /**
1128
           * A collection of fields required to be displayed on receipts. Only required for EMV
1129
           * transactions.
1130
           */
1131
          @SerializedName("receipt")
1132
          Receipt receipt;
1133

1134
          @SerializedName("wallet")
1135
          Wallet wallet;
1136

1137
          @Getter
1138
          @Setter
1139
          @EqualsAndHashCode(callSuper = false)
1140
          public static class Offline extends StripeObject {
×
1141
            /** Time at which the payment was collected while offline. */
1142
            @SerializedName("stored_at")
1143
            Long storedAt;
1144

1145
            /**
1146
             * The method used to process this payment method offline. Only deferred is allowed.
1147
             *
1148
             * <p>Equal to {@code deferred}.
1149
             */
1150
            @SerializedName("type")
1151
            String type;
1152
          }
1153

1154
          @Getter
1155
          @Setter
1156
          @EqualsAndHashCode(callSuper = false)
1157
          public static class Receipt extends StripeObject {
×
1158
            /**
1159
             * The type of account being debited or credited
1160
             *
1161
             * <p>One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}.
1162
             */
1163
            @SerializedName("account_type")
1164
            String accountType;
1165

1166
            /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */
1167
            @SerializedName("application_cryptogram")
1168
            String applicationCryptogram;
1169

1170
            /** Mnenomic of the Application Identifier. */
1171
            @SerializedName("application_preferred_name")
1172
            String applicationPreferredName;
1173

1174
            /** Identifier for this transaction. */
1175
            @SerializedName("authorization_code")
1176
            String authorizationCode;
1177

1178
            /** EMV tag 8A. A code returned by the card issuer. */
1179
            @SerializedName("authorization_response_code")
1180
            String authorizationResponseCode;
1181

1182
            /**
1183
             * Describes the method used by the cardholder to verify ownership of the card. One of
1184
             * the following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin},
1185
             * {@code offline_pin_and_signature}, {@code online_pin}, or {@code signature}.
1186
             */
1187
            @SerializedName("cardholder_verification_method")
1188
            String cardholderVerificationMethod;
1189

1190
            /**
1191
             * EMV tag 84. Similar to the application identifier stored on the integrated circuit
1192
             * chip.
1193
             */
1194
            @SerializedName("dedicated_file_name")
1195
            String dedicatedFileName;
1196

1197
            /** The outcome of a series of EMV functions performed by the card reader. */
1198
            @SerializedName("terminal_verification_results")
1199
            String terminalVerificationResults;
1200

1201
            /** An indication of various EMV functions performed during the transaction. */
1202
            @SerializedName("transaction_status_information")
1203
            String transactionStatusInformation;
1204
          }
1205

1206
          @Getter
1207
          @Setter
1208
          @EqualsAndHashCode(callSuper = false)
1209
          public static class Wallet extends StripeObject {
×
1210
            /**
1211
             * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1212
             * samsung_pay}, or {@code unknown}.
1213
             */
1214
            @SerializedName("type")
1215
            String type;
1216
          }
1217
        }
1218
      }
1219
    }
1220

1221
    @Getter
1222
    @Setter
1223
    @EqualsAndHashCode(callSuper = false)
1224
    public static class Networks extends StripeObject {
1✔
1225
      /** All available networks for the card. */
1226
      @SerializedName("available")
1227
      List<String> available;
1228

1229
      /**
1230
       * The preferred network for co-branded cards. Can be {@code cartes_bancaires}, {@code
1231
       * mastercard}, {@code visa} or {@code invalid_preference} if requested network is not valid
1232
       * for the card.
1233
       */
1234
      @SerializedName("preferred")
1235
      String preferred;
1236
    }
1237

1238
    @Getter
1239
    @Setter
1240
    @EqualsAndHashCode(callSuper = false)
1241
    public static class ThreeDSecureUsage extends StripeObject {
1✔
1242
      /** Whether 3D Secure is supported on this card. */
1243
      @SerializedName("supported")
1244
      Boolean supported;
1245
    }
1246

1247
    @Getter
1248
    @Setter
1249
    @EqualsAndHashCode(callSuper = false)
1250
    public static class Wallet extends StripeObject {
×
1251
      @SerializedName("amex_express_checkout")
1252
      AmexExpressCheckout amexExpressCheckout;
1253

1254
      @SerializedName("apple_pay")
1255
      ApplePay applePay;
1256

1257
      /** (For tokenized numbers only.) The last four digits of the device account number. */
1258
      @SerializedName("dynamic_last4")
1259
      String dynamicLast4;
1260

1261
      @SerializedName("google_pay")
1262
      GooglePay googlePay;
1263

1264
      @SerializedName("link")
1265
      Link link;
1266

1267
      @SerializedName("masterpass")
1268
      Masterpass masterpass;
1269

1270
      @SerializedName("samsung_pay")
1271
      SamsungPay samsungPay;
1272

1273
      /**
1274
       * The type of the card wallet, one of {@code amex_express_checkout}, {@code apple_pay},
1275
       * {@code google_pay}, {@code masterpass}, {@code samsung_pay}, {@code visa_checkout}, or
1276
       * {@code link}. An additional hash is included on the Wallet subhash with a name matching
1277
       * this value. It contains additional information specific to the card wallet type.
1278
       */
1279
      @SerializedName("type")
1280
      String type;
1281

1282
      @SerializedName("visa_checkout")
1283
      VisaCheckout visaCheckout;
1284

1285
      @Getter
1286
      @Setter
1287
      @EqualsAndHashCode(callSuper = false)
1288
      public static class AmexExpressCheckout extends StripeObject {}
×
1289

1290
      @Getter
1291
      @Setter
1292
      @EqualsAndHashCode(callSuper = false)
1293
      public static class ApplePay extends StripeObject {}
×
1294

1295
      @Getter
1296
      @Setter
1297
      @EqualsAndHashCode(callSuper = false)
1298
      public static class GooglePay extends StripeObject {}
×
1299

1300
      @Getter
1301
      @Setter
1302
      @EqualsAndHashCode(callSuper = false)
1303
      public static class Link extends StripeObject {}
×
1304

1305
      @Getter
1306
      @Setter
1307
      @EqualsAndHashCode(callSuper = false)
1308
      public static class Masterpass extends StripeObject {
×
1309
        /**
1310
         * Owner's verified billing address. Values are verified or provided by the wallet directly
1311
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1312
         */
1313
        @SerializedName("billing_address")
1314
        Address billingAddress;
1315

1316
        /**
1317
         * Owner's verified email. Values are verified or provided by the wallet directly (if
1318
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1319
         */
1320
        @SerializedName("email")
1321
        String email;
1322

1323
        /**
1324
         * Owner's verified full name. Values are verified or provided by the wallet directly (if
1325
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1326
         */
1327
        @SerializedName("name")
1328
        String name;
1329

1330
        /**
1331
         * Owner's verified shipping address. Values are verified or provided by the wallet directly
1332
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1333
         */
1334
        @SerializedName("shipping_address")
1335
        Address shippingAddress;
1336
      }
1337

1338
      @Getter
1339
      @Setter
1340
      @EqualsAndHashCode(callSuper = false)
1341
      public static class SamsungPay extends StripeObject {}
×
1342

1343
      @Getter
1344
      @Setter
1345
      @EqualsAndHashCode(callSuper = false)
1346
      public static class VisaCheckout extends StripeObject {
×
1347
        /**
1348
         * Owner's verified billing address. Values are verified or provided by the wallet directly
1349
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1350
         */
1351
        @SerializedName("billing_address")
1352
        Address billingAddress;
1353

1354
        /**
1355
         * Owner's verified email. Values are verified or provided by the wallet directly (if
1356
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1357
         */
1358
        @SerializedName("email")
1359
        String email;
1360

1361
        /**
1362
         * Owner's verified full name. Values are verified or provided by the wallet directly (if
1363
         * supported) at the time of authorization or settlement. They cannot be set or mutated.
1364
         */
1365
        @SerializedName("name")
1366
        String name;
1367

1368
        /**
1369
         * Owner's verified shipping address. Values are verified or provided by the wallet directly
1370
         * (if supported) at the time of authorization or settlement. They cannot be set or mutated.
1371
         */
1372
        @SerializedName("shipping_address")
1373
        Address shippingAddress;
1374
      }
1375
    }
1376
  }
1377

1378
  @Getter
1379
  @Setter
1380
  @EqualsAndHashCode(callSuper = false)
1381
  public static class CardPresent extends StripeObject {
×
1382
    /**
1383
     * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
1384
     * jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1385
     */
1386
    @SerializedName("brand")
1387
    String brand;
1388

1389
    /**
1390
     * The <a href="https://stripe.com/docs/card-product-codes">product code</a> that identifies the
1391
     * specific program or product associated with a card.
1392
     */
1393
    @SerializedName("brand_product")
1394
    String brandProduct;
1395

1396
    /**
1397
     * The cardholder name as read from the card, in <a
1398
     * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1399
     * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1400
     * some cases, the cardholder name may not be available depending on how the issuer has
1401
     * configured the card. Cardholder name is typically not available on swipe or contactless
1402
     * payments, such as those made with Apple Pay and Google Pay.
1403
     */
1404
    @SerializedName("cardholder_name")
1405
    String cardholderName;
1406

1407
    /**
1408
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
1409
     * a sense of the international breakdown of cards you've collected.
1410
     */
1411
    @SerializedName("country")
1412
    String country;
1413

1414
    /**
1415
     * A high-level description of the type of cards issued in this range. (For internal use only
1416
     * and not typically available in standard API requests.)
1417
     */
1418
    @SerializedName("description")
1419
    String description;
1420

1421
    /** Two-digit number representing the card's expiration month. */
1422
    @SerializedName("exp_month")
1423
    Long expMonth;
1424

1425
    /** Four-digit number representing the card's expiration year. */
1426
    @SerializedName("exp_year")
1427
    Long expYear;
1428

1429
    /**
1430
     * Uniquely identifies this particular card number. You can use this attribute to check whether
1431
     * two customers who’ve signed up with you are using the same card number, for example. For
1432
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
1433
     * might be provided instead of the underlying card number.
1434
     *
1435
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1436
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
1437
     */
1438
    @SerializedName("fingerprint")
1439
    String fingerprint;
1440

1441
    /**
1442
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
1443
     */
1444
    @SerializedName("funding")
1445
    String funding;
1446

1447
    /**
1448
     * Issuer identification number of the card. (For internal use only and not typically available
1449
     * in standard API requests.)
1450
     */
1451
    @SerializedName("iin")
1452
    String iin;
1453

1454
    /**
1455
     * The name of the card's issuing bank. (For internal use only and not typically available in
1456
     * standard API requests.)
1457
     */
1458
    @SerializedName("issuer")
1459
    String issuer;
1460

1461
    /** The last four digits of the card. */
1462
    @SerializedName("last4")
1463
    String last4;
1464

1465
    /** Contains information about card networks that can be used to process the payment. */
1466
    @SerializedName("networks")
1467
    Networks networks;
1468

1469
    /** Details about payment methods collected offline. */
1470
    @SerializedName("offline")
1471
    Offline offline;
1472

1473
    /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1474
    @SerializedName("preferred_locales")
1475
    List<String> preferredLocales;
1476

1477
    /**
1478
     * How card details were read in this transaction.
1479
     *
1480
     * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1481
     * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1482
     */
1483
    @SerializedName("read_method")
1484
    String readMethod;
1485

1486
    @SerializedName("wallet")
1487
    Wallet wallet;
1488

1489
    @Getter
1490
    @Setter
1491
    @EqualsAndHashCode(callSuper = false)
1492
    public static class Networks extends StripeObject {
×
1493
      /** All available networks for the card. */
1494
      @SerializedName("available")
1495
      List<String> available;
1496

1497
      /** The preferred network for the card. */
1498
      @SerializedName("preferred")
1499
      String preferred;
1500
    }
1501

1502
    @Getter
1503
    @Setter
1504
    @EqualsAndHashCode(callSuper = false)
1505
    public static class Offline extends StripeObject {
×
1506
      /** Time at which the payment was collected while offline. */
1507
      @SerializedName("stored_at")
1508
      Long storedAt;
1509

1510
      /**
1511
       * The method used to process this payment method offline. Only deferred is allowed.
1512
       *
1513
       * <p>Equal to {@code deferred}.
1514
       */
1515
      @SerializedName("type")
1516
      String type;
1517
    }
1518

1519
    @Getter
1520
    @Setter
1521
    @EqualsAndHashCode(callSuper = false)
1522
    public static class Wallet extends StripeObject {
×
1523
      /**
1524
       * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code
1525
       * samsung_pay}, or {@code unknown}.
1526
       */
1527
      @SerializedName("type")
1528
      String type;
1529
    }
1530
  }
1531

1532
  @Getter
1533
  @Setter
1534
  @EqualsAndHashCode(callSuper = false)
1535
  public static class Cashapp extends StripeObject {
×
1536
    /** A unique and immutable identifier assigned by Cash App to every buyer. */
1537
    @SerializedName("buyer_id")
1538
    String buyerId;
1539

1540
    /** A public identifier for buyers using Cash App. */
1541
    @SerializedName("cashtag")
1542
    String cashtag;
1543
  }
1544

1545
  @Getter
1546
  @Setter
1547
  @EqualsAndHashCode(callSuper = false)
1548
  public static class CustomerBalance extends StripeObject {}
×
1549

1550
  @Getter
1551
  @Setter
1552
  @EqualsAndHashCode(callSuper = false)
1553
  public static class Eps extends StripeObject {
×
1554
    /**
1555
     * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code
1556
     * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code
1557
     * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code
1558
     * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag},
1559
     * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code
1560
     * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code
1561
     * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark},
1562
     * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code
1563
     * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag},
1564
     * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code
1565
     * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code
1566
     * vr_bank_braunau}.
1567
     */
1568
    @SerializedName("bank")
1569
    String bank;
1570
  }
1571

1572
  @Getter
1573
  @Setter
1574
  @EqualsAndHashCode(callSuper = false)
1575
  public static class Fpx extends StripeObject {
×
1576
    /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */
1577
    @SerializedName("account_holder_type")
1578
    String accountHolderType;
1579

1580
    /**
1581
     * The customer's bank, if provided. Can be one of {@code affin_bank}, {@code agrobank}, {@code
1582
     * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code
1583
     * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code kfh},
1584
     * {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code
1585
     * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code
1586
     * pb_enterprise}, or {@code bank_of_china}.
1587
     */
1588
    @SerializedName("bank")
1589
    String bank;
1590
  }
1591

1592
  @Getter
1593
  @Setter
1594
  @EqualsAndHashCode(callSuper = false)
1595
  public static class Giropay extends StripeObject {}
×
1596

1597
  @Getter
1598
  @Setter
1599
  @EqualsAndHashCode(callSuper = false)
1600
  public static class Grabpay extends StripeObject {}
×
1601

1602
  @Getter
1603
  @Setter
1604
  @EqualsAndHashCode(callSuper = false)
1605
  public static class Ideal extends StripeObject {
×
1606
    /**
1607
     * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code
1608
     * bunq}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code
1609
     * nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code
1610
     * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}.
1611
     */
1612
    @SerializedName("bank")
1613
    String bank;
1614

1615
    /**
1616
     * The Bank Identifier Code of the customer's bank, if the bank was provided.
1617
     *
1618
     * <p>One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code
1619
     * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code
1620
     * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code
1621
     * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}.
1622
     */
1623
    @SerializedName("bic")
1624
    String bic;
1625
  }
1626

1627
  @Getter
1628
  @Setter
1629
  @EqualsAndHashCode(callSuper = false)
1630
  public static class InteracPresent extends StripeObject {
×
1631
    /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */
1632
    @SerializedName("brand")
1633
    String brand;
1634

1635
    /**
1636
     * The cardholder name as read from the card, in <a
1637
     * href="https://en.wikipedia.org/wiki/ISO/IEC_7813">ISO 7813</a> format. May include
1638
     * alphanumeric characters, special characters and first/last name separator ({@code /}). In
1639
     * some cases, the cardholder name may not be available depending on how the issuer has
1640
     * configured the card. Cardholder name is typically not available on swipe or contactless
1641
     * payments, such as those made with Apple Pay and Google Pay.
1642
     */
1643
    @SerializedName("cardholder_name")
1644
    String cardholderName;
1645

1646
    /**
1647
     * Two-letter ISO code representing the country of the card. You could use this attribute to get
1648
     * a sense of the international breakdown of cards you've collected.
1649
     */
1650
    @SerializedName("country")
1651
    String country;
1652

1653
    /**
1654
     * A high-level description of the type of cards issued in this range. (For internal use only
1655
     * and not typically available in standard API requests.)
1656
     */
1657
    @SerializedName("description")
1658
    String description;
1659

1660
    /** Two-digit number representing the card's expiration month. */
1661
    @SerializedName("exp_month")
1662
    Long expMonth;
1663

1664
    /** Four-digit number representing the card's expiration year. */
1665
    @SerializedName("exp_year")
1666
    Long expYear;
1667

1668
    /**
1669
     * Uniquely identifies this particular card number. You can use this attribute to check whether
1670
     * two customers who’ve signed up with you are using the same card number, for example. For
1671
     * payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number
1672
     * might be provided instead of the underlying card number.
1673
     *
1674
     * <p><em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
1675
     * fingerprints for the same card---one for India and one for the rest of the world.</em>
1676
     */
1677
    @SerializedName("fingerprint")
1678
    String fingerprint;
1679

1680
    /**
1681
     * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code unknown}.
1682
     */
1683
    @SerializedName("funding")
1684
    String funding;
1685

1686
    /**
1687
     * Issuer identification number of the card. (For internal use only and not typically available
1688
     * in standard API requests.)
1689
     */
1690
    @SerializedName("iin")
1691
    String iin;
1692

1693
    /**
1694
     * The name of the card's issuing bank. (For internal use only and not typically available in
1695
     * standard API requests.)
1696
     */
1697
    @SerializedName("issuer")
1698
    String issuer;
1699

1700
    /** The last four digits of the card. */
1701
    @SerializedName("last4")
1702
    String last4;
1703

1704
    /** Contains information about card networks that can be used to process the payment. */
1705
    @SerializedName("networks")
1706
    Networks networks;
1707

1708
    /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
1709
    @SerializedName("preferred_locales")
1710
    List<String> preferredLocales;
1711

1712
    /**
1713
     * How card details were read in this transaction.
1714
     *
1715
     * <p>One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode},
1716
     * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}.
1717
     */
1718
    @SerializedName("read_method")
1719
    String readMethod;
1720

1721
    @Getter
1722
    @Setter
1723
    @EqualsAndHashCode(callSuper = false)
1724
    public static class Networks extends StripeObject {
×
1725
      /** All available networks for the card. */
1726
      @SerializedName("available")
1727
      List<String> available;
1728

1729
      /** The preferred network for the card. */
1730
      @SerializedName("preferred")
1731
      String preferred;
1732
    }
1733
  }
1734

1735
  @Getter
1736
  @Setter
1737
  @EqualsAndHashCode(callSuper = false)
NEW
1738
  public static class KakaoPay extends StripeObject {}
×
1739

1740
  @Getter
1741
  @Setter
1742
  @EqualsAndHashCode(callSuper = false)
1743
  public static class Klarna extends StripeObject {
×
1744
    /** The customer's date of birth, if provided. */
1745
    @SerializedName("dob")
1746
    Dob dob;
1747

1748
    @Getter
1749
    @Setter
1750
    @EqualsAndHashCode(callSuper = false)
1751
    public static class Dob extends StripeObject {
×
1752
      /** The day of birth, between 1 and 31. */
1753
      @SerializedName("day")
1754
      Long day;
1755

1756
      /** The month of birth, between 1 and 12. */
1757
      @SerializedName("month")
1758
      Long month;
1759

1760
      /** The four-digit year of birth. */
1761
      @SerializedName("year")
1762
      Long year;
1763
    }
1764
  }
1765

1766
  @Getter
1767
  @Setter
1768
  @EqualsAndHashCode(callSuper = false)
1769
  public static class Konbini extends StripeObject {}
×
1770

1771
  @Getter
1772
  @Setter
1773
  @EqualsAndHashCode(callSuper = false)
NEW
1774
  public static class KrCard extends StripeObject {
×
1775
    /**
1776
     * The local credit or debit card brand.
1777
     *
1778
     * <p>One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code
1779
     * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code
1780
     * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code
1781
     * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or {@code
1782
     * woori}.
1783
     */
1784
    @SerializedName("brand")
1785
    String brand;
1786

1787
    /** The last four digits of the card. This may not be present for American Express cards. */
1788
    @SerializedName("last4")
1789
    String last4;
1790
  }
1791

1792
  @Getter
1793
  @Setter
1794
  @EqualsAndHashCode(callSuper = false)
1795
  public static class Link extends StripeObject {
×
1796
    /** Account owner's email address. */
1797
    @SerializedName("email")
1798
    String email;
1799

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

1806
  @Getter
1807
  @Setter
1808
  @EqualsAndHashCode(callSuper = false)
1809
  public static class MbWay extends StripeObject {}
×
1810

1811
  @Getter
1812
  @Setter
1813
  @EqualsAndHashCode(callSuper = false)
1814
  public static class Mobilepay extends StripeObject {}
×
1815

1816
  @Getter
1817
  @Setter
1818
  @EqualsAndHashCode(callSuper = false)
1819
  public static class Multibanco extends StripeObject {}
×
1820

1821
  @Getter
1822
  @Setter
1823
  @EqualsAndHashCode(callSuper = false)
NEW
1824
  public static class NaverPay extends StripeObject {
×
1825
    /**
1826
     * Whether to fund this transaction with Naver Pay points or a card.
1827
     *
1828
     * <p>One of {@code card}, or {@code points}.
1829
     */
1830
    @SerializedName("funding")
1831
    String funding;
1832
  }
1833

1834
  @Getter
1835
  @Setter
1836
  @EqualsAndHashCode(callSuper = false)
1837
  public static class Oxxo extends StripeObject {}
×
1838

1839
  @Getter
1840
  @Setter
1841
  @EqualsAndHashCode(callSuper = false)
1842
  public static class P24 extends StripeObject {
×
1843
    /**
1844
     * The customer's bank, if provided.
1845
     *
1846
     * <p>One of {@code alior_bank}, {@code bank_millennium}, {@code bank_nowy_bfg_sa}, {@code
1847
     * bank_pekao_sa}, {@code banki_spbdzielcze}, {@code blik}, {@code bnp_paribas}, {@code boz},
1848
     * {@code citi_handlowy}, {@code credit_agricole}, {@code envelobank}, {@code
1849
     * etransfer_pocztowy24}, {@code getin_bank}, {@code ideabank}, {@code ing}, {@code inteligo},
1850
     * {@code mbank_mtransfer}, {@code nest_przelew}, {@code noble_pay}, {@code pbac_z_ipko}, {@code
1851
     * plus_bank}, {@code santander_przelew24}, {@code tmobile_usbugi_bankowe}, {@code toyota_bank},
1852
     * {@code velobank}, or {@code volkswagen_bank}.
1853
     */
1854
    @SerializedName("bank")
1855
    String bank;
1856
  }
1857

1858
  @Getter
1859
  @Setter
1860
  @EqualsAndHashCode(callSuper = false)
NEW
1861
  public static class Payco extends StripeObject {}
×
1862

1863
  @Getter
1864
  @Setter
1865
  @EqualsAndHashCode(callSuper = false)
1866
  public static class Paynow extends StripeObject {}
×
1867

1868
  @Getter
1869
  @Setter
1870
  @EqualsAndHashCode(callSuper = false)
1871
  public static class Paypal extends StripeObject {
×
1872
    /**
1873
     * Uniquely identifies this particular PayPal account. You can use this attribute to check
1874
     * whether two PayPal accounts are the same.
1875
     */
1876
    @SerializedName("fingerprint")
1877
    String fingerprint;
1878

1879
    /**
1880
     * Owner's email. Values are provided by PayPal directly (if supported) at the time of
1881
     * authorization or settlement. They cannot be set or mutated.
1882
     */
1883
    @SerializedName("payer_email")
1884
    String payerEmail;
1885

1886
    /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */
1887
    @SerializedName("payer_id")
1888
    String payerId;
1889

1890
    /**
1891
     * Owner's verified email. Values are verified or provided by PayPal directly (if supported) at
1892
     * the time of authorization or settlement. They cannot be set or mutated.
1893
     */
1894
    @SerializedName("verified_email")
1895
    String verifiedEmail;
1896
  }
1897

1898
  @Getter
1899
  @Setter
1900
  @EqualsAndHashCode(callSuper = false)
1901
  public static class Payto extends StripeObject {
×
1902
    /** Bank-State-Branch number of the bank account. */
1903
    @SerializedName("bsb_number")
1904
    String bsbNumber;
1905

1906
    /** Last four digits of the bank account number. */
1907
    @SerializedName("last4")
1908
    String last4;
1909

1910
    /** The PayID alias for the bank account. */
1911
    @SerializedName("pay_id")
1912
    String payId;
1913
  }
1914

1915
  @Getter
1916
  @Setter
1917
  @EqualsAndHashCode(callSuper = false)
1918
  public static class Pix extends StripeObject {}
×
1919

1920
  @Getter
1921
  @Setter
1922
  @EqualsAndHashCode(callSuper = false)
1923
  public static class Promptpay extends StripeObject {}
×
1924

1925
  /**
1926
   * Options to configure Radar. See <a href="https://stripe.com/docs/radar/radar-session">Radar
1927
   * Session</a> for more information.
1928
   */
1929
  @Getter
1930
  @Setter
1931
  @EqualsAndHashCode(callSuper = false)
1932
  public static class RadarOptions extends StripeObject {
×
1933
    /**
1934
     * A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot of
1935
     * the browser metadata and device details that help Radar make more accurate predictions on
1936
     * your payments.
1937
     */
1938
    @SerializedName("session")
1939
    String session;
1940
  }
1941

1942
  @Getter
1943
  @Setter
1944
  @EqualsAndHashCode(callSuper = false)
1945
  public static class Rechnung extends StripeObject {
×
1946
    @SerializedName("dob")
1947
    Dob dob;
1948

1949
    @Getter
1950
    @Setter
1951
    @EqualsAndHashCode(callSuper = false)
1952
    public static class Dob extends StripeObject {
×
1953
      /** The day of birth, between 1 and 31. */
1954
      @SerializedName("day")
1955
      Long day;
1956

1957
      /** The month of birth, between 1 and 12. */
1958
      @SerializedName("month")
1959
      Long month;
1960

1961
      /** The four-digit year of birth. */
1962
      @SerializedName("year")
1963
      Long year;
1964
    }
1965
  }
1966

1967
  @Getter
1968
  @Setter
1969
  @EqualsAndHashCode(callSuper = false)
1970
  public static class RevolutPay extends StripeObject {}
×
1971

1972
  @Getter
1973
  @Setter
1974
  @EqualsAndHashCode(callSuper = false)
NEW
1975
  public static class SamsungPay extends StripeObject {}
×
1976

1977
  @Getter
1978
  @Setter
1979
  @EqualsAndHashCode(callSuper = false)
1980
  public static class SepaDebit extends StripeObject {
×
1981
    /** Bank code of bank associated with the bank account. */
1982
    @SerializedName("bank_code")
1983
    String bankCode;
1984

1985
    /** Branch code of bank associated with the bank account. */
1986
    @SerializedName("branch_code")
1987
    String branchCode;
1988

1989
    /** Two-letter ISO code representing the country the bank account is located in. */
1990
    @SerializedName("country")
1991
    String country;
1992

1993
    /**
1994
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
1995
     * two bank accounts are the same.
1996
     */
1997
    @SerializedName("fingerprint")
1998
    String fingerprint;
1999

2000
    /** Information about the object that generated this PaymentMethod. */
2001
    @SerializedName("generated_from")
2002
    GeneratedFrom generatedFrom;
2003

2004
    /** Last four characters of the IBAN. */
2005
    @SerializedName("last4")
2006
    String last4;
2007

2008
    @Getter
2009
    @Setter
2010
    @EqualsAndHashCode(callSuper = false)
2011
    public static class GeneratedFrom extends StripeObject {
×
2012
      /** The ID of the Charge that generated this PaymentMethod, if any. */
2013
      @SerializedName("charge")
2014
      @Getter(lombok.AccessLevel.NONE)
2015
      @Setter(lombok.AccessLevel.NONE)
2016
      ExpandableField<Charge> charge;
2017

2018
      /** The ID of the SetupAttempt that generated this PaymentMethod, if any. */
2019
      @SerializedName("setup_attempt")
2020
      @Getter(lombok.AccessLevel.NONE)
2021
      @Setter(lombok.AccessLevel.NONE)
2022
      ExpandableField<SetupAttempt> setupAttempt;
2023

2024
      /** Get ID of expandable {@code charge} object. */
2025
      public String getCharge() {
2026
        return (this.charge != null) ? this.charge.getId() : null;
×
2027
      }
2028

2029
      public void setCharge(String id) {
2030
        this.charge = ApiResource.setExpandableFieldId(id, this.charge);
×
2031
      }
×
2032

2033
      /** Get expanded {@code charge}. */
2034
      public Charge getChargeObject() {
2035
        return (this.charge != null) ? this.charge.getExpanded() : null;
×
2036
      }
2037

2038
      public void setChargeObject(Charge expandableObject) {
2039
        this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
2040
      }
×
2041

2042
      /** Get ID of expandable {@code setupAttempt} object. */
2043
      public String getSetupAttempt() {
2044
        return (this.setupAttempt != null) ? this.setupAttempt.getId() : null;
×
2045
      }
2046

2047
      public void setSetupAttempt(String id) {
2048
        this.setupAttempt = ApiResource.setExpandableFieldId(id, this.setupAttempt);
×
2049
      }
×
2050

2051
      /** Get expanded {@code setupAttempt}. */
2052
      public SetupAttempt getSetupAttemptObject() {
2053
        return (this.setupAttempt != null) ? this.setupAttempt.getExpanded() : null;
×
2054
      }
2055

2056
      public void setSetupAttemptObject(SetupAttempt expandableObject) {
2057
        this.setupAttempt =
×
2058
            new ExpandableField<SetupAttempt>(expandableObject.getId(), expandableObject);
×
2059
      }
×
2060
    }
2061
  }
2062

2063
  @Getter
2064
  @Setter
2065
  @EqualsAndHashCode(callSuper = false)
2066
  public static class Sofort extends StripeObject {
×
2067
    /** Two-letter ISO code representing the country the bank account is located in. */
2068
    @SerializedName("country")
2069
    String country;
2070
  }
2071

2072
  @Getter
2073
  @Setter
2074
  @EqualsAndHashCode(callSuper = false)
2075
  public static class Swish extends StripeObject {}
×
2076

2077
  @Getter
2078
  @Setter
2079
  @EqualsAndHashCode(callSuper = false)
2080
  public static class Twint extends StripeObject {}
×
2081

2082
  @Getter
2083
  @Setter
2084
  @EqualsAndHashCode(callSuper = false)
2085
  public static class UsBankAccount extends StripeObject {
×
2086
    /**
2087
     * Account holder type: individual or company.
2088
     *
2089
     * <p>One of {@code company}, or {@code individual}.
2090
     */
2091
    @SerializedName("account_holder_type")
2092
    String accountHolderType;
2093

2094
    /** Account number of the bank account. */
2095
    @SerializedName("account_number")
2096
    String accountNumber;
2097

2098
    /**
2099
     * Account type: checkings or savings. Defaults to checking if omitted.
2100
     *
2101
     * <p>One of {@code checking}, or {@code savings}.
2102
     */
2103
    @SerializedName("account_type")
2104
    String accountType;
2105

2106
    /** The name of the bank. */
2107
    @SerializedName("bank_name")
2108
    String bankName;
2109

2110
    /** The ID of the Financial Connections Account used to create the payment method. */
2111
    @SerializedName("financial_connections_account")
2112
    String financialConnectionsAccount;
2113

2114
    /**
2115
     * Uniquely identifies this particular bank account. You can use this attribute to check whether
2116
     * two bank accounts are the same.
2117
     */
2118
    @SerializedName("fingerprint")
2119
    String fingerprint;
2120

2121
    /** Last four digits of the bank account number. */
2122
    @SerializedName("last4")
2123
    String last4;
2124

2125
    /** Contains information about US bank account networks that can be used. */
2126
    @SerializedName("networks")
2127
    Networks networks;
2128

2129
    /** Routing number of the bank account. */
2130
    @SerializedName("routing_number")
2131
    String routingNumber;
2132

2133
    /** Contains information about the future reusability of this PaymentMethod. */
2134
    @SerializedName("status_details")
2135
    StatusDetails statusDetails;
2136

2137
    @Getter
2138
    @Setter
2139
    @EqualsAndHashCode(callSuper = false)
2140
    public static class Networks extends StripeObject {
×
2141
      /** The preferred network. */
2142
      @SerializedName("preferred")
2143
      String preferred;
2144

2145
      /** All supported networks. */
2146
      @SerializedName("supported")
2147
      List<String> supported;
2148
    }
2149

2150
    @Getter
2151
    @Setter
2152
    @EqualsAndHashCode(callSuper = false)
2153
    public static class StatusDetails extends StripeObject {
×
2154
      @SerializedName("blocked")
2155
      Blocked blocked;
2156

2157
      @Getter
2158
      @Setter
2159
      @EqualsAndHashCode(callSuper = false)
2160
      public static class Blocked extends StripeObject {
×
2161
        /**
2162
         * The ACH network code that resulted in this block.
2163
         *
2164
         * <p>One of {@code R02}, {@code R03}, {@code R04}, {@code R05}, {@code R07}, {@code R08},
2165
         * {@code R10}, {@code R11}, {@code R16}, {@code R20}, {@code R29}, or {@code R31}.
2166
         */
2167
        @SerializedName("network_code")
2168
        String networkCode;
2169

2170
        /**
2171
         * The reason why this PaymentMethod's fingerprint has been blocked
2172
         *
2173
         * <p>One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code
2174
         * bank_account_invalid_details}, {@code bank_account_restricted}, {@code
2175
         * bank_account_unusable}, or {@code debit_not_authorized}.
2176
         */
2177
        @SerializedName("reason")
2178
        String reason;
2179
      }
2180
    }
2181
  }
2182

2183
  @Getter
2184
  @Setter
2185
  @EqualsAndHashCode(callSuper = false)
2186
  public static class WechatPay extends StripeObject {}
×
2187

2188
  @Getter
2189
  @Setter
2190
  @EqualsAndHashCode(callSuper = false)
2191
  public static class Zip extends StripeObject {}
×
2192

2193
  @Override
2194
  public void setResponseGetter(StripeResponseGetter responseGetter) {
2195
    super.setResponseGetter(responseGetter);
1✔
2196
    trySetResponseGetter(acssDebit, responseGetter);
1✔
2197
    trySetResponseGetter(affirm, responseGetter);
1✔
2198
    trySetResponseGetter(afterpayClearpay, responseGetter);
1✔
2199
    trySetResponseGetter(alipay, responseGetter);
1✔
2200
    trySetResponseGetter(amazonPay, responseGetter);
1✔
2201
    trySetResponseGetter(auBecsDebit, responseGetter);
1✔
2202
    trySetResponseGetter(bacsDebit, responseGetter);
1✔
2203
    trySetResponseGetter(bancontact, responseGetter);
1✔
2204
    trySetResponseGetter(billingDetails, responseGetter);
1✔
2205
    trySetResponseGetter(blik, responseGetter);
1✔
2206
    trySetResponseGetter(boleto, responseGetter);
1✔
2207
    trySetResponseGetter(card, responseGetter);
1✔
2208
    trySetResponseGetter(cardPresent, responseGetter);
1✔
2209
    trySetResponseGetter(cashapp, responseGetter);
1✔
2210
    trySetResponseGetter(customer, responseGetter);
1✔
2211
    trySetResponseGetter(customerBalance, responseGetter);
1✔
2212
    trySetResponseGetter(eps, responseGetter);
1✔
2213
    trySetResponseGetter(fpx, responseGetter);
1✔
2214
    trySetResponseGetter(giropay, responseGetter);
1✔
2215
    trySetResponseGetter(grabpay, responseGetter);
1✔
2216
    trySetResponseGetter(ideal, responseGetter);
1✔
2217
    trySetResponseGetter(interacPresent, responseGetter);
1✔
2218
    trySetResponseGetter(kakaoPay, responseGetter);
1✔
2219
    trySetResponseGetter(klarna, responseGetter);
1✔
2220
    trySetResponseGetter(konbini, responseGetter);
1✔
2221
    trySetResponseGetter(krCard, responseGetter);
1✔
2222
    trySetResponseGetter(link, responseGetter);
1✔
2223
    trySetResponseGetter(mbWay, responseGetter);
1✔
2224
    trySetResponseGetter(mobilepay, responseGetter);
1✔
2225
    trySetResponseGetter(multibanco, responseGetter);
1✔
2226
    trySetResponseGetter(naverPay, responseGetter);
1✔
2227
    trySetResponseGetter(oxxo, responseGetter);
1✔
2228
    trySetResponseGetter(p24, responseGetter);
1✔
2229
    trySetResponseGetter(payco, responseGetter);
1✔
2230
    trySetResponseGetter(paynow, responseGetter);
1✔
2231
    trySetResponseGetter(paypal, responseGetter);
1✔
2232
    trySetResponseGetter(payto, responseGetter);
1✔
2233
    trySetResponseGetter(pix, responseGetter);
1✔
2234
    trySetResponseGetter(promptpay, responseGetter);
1✔
2235
    trySetResponseGetter(radarOptions, responseGetter);
1✔
2236
    trySetResponseGetter(rechnung, responseGetter);
1✔
2237
    trySetResponseGetter(revolutPay, responseGetter);
1✔
2238
    trySetResponseGetter(samsungPay, responseGetter);
1✔
2239
    trySetResponseGetter(sepaDebit, responseGetter);
1✔
2240
    trySetResponseGetter(sofort, responseGetter);
1✔
2241
    trySetResponseGetter(swish, responseGetter);
1✔
2242
    trySetResponseGetter(twint, responseGetter);
1✔
2243
    trySetResponseGetter(usBankAccount, responseGetter);
1✔
2244
    trySetResponseGetter(wechatPay, responseGetter);
1✔
2245
    trySetResponseGetter(zip, responseGetter);
1✔
2246
  }
1✔
2247
}
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