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

stripe / stripe-java / #16624

07 Nov 2024 10:04PM UTC coverage: 12.419% (-0.1%) from 12.519%
#16624

push

github

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

Update generated code for beta

17 of 1341 new or added lines in 57 files covered. (1.27%)

33 existing lines in 29 files now uncovered.

18855 of 151828 relevant lines covered (12.42%)

0.12 hits per line

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

0.0
/src/main/java/com/stripe/model/PaymentRecord.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.PaymentRecordReportPaymentAttemptCanceledParams;
13
import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams;
14
import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams;
15
import com.stripe.param.PaymentRecordReportPaymentAttemptParams;
16
import com.stripe.param.PaymentRecordReportPaymentParams;
17
import com.stripe.param.PaymentRecordRetrieveParams;
18
import java.util.Map;
19
import lombok.EqualsAndHashCode;
20
import lombok.Getter;
21
import lombok.Setter;
22

23
/**
24
 * A Payment Record is a resource that allows you to represent payments that occur on- or
25
 * off-Stripe. For example, you can create a Payment Record to model a payment made on a different
26
 * payment processor, in order to mark an Invoice as paid and a Subscription as active. Payment
27
 * Records consist of one or more Payment Attempt Records, which represent individual attempts made
28
 * on a payment network.
29
 */
30
@Getter
31
@Setter
32
@EqualsAndHashCode(callSuper = false)
NEW
33
public class PaymentRecord extends ApiResource implements HasId {
×
34
  /** A representation of an amount of money, consisting of an amount and a currency. */
35
  @SerializedName("amount_canceled")
36
  AmountCanceled amountCanceled;
37

38
  /** A representation of an amount of money, consisting of an amount and a currency. */
39
  @SerializedName("amount_failed")
40
  AmountFailed amountFailed;
41

42
  /** A representation of an amount of money, consisting of an amount and a currency. */
43
  @SerializedName("amount_guaranteed")
44
  AmountGuaranteed amountGuaranteed;
45

46
  /** A representation of an amount of money, consisting of an amount and a currency. */
47
  @SerializedName("amount_refunded")
48
  AmountRefunded amountRefunded;
49

50
  /** A representation of an amount of money, consisting of an amount and a currency. */
51
  @SerializedName("amount_requested")
52
  AmountRequested amountRequested;
53

54
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
55
  @SerializedName("created")
56
  Long created;
57

58
  /** Customer information for this payment. */
59
  @SerializedName("customer_details")
60
  CustomerDetails customerDetails;
61

62
  /**
63
   * Indicates whether the customer was present in your checkout flow during this payment.
64
   *
65
   * <p>One of {@code off_session}, or {@code on_session}.
66
   */
67
  @SerializedName("customer_presence")
68
  String customerPresence;
69

70
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
71
  @SerializedName("description")
72
  String description;
73

74
  /** Unique identifier for the object. */
75
  @Getter(onMethod_ = {@Override})
76
  @SerializedName("id")
77
  String id;
78

79
  /** ID of the latest Payment Attempt Record attached to this Payment Record. */
80
  @SerializedName("latest_payment_attempt_record")
81
  String latestPaymentAttemptRecord;
82

83
  /**
84
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
85
   * object exists in test mode.
86
   */
87
  @SerializedName("livemode")
88
  Boolean livemode;
89

90
  /**
91
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
92
   * to an object. This can be useful for storing additional information about the object in a
93
   * structured format.
94
   */
95
  @SerializedName("metadata")
96
  Map<String, String> metadata;
97

98
  /**
99
   * String representing the object's type. Objects of the same type share the same value.
100
   *
101
   * <p>Equal to {@code payment_record}.
102
   */
103
  @SerializedName("object")
104
  String object;
105

106
  /** Information about the Payment Method debited for this payment. */
107
  @SerializedName("payment_method_details")
108
  PaymentMethodDetails paymentMethodDetails;
109

110
  /**
111
   * An opaque string for manual reconciliation of this payment, for example a check number or a
112
   * payment processor ID.
113
   */
114
  @SerializedName("payment_reference")
115
  String paymentReference;
116

117
  /** Shipping information for this payment. */
118
  @SerializedName("shipping_details")
119
  ShippingDetails shippingDetails;
120

121
  /**
122
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
123
   * report updates through the other report_* methods, or report Payment Records in a terminal
124
   * state directly, through this method.
125
   */
126
  public static PaymentRecord reportPayment(Map<String, Object> params) throws StripeException {
NEW
127
    return reportPayment(params, (RequestOptions) null);
×
128
  }
129

130
  /**
131
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
132
   * report updates through the other report_* methods, or report Payment Records in a terminal
133
   * state directly, through this method.
134
   */
135
  public static PaymentRecord reportPayment(Map<String, Object> params, RequestOptions options)
136
      throws StripeException {
NEW
137
    String path = "/v1/payment_records/report_payment";
×
NEW
138
    ApiRequest request =
×
139
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
NEW
140
    return getGlobalResponseGetter().request(request, PaymentRecord.class);
×
141
  }
142

143
  /**
144
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
145
   * report updates through the other report_* methods, or report Payment Records in a terminal
146
   * state directly, through this method.
147
   */
148
  public static PaymentRecord reportPayment(PaymentRecordReportPaymentParams params)
149
      throws StripeException {
NEW
150
    return reportPayment(params, (RequestOptions) null);
×
151
  }
152

153
  /**
154
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
155
   * report updates through the other report_* methods, or report Payment Records in a terminal
156
   * state directly, through this method.
157
   */
158
  public static PaymentRecord reportPayment(
159
      PaymentRecordReportPaymentParams params, RequestOptions options) throws StripeException {
NEW
160
    String path = "/v1/payment_records/report_payment";
×
NEW
161
    ApiResource.checkNullTypedParams(path, params);
×
NEW
162
    ApiRequest request =
×
163
        new ApiRequest(
164
            BaseAddress.API,
165
            ApiResource.RequestMethod.POST,
166
            path,
NEW
167
            ApiRequestParams.paramsToMap(params),
×
168
            options);
NEW
169
    return getGlobalResponseGetter().request(request, PaymentRecord.class);
×
170
  }
171

172
  /**
173
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
174
   * specified if all other payment attempts are canceled or failed.
175
   */
176
  public PaymentRecord reportPaymentAttempt(Map<String, Object> params) throws StripeException {
NEW
177
    return reportPaymentAttempt(params, (RequestOptions) null);
×
178
  }
179

180
  /**
181
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
182
   * specified if all other payment attempts are canceled or failed.
183
   */
184
  public PaymentRecord reportPaymentAttempt(Map<String, Object> params, RequestOptions options)
185
      throws StripeException {
NEW
186
    String path =
×
NEW
187
        String.format(
×
NEW
188
            "/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(this.getId()));
×
NEW
189
    ApiRequest request =
×
190
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
NEW
191
    return getResponseGetter().request(request, PaymentRecord.class);
×
192
  }
193

194
  /**
195
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
196
   * specified if all other payment attempts are canceled or failed.
197
   */
198
  public PaymentRecord reportPaymentAttempt(PaymentRecordReportPaymentAttemptParams params)
199
      throws StripeException {
NEW
200
    return reportPaymentAttempt(params, (RequestOptions) null);
×
201
  }
202

203
  /**
204
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
205
   * specified if all other payment attempts are canceled or failed.
206
   */
207
  public PaymentRecord reportPaymentAttempt(
208
      PaymentRecordReportPaymentAttemptParams params, RequestOptions options)
209
      throws StripeException {
NEW
210
    String path =
×
NEW
211
        String.format(
×
NEW
212
            "/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(this.getId()));
×
NEW
213
    ApiResource.checkNullTypedParams(path, params);
×
NEW
214
    ApiRequest request =
×
215
        new ApiRequest(
216
            BaseAddress.API,
217
            ApiResource.RequestMethod.POST,
218
            path,
NEW
219
            ApiRequestParams.paramsToMap(params),
×
220
            options);
NEW
221
    return getResponseGetter().request(request, PaymentRecord.class);
×
222
  }
223

224
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
225
  public PaymentRecord reportPaymentAttemptCanceled(Map<String, Object> params)
226
      throws StripeException {
NEW
227
    return reportPaymentAttemptCanceled(params, (RequestOptions) null);
×
228
  }
229

230
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
231
  public PaymentRecord reportPaymentAttemptCanceled(
232
      Map<String, Object> params, RequestOptions options) throws StripeException {
NEW
233
    String path =
×
NEW
234
        String.format(
×
235
            "/v1/payment_records/%s/report_payment_attempt_canceled",
NEW
236
            ApiResource.urlEncodeId(this.getId()));
×
NEW
237
    ApiRequest request =
×
238
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
NEW
239
    return getResponseGetter().request(request, PaymentRecord.class);
×
240
  }
241

242
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
243
  public PaymentRecord reportPaymentAttemptCanceled(
244
      PaymentRecordReportPaymentAttemptCanceledParams params) throws StripeException {
NEW
245
    return reportPaymentAttemptCanceled(params, (RequestOptions) null);
×
246
  }
247

248
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
249
  public PaymentRecord reportPaymentAttemptCanceled(
250
      PaymentRecordReportPaymentAttemptCanceledParams params, RequestOptions options)
251
      throws StripeException {
NEW
252
    String path =
×
NEW
253
        String.format(
×
254
            "/v1/payment_records/%s/report_payment_attempt_canceled",
NEW
255
            ApiResource.urlEncodeId(this.getId()));
×
NEW
256
    ApiResource.checkNullTypedParams(path, params);
×
NEW
257
    ApiRequest request =
×
258
        new ApiRequest(
259
            BaseAddress.API,
260
            ApiResource.RequestMethod.POST,
261
            path,
NEW
262
            ApiRequestParams.paramsToMap(params),
×
263
            options);
NEW
264
    return getResponseGetter().request(request, PaymentRecord.class);
×
265
  }
266

267
  /**
268
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
269
   */
270
  public PaymentRecord reportPaymentAttemptFailed(Map<String, Object> params)
271
      throws StripeException {
NEW
272
    return reportPaymentAttemptFailed(params, (RequestOptions) null);
×
273
  }
274

275
  /**
276
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
277
   */
278
  public PaymentRecord reportPaymentAttemptFailed(
279
      Map<String, Object> params, RequestOptions options) throws StripeException {
NEW
280
    String path =
×
NEW
281
        String.format(
×
282
            "/v1/payment_records/%s/report_payment_attempt_failed",
NEW
283
            ApiResource.urlEncodeId(this.getId()));
×
NEW
284
    ApiRequest request =
×
285
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
NEW
286
    return getResponseGetter().request(request, PaymentRecord.class);
×
287
  }
288

289
  /**
290
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
291
   */
292
  public PaymentRecord reportPaymentAttemptFailed(
293
      PaymentRecordReportPaymentAttemptFailedParams params) throws StripeException {
NEW
294
    return reportPaymentAttemptFailed(params, (RequestOptions) null);
×
295
  }
296

297
  /**
298
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
299
   */
300
  public PaymentRecord reportPaymentAttemptFailed(
301
      PaymentRecordReportPaymentAttemptFailedParams params, RequestOptions options)
302
      throws StripeException {
NEW
303
    String path =
×
NEW
304
        String.format(
×
305
            "/v1/payment_records/%s/report_payment_attempt_failed",
NEW
306
            ApiResource.urlEncodeId(this.getId()));
×
NEW
307
    ApiResource.checkNullTypedParams(path, params);
×
NEW
308
    ApiRequest request =
×
309
        new ApiRequest(
310
            BaseAddress.API,
311
            ApiResource.RequestMethod.POST,
312
            path,
NEW
313
            ApiRequestParams.paramsToMap(params),
×
314
            options);
NEW
315
    return getResponseGetter().request(request, PaymentRecord.class);
×
316
  }
317

318
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
319
  public PaymentRecord reportPaymentAttemptGuaranteed(Map<String, Object> params)
320
      throws StripeException {
NEW
321
    return reportPaymentAttemptGuaranteed(params, (RequestOptions) null);
×
322
  }
323

324
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
325
  public PaymentRecord reportPaymentAttemptGuaranteed(
326
      Map<String, Object> params, RequestOptions options) throws StripeException {
NEW
327
    String path =
×
NEW
328
        String.format(
×
329
            "/v1/payment_records/%s/report_payment_attempt_guaranteed",
NEW
330
            ApiResource.urlEncodeId(this.getId()));
×
NEW
331
    ApiRequest request =
×
332
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
NEW
333
    return getResponseGetter().request(request, PaymentRecord.class);
×
334
  }
335

336
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
337
  public PaymentRecord reportPaymentAttemptGuaranteed(
338
      PaymentRecordReportPaymentAttemptGuaranteedParams params) throws StripeException {
NEW
339
    return reportPaymentAttemptGuaranteed(params, (RequestOptions) null);
×
340
  }
341

342
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
343
  public PaymentRecord reportPaymentAttemptGuaranteed(
344
      PaymentRecordReportPaymentAttemptGuaranteedParams params, RequestOptions options)
345
      throws StripeException {
NEW
346
    String path =
×
NEW
347
        String.format(
×
348
            "/v1/payment_records/%s/report_payment_attempt_guaranteed",
NEW
349
            ApiResource.urlEncodeId(this.getId()));
×
NEW
350
    ApiResource.checkNullTypedParams(path, params);
×
NEW
351
    ApiRequest request =
×
352
        new ApiRequest(
353
            BaseAddress.API,
354
            ApiResource.RequestMethod.POST,
355
            path,
NEW
356
            ApiRequestParams.paramsToMap(params),
×
357
            options);
NEW
358
    return getResponseGetter().request(request, PaymentRecord.class);
×
359
  }
360

361
  /** Retrieves a Payment Record with the given ID. */
362
  public static PaymentRecord retrieve(String id) throws StripeException {
NEW
363
    return retrieve(id, (Map<String, Object>) null, (RequestOptions) null);
×
364
  }
365

366
  /** Retrieves a Payment Record with the given ID. */
367
  public static PaymentRecord retrieve(String id, RequestOptions options) throws StripeException {
NEW
368
    return retrieve(id, (Map<String, Object>) null, options);
×
369
  }
370

371
  /** Retrieves a Payment Record with the given ID. */
372
  public static PaymentRecord retrieve(
373
      String id, Map<String, Object> params, RequestOptions options) throws StripeException {
NEW
374
    String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id));
×
NEW
375
    ApiRequest request =
×
376
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
NEW
377
    return getGlobalResponseGetter().request(request, PaymentRecord.class);
×
378
  }
379

380
  /** Retrieves a Payment Record with the given ID. */
381
  public static PaymentRecord retrieve(
382
      String id, PaymentRecordRetrieveParams params, RequestOptions options)
383
      throws StripeException {
NEW
384
    String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id));
×
NEW
385
    ApiResource.checkNullTypedParams(path, params);
×
NEW
386
    ApiRequest request =
×
387
        new ApiRequest(
388
            BaseAddress.API,
389
            ApiResource.RequestMethod.GET,
390
            path,
NEW
391
            ApiRequestParams.paramsToMap(params),
×
392
            options);
NEW
393
    return getGlobalResponseGetter().request(request, PaymentRecord.class);
×
394
  }
395

396
  /** A representation of an amount of money, consisting of an amount and a currency. */
397
  @Getter
398
  @Setter
399
  @EqualsAndHashCode(callSuper = false)
NEW
400
  public static class AmountCanceled extends StripeObject {
×
401
    /**
402
     * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
403
     * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
404
     * currency</a>.
405
     */
406
    @SerializedName("currency")
407
    String currency;
408

409
    /**
410
     * A positive integer representing the amount in the <a
411
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
412
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
413
     */
414
    @SerializedName("value")
415
    Long value;
416
  }
417

418
  /** A representation of an amount of money, consisting of an amount and a currency. */
419
  @Getter
420
  @Setter
421
  @EqualsAndHashCode(callSuper = false)
NEW
422
  public static class AmountFailed extends StripeObject {
×
423
    /**
424
     * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
425
     * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
426
     * currency</a>.
427
     */
428
    @SerializedName("currency")
429
    String currency;
430

431
    /**
432
     * A positive integer representing the amount in the <a
433
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
434
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
435
     */
436
    @SerializedName("value")
437
    Long value;
438
  }
439

440
  /** A representation of an amount of money, consisting of an amount and a currency. */
441
  @Getter
442
  @Setter
443
  @EqualsAndHashCode(callSuper = false)
NEW
444
  public static class AmountGuaranteed extends StripeObject {
×
445
    /**
446
     * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
447
     * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
448
     * currency</a>.
449
     */
450
    @SerializedName("currency")
451
    String currency;
452

453
    /**
454
     * A positive integer representing the amount in the <a
455
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
456
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
457
     */
458
    @SerializedName("value")
459
    Long value;
460
  }
461

462
  /** A representation of an amount of money, consisting of an amount and a currency. */
463
  @Getter
464
  @Setter
465
  @EqualsAndHashCode(callSuper = false)
NEW
466
  public static class AmountRefunded extends StripeObject {
×
467
    /**
468
     * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
469
     * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
470
     * currency</a>.
471
     */
472
    @SerializedName("currency")
473
    String currency;
474

475
    /**
476
     * A positive integer representing the amount in the <a
477
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
478
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
479
     */
480
    @SerializedName("value")
481
    Long value;
482
  }
483

484
  /** A representation of an amount of money, consisting of an amount and a currency. */
485
  @Getter
486
  @Setter
487
  @EqualsAndHashCode(callSuper = false)
NEW
488
  public static class AmountRequested extends StripeObject {
×
489
    /**
490
     * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
491
     * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
492
     * currency</a>.
493
     */
494
    @SerializedName("currency")
495
    String currency;
496

497
    /**
498
     * A positive integer representing the amount in the <a
499
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
500
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
501
     */
502
    @SerializedName("value")
503
    Long value;
504
  }
505

506
  /** Information about the customer for this payment. */
507
  @Getter
508
  @Setter
509
  @EqualsAndHashCode(callSuper = false)
NEW
510
  public static class CustomerDetails extends StripeObject {
×
511
    /** ID of the Stripe Customer associated with this payment. */
512
    @SerializedName("customer")
513
    String customer;
514

515
    /** The customer's email address. */
516
    @SerializedName("email")
517
    String email;
518

519
    /** The customer's name. */
520
    @SerializedName("name")
521
    String name;
522

523
    /** The customer's phone number. */
524
    @SerializedName("phone")
525
    String phone;
526
  }
527

528
  /** Details about the Payment Method used in this payment attempt. */
529
  @Getter
530
  @Setter
531
  @EqualsAndHashCode(callSuper = false)
NEW
532
  public static class PaymentMethodDetails extends StripeObject {
×
533
    /** The billing details associated with the method of payment. */
534
    @SerializedName("billing_details")
535
    BillingDetails billingDetails;
536

537
    /** Information about the custom (user-defined) payment method used to make this payment. */
538
    @SerializedName("custom")
539
    Custom custom;
540

541
    /** ID of the Stripe PaymentMethod used to make this payment. */
542
    @SerializedName("payment_method")
543
    String paymentMethod;
544

545
    /**
546
     * The type of Payment Method used for this payment attempt.
547
     *
548
     * <p>Equal to {@code custom}.
549
     */
550
    @SerializedName("type")
551
    String type;
552

553
    /** Billing details used by the customer for this payment. */
554
    @Getter
555
    @Setter
556
    @EqualsAndHashCode(callSuper = false)
NEW
557
    public static class BillingDetails extends StripeObject {
×
558
      /** A representation of a physical address. */
559
      @SerializedName("address")
560
      Address address;
561

562
      /** The billing email associated with the method of payment. */
563
      @SerializedName("email")
564
      String email;
565

566
      /** The billing name associated with the method of payment. */
567
      @SerializedName("name")
568
      String name;
569

570
      /** The billing phone number associated with the method of payment. */
571
      @SerializedName("phone")
572
      String phone;
573

574
      /** A representation of a physical address. */
575
      @Getter
576
      @Setter
577
      @EqualsAndHashCode(callSuper = false)
NEW
578
      public static class Address extends StripeObject {
×
579
        /** City, district, suburb, town, or village. */
580
        @SerializedName("city")
581
        String city;
582

583
        /**
584
         * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
585
         * 3166-1 alpha-2</a>).
586
         */
587
        @SerializedName("country")
588
        String country;
589

590
        /** Address line 1 (e.g., street, PO Box, or company name). */
591
        @SerializedName("line1")
592
        String line1;
593

594
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
595
        @SerializedName("line2")
596
        String line2;
597

598
        /** ZIP or postal code. */
599
        @SerializedName("postal_code")
600
        String postalCode;
601

602
        /** State, county, province, or region. */
603
        @SerializedName("state")
604
        String state;
605
      }
606
    }
607

608
    /**
609
     * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API.
610
     * This resource consists of details about the custom payment method used for this payment
611
     * attempt.
612
     */
613
    @Getter
614
    @Setter
615
    @EqualsAndHashCode(callSuper = false)
NEW
616
    public static class Custom extends StripeObject {
×
617
      /**
618
       * Display name for the custom (user-defined) payment method type used to make this payment.
619
       */
620
      @SerializedName("display_name")
621
      String displayName;
622

623
      /** The custom payment method type associated with this payment. */
624
      @SerializedName("type")
625
      String type;
626
    }
627
  }
628

629
  /** The customer's shipping information associated with this payment. */
630
  @Getter
631
  @Setter
632
  @EqualsAndHashCode(callSuper = false)
NEW
633
  public static class ShippingDetails extends StripeObject {
×
634
    /** A representation of a physical address. */
635
    @SerializedName("address")
636
    Address address;
637

638
    /** The shipping recipient's name. */
639
    @SerializedName("name")
640
    String name;
641

642
    /** The shipping recipient's phone number. */
643
    @SerializedName("phone")
644
    String phone;
645

646
    /** A representation of a physical address. */
647
    @Getter
648
    @Setter
649
    @EqualsAndHashCode(callSuper = false)
NEW
650
    public static class Address extends StripeObject {
×
651
      /** City, district, suburb, town, or village. */
652
      @SerializedName("city")
653
      String city;
654

655
      /**
656
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
657
       * 3166-1 alpha-2</a>).
658
       */
659
      @SerializedName("country")
660
      String country;
661

662
      /** Address line 1 (e.g., street, PO Box, or company name). */
663
      @SerializedName("line1")
664
      String line1;
665

666
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
667
      @SerializedName("line2")
668
      String line2;
669

670
      /** ZIP or postal code. */
671
      @SerializedName("postal_code")
672
      String postalCode;
673

674
      /** State, county, province, or region. */
675
      @SerializedName("state")
676
      String state;
677
    }
678
  }
679

680
  @Override
681
  public void setResponseGetter(StripeResponseGetter responseGetter) {
NEW
682
    super.setResponseGetter(responseGetter);
×
NEW
683
    trySetResponseGetter(amountCanceled, responseGetter);
×
NEW
684
    trySetResponseGetter(amountFailed, responseGetter);
×
NEW
685
    trySetResponseGetter(amountGuaranteed, responseGetter);
×
NEW
686
    trySetResponseGetter(amountRefunded, responseGetter);
×
NEW
687
    trySetResponseGetter(amountRequested, responseGetter);
×
NEW
688
    trySetResponseGetter(customerDetails, responseGetter);
×
NEW
689
    trySetResponseGetter(paymentMethodDetails, responseGetter);
×
NEW
690
    trySetResponseGetter(shippingDetails, responseGetter);
×
NEW
691
  }
×
692
}
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