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

stripe / stripe-java / #16438

18 Sep 2024 09:46PM UTC coverage: 12.864% (+0.008%) from 12.856%
#16438

push

github

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

Update generated code for beta

0 of 67 new or added lines in 7 files covered. (0.0%)

3 existing lines in 3 files now uncovered.

18469 of 143567 relevant lines covered (12.86%)

0.13 hits per line

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

33.33
/src/main/java/com/stripe/model/Dispute.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.DisputeCloseParams;
13
import com.stripe.param.DisputeListParams;
14
import com.stripe.param.DisputeRetrieveParams;
15
import com.stripe.param.DisputeUpdateParams;
16
import java.util.List;
17
import java.util.Map;
18
import lombok.EqualsAndHashCode;
19
import lombok.Getter;
20
import lombok.Setter;
21

22
/**
23
 * A dispute occurs when a customer questions your charge with their card issuer. When this happens,
24
 * you have the opportunity to respond to the dispute with evidence that shows that the charge is
25
 * legitimate.
26
 *
27
 * <p>Related guide: <a href="https://stripe.com/docs/disputes">Disputes and fraud</a>
28
 */
29
@Getter
30
@Setter
31
@EqualsAndHashCode(callSuper = false)
32
public class Dispute extends ApiResource
1✔
33
    implements MetadataStore<Dispute>, BalanceTransactionSource {
34
  /**
35
   * Disputed amount. Usually the amount of the charge, but it can differ (usually because of
36
   * currency fluctuation or because only part of the order is disputed).
37
   */
38
  @SerializedName("amount")
39
  Long amount;
40

41
  /**
42
   * List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your
43
   * Stripe account as a result of this dispute.
44
   */
45
  @SerializedName("balance_transactions")
46
  List<BalanceTransaction> balanceTransactions;
47

48
  /** ID of the charge that's disputed. */
49
  @SerializedName("charge")
50
  @Getter(lombok.AccessLevel.NONE)
51
  @Setter(lombok.AccessLevel.NONE)
52
  ExpandableField<Charge> charge;
53

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

58
  /**
59
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
60
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
61
   */
62
  @SerializedName("currency")
63
  String currency;
64

65
  /** List of eligibility types that are included in {@code enhanced_evidence}. */
66
  @SerializedName("enhanced_eligibility_types")
67
  List<String> enhancedEligibilityTypes;
68

69
  @SerializedName("evidence")
70
  Evidence evidence;
71

72
  @SerializedName("evidence_details")
73
  EvidenceDetails evidenceDetails;
74

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

80
  /**
81
   * If true, it's still possible to refund the disputed payment. After the payment has been fully
82
   * refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
83
   */
84
  @SerializedName("is_charge_refundable")
85
  Boolean isChargeRefundable;
86

87
  /**
88
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
89
   * object exists in test mode.
90
   */
91
  @SerializedName("livemode")
92
  Boolean livemode;
93

94
  /**
95
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
96
   * to an object. This can be useful for storing additional information about the object in a
97
   * structured format.
98
   */
99
  @Getter(onMethod_ = {@Override})
100
  @SerializedName("metadata")
101
  Map<String, String> metadata;
102

103
  /** Network-dependent reason code for the dispute. */
104
  @SerializedName("network_reason_code")
105
  String networkReasonCode;
106

107
  /**
108
   * String representing the object's type. Objects of the same type share the same value.
109
   *
110
   * <p>Equal to {@code dispute}.
111
   */
112
  @SerializedName("object")
113
  String object;
114

115
  /** ID of the PaymentIntent that's disputed. */
116
  @SerializedName("payment_intent")
117
  @Getter(lombok.AccessLevel.NONE)
118
  @Setter(lombok.AccessLevel.NONE)
119
  ExpandableField<PaymentIntent> paymentIntent;
120

121
  @SerializedName("payment_method_details")
122
  PaymentMethodDetails paymentMethodDetails;
123

124
  /**
125
   * Reason given by cardholder for dispute. Possible values are {@code bank_cannot_process}, {@code
126
   * check_returned}, {@code credit_not_processed}, {@code customer_initiated}, {@code
127
   * debit_not_authorized}, {@code duplicate}, {@code fraudulent}, {@code general}, {@code
128
   * incorrect_account_details}, {@code insufficient_funds}, {@code product_not_received}, {@code
129
   * product_unacceptable}, {@code subscription_canceled}, or {@code unrecognized}. Learn more about
130
   * <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>.
131
   */
132
  @SerializedName("reason")
133
  String reason;
134

135
  /**
136
   * Current status of dispute. Possible values are {@code warning_needs_response}, {@code
137
   * warning_under_review}, {@code warning_closed}, {@code needs_response}, {@code under_review},
138
   * {@code won}, or {@code lost}.
139
   *
140
   * <p>One of {@code lost}, {@code needs_response}, {@code under_review}, {@code warning_closed},
141
   * {@code warning_needs_response}, {@code warning_under_review}, or {@code won}.
142
   */
143
  @SerializedName("status")
144
  String status;
145

146
  /** Get ID of expandable {@code charge} object. */
147
  public String getCharge() {
148
    return (this.charge != null) ? this.charge.getId() : null;
1✔
149
  }
150

151
  public void setCharge(String id) {
152
    this.charge = ApiResource.setExpandableFieldId(id, this.charge);
×
153
  }
×
154

155
  /** Get expanded {@code charge}. */
156
  public Charge getChargeObject() {
157
    return (this.charge != null) ? this.charge.getExpanded() : null;
1✔
158
  }
159

160
  public void setChargeObject(Charge expandableObject) {
161
    this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
162
  }
×
163

164
  /** Get ID of expandable {@code paymentIntent} object. */
165
  public String getPaymentIntent() {
166
    return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
×
167
  }
168

169
  public void setPaymentIntent(String id) {
170
    this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
×
171
  }
×
172

173
  /** Get expanded {@code paymentIntent}. */
174
  public PaymentIntent getPaymentIntentObject() {
175
    return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
×
176
  }
177

178
  public void setPaymentIntentObject(PaymentIntent expandableObject) {
179
    this.paymentIntent =
×
180
        new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
×
181
  }
×
182

183
  /**
184
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
185
   * essentially dismissing the dispute, acknowledging it as lost.
186
   *
187
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
188
   * <em>Closing a dispute is irreversible</em>.
189
   */
190
  public Dispute close() throws StripeException {
191
    return close((Map<String, Object>) null, (RequestOptions) null);
1✔
192
  }
193

194
  /**
195
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
196
   * essentially dismissing the dispute, acknowledging it as lost.
197
   *
198
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
199
   * <em>Closing a dispute is irreversible</em>.
200
   */
201
  public Dispute close(RequestOptions options) throws StripeException {
202
    return close((Map<String, Object>) null, options);
×
203
  }
204

205
  /**
206
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
207
   * essentially dismissing the dispute, acknowledging it as lost.
208
   *
209
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
210
   * <em>Closing a dispute is irreversible</em>.
211
   */
212
  public Dispute close(Map<String, Object> params) throws StripeException {
213
    return close(params, (RequestOptions) null);
×
214
  }
215

216
  /**
217
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
218
   * essentially dismissing the dispute, acknowledging it as lost.
219
   *
220
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
221
   * <em>Closing a dispute is irreversible</em>.
222
   */
223
  public Dispute close(Map<String, Object> params, RequestOptions options) throws StripeException {
224
    String path = String.format("/v1/disputes/%s/close", ApiResource.urlEncodeId(this.getId()));
1✔
225
    ApiRequest request =
1✔
226
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
227
    return getResponseGetter().request(request, Dispute.class);
1✔
228
  }
229

230
  /**
231
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
232
   * essentially dismissing the dispute, acknowledging it as lost.
233
   *
234
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
235
   * <em>Closing a dispute is irreversible</em>.
236
   */
237
  public Dispute close(DisputeCloseParams params) throws StripeException {
238
    return close(params, (RequestOptions) null);
1✔
239
  }
240

241
  /**
242
   * Closing the dispute for a charge indicates that you do not have any evidence to submit and are
243
   * essentially dismissing the dispute, acknowledging it as lost.
244
   *
245
   * <p>The status of the dispute will change from {@code needs_response} to {@code lost}.
246
   * <em>Closing a dispute is irreversible</em>.
247
   */
248
  public Dispute close(DisputeCloseParams params, RequestOptions options) throws StripeException {
249
    String path = String.format("/v1/disputes/%s/close", ApiResource.urlEncodeId(this.getId()));
1✔
250
    ApiResource.checkNullTypedParams(path, params);
1✔
251
    ApiRequest request =
1✔
252
        new ApiRequest(
253
            BaseAddress.API,
254
            ApiResource.RequestMethod.POST,
255
            path,
256
            ApiRequestParams.paramsToMap(params),
1✔
257
            options);
258
    return getResponseGetter().request(request, Dispute.class);
1✔
259
  }
260

261
  /** Returns a list of your disputes. */
262
  public static DisputeCollection list(Map<String, Object> params) throws StripeException {
263
    return list(params, (RequestOptions) null);
1✔
264
  }
265

266
  /** Returns a list of your disputes. */
267
  public static DisputeCollection list(Map<String, Object> params, RequestOptions options)
268
      throws StripeException {
269
    String path = "/v1/disputes";
1✔
270
    ApiRequest request =
1✔
271
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
272
    return getGlobalResponseGetter().request(request, DisputeCollection.class);
1✔
273
  }
274

275
  /** Returns a list of your disputes. */
276
  public static DisputeCollection list(DisputeListParams params) throws StripeException {
277
    return list(params, (RequestOptions) null);
1✔
278
  }
279

280
  /** Returns a list of your disputes. */
281
  public static DisputeCollection list(DisputeListParams params, RequestOptions options)
282
      throws StripeException {
283
    String path = "/v1/disputes";
1✔
284
    ApiResource.checkNullTypedParams(path, params);
1✔
285
    ApiRequest request =
1✔
286
        new ApiRequest(
287
            BaseAddress.API,
288
            ApiResource.RequestMethod.GET,
289
            path,
290
            ApiRequestParams.paramsToMap(params),
1✔
291
            options);
292
    return getGlobalResponseGetter().request(request, DisputeCollection.class);
1✔
293
  }
294

295
  /** Retrieves the dispute with the given ID. */
296
  public static Dispute retrieve(String dispute) throws StripeException {
297
    return retrieve(dispute, (Map<String, Object>) null, (RequestOptions) null);
1✔
298
  }
299

300
  /** Retrieves the dispute with the given ID. */
301
  public static Dispute retrieve(String dispute, RequestOptions options) throws StripeException {
302
    return retrieve(dispute, (Map<String, Object>) null, options);
×
303
  }
304

305
  /** Retrieves the dispute with the given ID. */
306
  public static Dispute retrieve(String dispute, Map<String, Object> params, RequestOptions options)
307
      throws StripeException {
308
    String path = String.format("/v1/disputes/%s", ApiResource.urlEncodeId(dispute));
1✔
309
    ApiRequest request =
1✔
310
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
311
    return getGlobalResponseGetter().request(request, Dispute.class);
1✔
312
  }
313

314
  /** Retrieves the dispute with the given ID. */
315
  public static Dispute retrieve(
316
      String dispute, DisputeRetrieveParams params, RequestOptions options) throws StripeException {
317
    String path = String.format("/v1/disputes/%s", ApiResource.urlEncodeId(dispute));
×
318
    ApiResource.checkNullTypedParams(path, params);
×
319
    ApiRequest request =
×
320
        new ApiRequest(
321
            BaseAddress.API,
322
            ApiResource.RequestMethod.GET,
323
            path,
324
            ApiRequestParams.paramsToMap(params),
×
325
            options);
326
    return getGlobalResponseGetter().request(request, Dispute.class);
×
327
  }
328

329
  /**
330
   * When you get a dispute, contacting your customer is always the best first step. If that doesn’t
331
   * work, you can submit evidence to help us resolve the dispute in your favor. You can do this in
332
   * your <a href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, you can
333
   * use the API to submit evidence programmatically.
334
   *
335
   * <p>Depending on your dispute type, different evidence fields will give you a better chance of
336
   * winning your dispute. To figure out which evidence fields to provide, see our <a
337
   * href="https://stripe.com/docs/disputes/categories">guide to dispute types</a>.
338
   */
339
  @Override
340
  public Dispute update(Map<String, Object> params) throws StripeException {
341
    return update(params, (RequestOptions) null);
1✔
342
  }
343

344
  /**
345
   * When you get a dispute, contacting your customer is always the best first step. If that doesn’t
346
   * work, you can submit evidence to help us resolve the dispute in your favor. You can do this in
347
   * your <a href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, you can
348
   * use the API to submit evidence programmatically.
349
   *
350
   * <p>Depending on your dispute type, different evidence fields will give you a better chance of
351
   * winning your dispute. To figure out which evidence fields to provide, see our <a
352
   * href="https://stripe.com/docs/disputes/categories">guide to dispute types</a>.
353
   */
354
  @Override
355
  public Dispute update(Map<String, Object> params, RequestOptions options) throws StripeException {
356
    String path = String.format("/v1/disputes/%s", ApiResource.urlEncodeId(this.getId()));
1✔
357
    ApiRequest request =
1✔
358
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
359
    return getResponseGetter().request(request, Dispute.class);
1✔
360
  }
361

362
  /**
363
   * When you get a dispute, contacting your customer is always the best first step. If that doesn’t
364
   * work, you can submit evidence to help us resolve the dispute in your favor. You can do this in
365
   * your <a href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, you can
366
   * use the API to submit evidence programmatically.
367
   *
368
   * <p>Depending on your dispute type, different evidence fields will give you a better chance of
369
   * winning your dispute. To figure out which evidence fields to provide, see our <a
370
   * href="https://stripe.com/docs/disputes/categories">guide to dispute types</a>.
371
   */
372
  public Dispute update(DisputeUpdateParams params) throws StripeException {
373
    return update(params, (RequestOptions) null);
1✔
374
  }
375

376
  /**
377
   * When you get a dispute, contacting your customer is always the best first step. If that doesn’t
378
   * work, you can submit evidence to help us resolve the dispute in your favor. You can do this in
379
   * your <a href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, you can
380
   * use the API to submit evidence programmatically.
381
   *
382
   * <p>Depending on your dispute type, different evidence fields will give you a better chance of
383
   * winning your dispute. To figure out which evidence fields to provide, see our <a
384
   * href="https://stripe.com/docs/disputes/categories">guide to dispute types</a>.
385
   */
386
  public Dispute update(DisputeUpdateParams params, RequestOptions options) throws StripeException {
387
    String path = String.format("/v1/disputes/%s", ApiResource.urlEncodeId(this.getId()));
1✔
388
    ApiResource.checkNullTypedParams(path, params);
1✔
389
    ApiRequest request =
1✔
390
        new ApiRequest(
391
            BaseAddress.API,
392
            ApiResource.RequestMethod.POST,
393
            path,
394
            ApiRequestParams.paramsToMap(params),
1✔
395
            options);
396
    return getResponseGetter().request(request, Dispute.class);
1✔
397
  }
398

399
  @Getter
400
  @Setter
401
  @EqualsAndHashCode(callSuper = false)
402
  public static class Evidence extends StripeObject {
1✔
403
    /**
404
     * Any server or activity logs showing proof that the customer accessed or downloaded the
405
     * purchased digital product. This information should include IP addresses, corresponding
406
     * timestamps, and any detailed recorded activity.
407
     */
408
    @SerializedName("access_activity_log")
409
    String accessActivityLog;
410

411
    /** The billing address provided by the customer. */
412
    @SerializedName("billing_address")
413
    String billingAddress;
414

415
    /**
416
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Your
417
     * subscription cancellation policy, as shown to the customer.
418
     */
419
    @SerializedName("cancellation_policy")
420
    @Getter(lombok.AccessLevel.NONE)
421
    @Setter(lombok.AccessLevel.NONE)
422
    ExpandableField<File> cancellationPolicy;
423

424
    /**
425
     * An explanation of how and when the customer was shown your refund policy prior to purchase.
426
     */
427
    @SerializedName("cancellation_policy_disclosure")
428
    String cancellationPolicyDisclosure;
429

430
    /** A justification for why the customer's subscription was not canceled. */
431
    @SerializedName("cancellation_rebuttal")
432
    String cancellationRebuttal;
433

434
    /**
435
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Any
436
     * communication with the customer that you feel is relevant to your case. Examples include
437
     * emails proving that the customer received the product or service, or demonstrating their use
438
     * of or satisfaction with the product or service.
439
     */
440
    @SerializedName("customer_communication")
441
    @Getter(lombok.AccessLevel.NONE)
442
    @Setter(lombok.AccessLevel.NONE)
443
    ExpandableField<File> customerCommunication;
444

445
    /** The email address of the customer. */
446
    @SerializedName("customer_email_address")
447
    String customerEmailAddress;
448

449
    /** The name of the customer. */
450
    @SerializedName("customer_name")
451
    String customerName;
452

453
    /** The IP address that the customer used when making the purchase. */
454
    @SerializedName("customer_purchase_ip")
455
    String customerPurchaseIp;
456

457
    /**
458
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) A relevant
459
     * document or contract showing the customer's signature.
460
     */
461
    @SerializedName("customer_signature")
462
    @Getter(lombok.AccessLevel.NONE)
463
    @Setter(lombok.AccessLevel.NONE)
464
    ExpandableField<File> customerSignature;
465

466
    /**
467
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Documentation
468
     * for the prior charge that can uniquely identify the charge, such as a receipt, shipping
469
     * label, work order, etc. This document should be paired with a similar document from the
470
     * disputed payment that proves the two payments are separate.
471
     */
472
    @SerializedName("duplicate_charge_documentation")
473
    @Getter(lombok.AccessLevel.NONE)
474
    @Setter(lombok.AccessLevel.NONE)
475
    ExpandableField<File> duplicateChargeDocumentation;
476

477
    /**
478
     * An explanation of the difference between the disputed charge versus the prior charge that
479
     * appears to be a duplicate.
480
     */
481
    @SerializedName("duplicate_charge_explanation")
482
    String duplicateChargeExplanation;
483

484
    /**
485
     * The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
486
     */
487
    @SerializedName("duplicate_charge_id")
488
    String duplicateChargeId;
489

490
    @SerializedName("enhanced_evidence")
491
    EnhancedEvidence enhancedEvidence;
492

493
    /** A description of the product or service that was sold. */
494
    @SerializedName("product_description")
495
    String productDescription;
496

497
    /**
498
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Any receipt or
499
     * message sent to the customer notifying them of the charge.
500
     */
501
    @SerializedName("receipt")
502
    @Getter(lombok.AccessLevel.NONE)
503
    @Setter(lombok.AccessLevel.NONE)
504
    ExpandableField<File> receipt;
505

506
    /**
507
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Your refund
508
     * policy, as shown to the customer.
509
     */
510
    @SerializedName("refund_policy")
511
    @Getter(lombok.AccessLevel.NONE)
512
    @Setter(lombok.AccessLevel.NONE)
513
    ExpandableField<File> refundPolicy;
514

515
    /**
516
     * Documentation demonstrating that the customer was shown your refund policy prior to purchase.
517
     */
518
    @SerializedName("refund_policy_disclosure")
519
    String refundPolicyDisclosure;
520

521
    /** A justification for why the customer is not entitled to a refund. */
522
    @SerializedName("refund_refusal_explanation")
523
    String refundRefusalExplanation;
524

525
    /**
526
     * The date on which the customer received or began receiving the purchased service, in a clear
527
     * human-readable format.
528
     */
529
    @SerializedName("service_date")
530
    String serviceDate;
531

532
    /**
533
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Documentation
534
     * showing proof that a service was provided to the customer. This could include a copy of a
535
     * signed contract, work order, or other form of written agreement.
536
     */
537
    @SerializedName("service_documentation")
538
    @Getter(lombok.AccessLevel.NONE)
539
    @Setter(lombok.AccessLevel.NONE)
540
    ExpandableField<File> serviceDocumentation;
541

542
    /**
543
     * The address to which a physical product was shipped. You should try to include as complete
544
     * address information as possible.
545
     */
546
    @SerializedName("shipping_address")
547
    String shippingAddress;
548

549
    /**
550
     * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If
551
     * multiple carriers were used for this purchase, please separate them with commas.
552
     */
553
    @SerializedName("shipping_carrier")
554
    String shippingCarrier;
555

556
    /**
557
     * The date on which a physical product began its route to the shipping address, in a clear
558
     * human-readable format.
559
     */
560
    @SerializedName("shipping_date")
561
    String shippingDate;
562

563
    /**
564
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Documentation
565
     * showing proof that a product was shipped to the customer at the same address the customer
566
     * provided to you. This could include a copy of the shipment receipt, shipping label, etc. It
567
     * should show the customer's full shipping address, if possible.
568
     */
569
    @SerializedName("shipping_documentation")
570
    @Getter(lombok.AccessLevel.NONE)
571
    @Setter(lombok.AccessLevel.NONE)
572
    ExpandableField<File> shippingDocumentation;
573

574
    /**
575
     * The tracking number for a physical product, obtained from the delivery service. If multiple
576
     * tracking numbers were generated for this purchase, please separate them with commas.
577
     */
578
    @SerializedName("shipping_tracking_number")
579
    String shippingTrackingNumber;
580

581
    /**
582
     * (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>) Any additional
583
     * evidence or statements.
584
     */
585
    @SerializedName("uncategorized_file")
586
    @Getter(lombok.AccessLevel.NONE)
587
    @Setter(lombok.AccessLevel.NONE)
588
    ExpandableField<File> uncategorizedFile;
589

590
    /** Any additional evidence or statements. */
591
    @SerializedName("uncategorized_text")
592
    String uncategorizedText;
593

594
    /** Get ID of expandable {@code cancellationPolicy} object. */
595
    public String getCancellationPolicy() {
596
      return (this.cancellationPolicy != null) ? this.cancellationPolicy.getId() : null;
×
597
    }
598

599
    public void setCancellationPolicy(String id) {
600
      this.cancellationPolicy = ApiResource.setExpandableFieldId(id, this.cancellationPolicy);
×
601
    }
×
602

603
    /** Get expanded {@code cancellationPolicy}. */
604
    public File getCancellationPolicyObject() {
605
      return (this.cancellationPolicy != null) ? this.cancellationPolicy.getExpanded() : null;
×
606
    }
607

608
    public void setCancellationPolicyObject(File expandableObject) {
609
      this.cancellationPolicy =
×
610
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
611
    }
×
612

613
    /** Get ID of expandable {@code customerCommunication} object. */
614
    public String getCustomerCommunication() {
615
      return (this.customerCommunication != null) ? this.customerCommunication.getId() : null;
×
616
    }
617

618
    public void setCustomerCommunication(String id) {
619
      this.customerCommunication = ApiResource.setExpandableFieldId(id, this.customerCommunication);
×
620
    }
×
621

622
    /** Get expanded {@code customerCommunication}. */
623
    public File getCustomerCommunicationObject() {
624
      return (this.customerCommunication != null) ? this.customerCommunication.getExpanded() : null;
×
625
    }
626

627
    public void setCustomerCommunicationObject(File expandableObject) {
628
      this.customerCommunication =
×
629
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
630
    }
×
631

632
    /** Get ID of expandable {@code customerSignature} object. */
633
    public String getCustomerSignature() {
634
      return (this.customerSignature != null) ? this.customerSignature.getId() : null;
×
635
    }
636

637
    public void setCustomerSignature(String id) {
638
      this.customerSignature = ApiResource.setExpandableFieldId(id, this.customerSignature);
×
639
    }
×
640

641
    /** Get expanded {@code customerSignature}. */
642
    public File getCustomerSignatureObject() {
643
      return (this.customerSignature != null) ? this.customerSignature.getExpanded() : null;
×
644
    }
645

646
    public void setCustomerSignatureObject(File expandableObject) {
647
      this.customerSignature =
×
648
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
649
    }
×
650

651
    /** Get ID of expandable {@code duplicateChargeDocumentation} object. */
652
    public String getDuplicateChargeDocumentation() {
653
      return (this.duplicateChargeDocumentation != null)
×
654
          ? this.duplicateChargeDocumentation.getId()
×
655
          : null;
×
656
    }
657

658
    public void setDuplicateChargeDocumentation(String id) {
659
      this.duplicateChargeDocumentation =
×
660
          ApiResource.setExpandableFieldId(id, this.duplicateChargeDocumentation);
×
661
    }
×
662

663
    /** Get expanded {@code duplicateChargeDocumentation}. */
664
    public File getDuplicateChargeDocumentationObject() {
665
      return (this.duplicateChargeDocumentation != null)
×
666
          ? this.duplicateChargeDocumentation.getExpanded()
×
667
          : null;
×
668
    }
669

670
    public void setDuplicateChargeDocumentationObject(File expandableObject) {
671
      this.duplicateChargeDocumentation =
×
672
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
673
    }
×
674

675
    /** Get ID of expandable {@code receipt} object. */
676
    public String getReceipt() {
677
      return (this.receipt != null) ? this.receipt.getId() : null;
×
678
    }
679

680
    public void setReceipt(String id) {
681
      this.receipt = ApiResource.setExpandableFieldId(id, this.receipt);
×
682
    }
×
683

684
    /** Get expanded {@code receipt}. */
685
    public File getReceiptObject() {
686
      return (this.receipt != null) ? this.receipt.getExpanded() : null;
×
687
    }
688

689
    public void setReceiptObject(File expandableObject) {
690
      this.receipt = new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
691
    }
×
692

693
    /** Get ID of expandable {@code refundPolicy} object. */
694
    public String getRefundPolicy() {
695
      return (this.refundPolicy != null) ? this.refundPolicy.getId() : null;
×
696
    }
697

698
    public void setRefundPolicy(String id) {
699
      this.refundPolicy = ApiResource.setExpandableFieldId(id, this.refundPolicy);
×
700
    }
×
701

702
    /** Get expanded {@code refundPolicy}. */
703
    public File getRefundPolicyObject() {
704
      return (this.refundPolicy != null) ? this.refundPolicy.getExpanded() : null;
×
705
    }
706

707
    public void setRefundPolicyObject(File expandableObject) {
708
      this.refundPolicy = new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
709
    }
×
710

711
    /** Get ID of expandable {@code serviceDocumentation} object. */
712
    public String getServiceDocumentation() {
713
      return (this.serviceDocumentation != null) ? this.serviceDocumentation.getId() : null;
×
714
    }
715

716
    public void setServiceDocumentation(String id) {
717
      this.serviceDocumentation = ApiResource.setExpandableFieldId(id, this.serviceDocumentation);
×
718
    }
×
719

720
    /** Get expanded {@code serviceDocumentation}. */
721
    public File getServiceDocumentationObject() {
722
      return (this.serviceDocumentation != null) ? this.serviceDocumentation.getExpanded() : null;
×
723
    }
724

725
    public void setServiceDocumentationObject(File expandableObject) {
726
      this.serviceDocumentation =
×
727
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
728
    }
×
729

730
    /** Get ID of expandable {@code shippingDocumentation} object. */
731
    public String getShippingDocumentation() {
732
      return (this.shippingDocumentation != null) ? this.shippingDocumentation.getId() : null;
×
733
    }
734

735
    public void setShippingDocumentation(String id) {
736
      this.shippingDocumentation = ApiResource.setExpandableFieldId(id, this.shippingDocumentation);
×
737
    }
×
738

739
    /** Get expanded {@code shippingDocumentation}. */
740
    public File getShippingDocumentationObject() {
741
      return (this.shippingDocumentation != null) ? this.shippingDocumentation.getExpanded() : null;
×
742
    }
743

744
    public void setShippingDocumentationObject(File expandableObject) {
745
      this.shippingDocumentation =
×
746
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
747
    }
×
748

749
    /** Get ID of expandable {@code uncategorizedFile} object. */
750
    public String getUncategorizedFile() {
751
      return (this.uncategorizedFile != null) ? this.uncategorizedFile.getId() : null;
×
752
    }
753

754
    public void setUncategorizedFile(String id) {
755
      this.uncategorizedFile = ApiResource.setExpandableFieldId(id, this.uncategorizedFile);
×
756
    }
×
757

758
    /** Get expanded {@code uncategorizedFile}. */
759
    public File getUncategorizedFileObject() {
760
      return (this.uncategorizedFile != null) ? this.uncategorizedFile.getExpanded() : null;
×
761
    }
762

763
    public void setUncategorizedFileObject(File expandableObject) {
764
      this.uncategorizedFile =
×
765
          new ExpandableField<File>(expandableObject.getId(), expandableObject);
×
766
    }
×
767

768
    @Getter
769
    @Setter
770
    @EqualsAndHashCode(callSuper = false)
771
    public static class EnhancedEvidence extends StripeObject {
×
772
      @SerializedName("visa_compelling_evidence_3")
773
      VisaCompellingEvidence3 visaCompellingEvidence3;
774

775
      @Getter
776
      @Setter
777
      @EqualsAndHashCode(callSuper = false)
778
      public static class VisaCompellingEvidence3 extends StripeObject {
×
779
        /** Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. */
780
        @SerializedName("disputed_transaction")
781
        DisputedTransaction disputedTransaction;
782

783
        /**
784
         * List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0
785
         * evidence submission.
786
         */
787
        @SerializedName("prior_undisputed_transactions")
788
        List<Dispute.Evidence.EnhancedEvidence.VisaCompellingEvidence3.PriorUndisputedTransaction>
789
            priorUndisputedTransactions;
790

791
        @Getter
792
        @Setter
793
        @EqualsAndHashCode(callSuper = false)
794
        public static class DisputedTransaction extends StripeObject {
×
795
          /**
796
           * User Account ID used to log into business platform. Must be recognizable by the user.
797
           */
798
          @SerializedName("customer_account_id")
799
          String customerAccountId;
800

801
          /**
802
           * Unique identifier of the cardholder’s device derived from a combination of at least two
803
           * hardware and software attributes. Must be at least 20 characters.
804
           */
805
          @SerializedName("customer_device_fingerprint")
806
          String customerDeviceFingerprint;
807

808
          /**
809
           * Unique identifier of the cardholder’s device such as a device serial number (e.g.,
810
           * International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
811
           */
812
          @SerializedName("customer_device_id")
813
          String customerDeviceId;
814

815
          /** The email address of the customer. */
816
          @SerializedName("customer_email_address")
817
          String customerEmailAddress;
818

819
          /** The IP address that the customer used when making the purchase. */
820
          @SerializedName("customer_purchase_ip")
821
          String customerPurchaseIp;
822

823
          /**
824
           * Categorization of disputed payment.
825
           *
826
           * <p>One of {@code merchandise}, or {@code services}.
827
           */
828
          @SerializedName("merchandise_or_services")
829
          String merchandiseOrServices;
830

831
          /** A description of the product or service that was sold. */
832
          @SerializedName("product_description")
833
          String productDescription;
834

835
          /**
836
           * The address to which a physical product was shipped. All fields are required for Visa
837
           * Compelling Evidence 3.0 evidence submission.
838
           */
839
          @SerializedName("shipping_address")
840
          ShippingAddress shippingAddress;
841

842
          @Getter
843
          @Setter
844
          @EqualsAndHashCode(callSuper = false)
845
          public static class ShippingAddress extends StripeObject {
×
846
            /** City, district, suburb, town, or village. */
847
            @SerializedName("city")
848
            String city;
849

850
            /**
851
             * Two-letter country code (<a
852
             * href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>).
853
             */
854
            @SerializedName("country")
855
            String country;
856

857
            /** Address line 1 (e.g., street, PO Box, or company name). */
858
            @SerializedName("line1")
859
            String line1;
860

861
            /** Address line 2 (e.g., apartment, suite, unit, or building). */
862
            @SerializedName("line2")
863
            String line2;
864

865
            /** ZIP or postal code. */
866
            @SerializedName("postal_code")
867
            String postalCode;
868

869
            /** State, county, province, or region. */
870
            @SerializedName("state")
871
            String state;
872
          }
873
        }
874

875
        @Getter
876
        @Setter
877
        @EqualsAndHashCode(callSuper = false)
878
        public static class PriorUndisputedTransaction extends StripeObject {
×
879
          /** Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. */
880
          @SerializedName("charge")
881
          String charge;
882

883
          /**
884
           * User Account ID used to log into business platform. Must be recognizable by the user.
885
           */
886
          @SerializedName("customer_account_id")
887
          String customerAccountId;
888

889
          /**
890
           * Unique identifier of the cardholder’s device derived from a combination of at least two
891
           * hardware and software attributes. Must be at least 20 characters.
892
           */
893
          @SerializedName("customer_device_fingerprint")
894
          String customerDeviceFingerprint;
895

896
          /**
897
           * Unique identifier of the cardholder’s device such as a device serial number (e.g.,
898
           * International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
899
           */
900
          @SerializedName("customer_device_id")
901
          String customerDeviceId;
902

903
          /** The email address of the customer. */
904
          @SerializedName("customer_email_address")
905
          String customerEmailAddress;
906

907
          /** The IP address that the customer used when making the purchase. */
908
          @SerializedName("customer_purchase_ip")
909
          String customerPurchaseIp;
910

911
          /** A description of the product or service that was sold. */
912
          @SerializedName("product_description")
913
          String productDescription;
914

915
          /**
916
           * The address to which a physical product was shipped. All fields are required for Visa
917
           * Compelling Evidence 3.0 evidence submission.
918
           */
919
          @SerializedName("shipping_address")
920
          ShippingAddress shippingAddress;
921

922
          @Getter
923
          @Setter
924
          @EqualsAndHashCode(callSuper = false)
925
          public static class ShippingAddress extends StripeObject {
×
926
            /** City, district, suburb, town, or village. */
927
            @SerializedName("city")
928
            String city;
929

930
            /**
931
             * Two-letter country code (<a
932
             * href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>).
933
             */
934
            @SerializedName("country")
935
            String country;
936

937
            /** Address line 1 (e.g., street, PO Box, or company name). */
938
            @SerializedName("line1")
939
            String line1;
940

941
            /** Address line 2 (e.g., apartment, suite, unit, or building). */
942
            @SerializedName("line2")
943
            String line2;
944

945
            /** ZIP or postal code. */
946
            @SerializedName("postal_code")
947
            String postalCode;
948

949
            /** State, county, province, or region. */
950
            @SerializedName("state")
951
            String state;
952
          }
953
        }
954
      }
955
    }
956
  }
957

958
  @Getter
959
  @Setter
960
  @EqualsAndHashCode(callSuper = false)
961
  public static class EvidenceDetails extends StripeObject {
1✔
962
    /**
963
     * Date by which evidence must be submitted in order to successfully challenge dispute. Will be
964
     * 0 if the customer's bank or credit card company doesn't allow a response for this particular
965
     * dispute.
966
     */
967
    @SerializedName("due_by")
968
    Long dueBy;
969

970
    @SerializedName("enhanced_eligibility")
971
    EnhancedEligibility enhancedEligibility;
972

973
    /** Whether evidence has been staged for this dispute. */
974
    @SerializedName("has_evidence")
975
    Boolean hasEvidence;
976

977
    /**
978
     * Whether the last evidence submission was submitted past the due date. Defaults to {@code
979
     * false} if no evidence submissions have occurred. If {@code true}, then delivery of the latest
980
     * evidence is <em>not</em> guaranteed.
981
     */
982
    @SerializedName("past_due")
983
    Boolean pastDue;
984

985
    /**
986
     * The number of times evidence has been submitted. Typically, you may only submit evidence
987
     * once.
988
     */
989
    @SerializedName("submission_count")
990
    Long submissionCount;
991

992
    @Getter
993
    @Setter
994
    @EqualsAndHashCode(callSuper = false)
995
    public static class EnhancedEligibility extends StripeObject {
×
996
      @SerializedName("visa_compelling_evidence_3")
997
      VisaCompellingEvidence3 visaCompellingEvidence3;
998

999
      @Getter
1000
      @Setter
1001
      @EqualsAndHashCode(callSuper = false)
1002
      public static class VisaCompellingEvidence3 extends StripeObject {
×
1003
        /**
1004
         * List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence
1005
         * submission.
1006
         */
1007
        @SerializedName("required_actions")
1008
        List<String> requiredActions;
1009

1010
        /**
1011
         * Visa Compelling Evidence 3.0 eligibility status.
1012
         *
1013
         * <p>One of {@code not_qualified}, {@code qualified}, or {@code requires_action}.
1014
         */
1015
        @SerializedName("status")
1016
        String status;
1017
      }
1018
    }
1019
  }
1020

1021
  @Getter
1022
  @Setter
1023
  @EqualsAndHashCode(callSuper = false)
1024
  public static class PaymentMethodDetails extends StripeObject {
1✔
1025
    @SerializedName("amazon_pay")
1026
    AmazonPay amazonPay;
1027

1028
    @SerializedName("card")
1029
    Card card;
1030

1031
    @SerializedName("klarna")
1032
    Klarna klarna;
1033

1034
    @SerializedName("paypal")
1035
    Paypal paypal;
1036

1037
    /**
1038
     * Payment method type.
1039
     *
1040
     * <p>One of {@code amazon_pay}, {@code card}, {@code klarna}, or {@code paypal}.
1041
     */
1042
    @SerializedName("type")
1043
    String type;
1044

1045
    @Getter
1046
    @Setter
1047
    @EqualsAndHashCode(callSuper = false)
NEW
1048
    public static class AmazonPay extends StripeObject {
×
1049
      /**
1050
       * The AmazonPay dispute type, chargeback or claim
1051
       *
1052
       * <p>One of {@code chargeback}, or {@code claim}.
1053
       */
1054
      @SerializedName("dispute_type")
1055
      String disputeType;
1056
    }
1057

1058
    @Getter
1059
    @Setter
1060
    @EqualsAndHashCode(callSuper = false)
1061
    public static class Card extends StripeObject {
1✔
1062
      /**
1063
       * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
1064
       * {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
1065
       */
1066
      @SerializedName("brand")
1067
      String brand;
1068

1069
      /**
1070
       * The type of dispute opened. Different case types may have varying fees and financial
1071
       * impact.
1072
       *
1073
       * <p>One of {@code chargeback}, or {@code inquiry}.
1074
       */
1075
      @SerializedName("case_type")
1076
      String caseType;
1077

1078
      /**
1079
       * The card network's specific dispute reason code, which maps to one of Stripe's primary
1080
       * dispute categories to simplify response guidance. The <a
1081
       * href="https://stripe.com/docs/disputes/categories#network-code-map">Network code map</a>
1082
       * lists all available dispute reason codes by network.
1083
       */
1084
      @SerializedName("network_reason_code")
1085
      String networkReasonCode;
1086
    }
1087

1088
    @Getter
1089
    @Setter
1090
    @EqualsAndHashCode(callSuper = false)
1091
    public static class Klarna extends StripeObject {
×
1092
      /** The reason for the dispute as defined by Klarna. */
1093
      @SerializedName("reason_code")
1094
      String reasonCode;
1095
    }
1096

1097
    @Getter
1098
    @Setter
1099
    @EqualsAndHashCode(callSuper = false)
1100
    public static class Paypal extends StripeObject {
×
1101
      /** The ID of the dispute in PayPal. */
1102
      @SerializedName("case_id")
1103
      String caseId;
1104

1105
      /** The reason for the dispute as defined by PayPal. */
1106
      @SerializedName("reason_code")
1107
      String reasonCode;
1108
    }
1109
  }
1110

1111
  @Override
1112
  public void setResponseGetter(StripeResponseGetter responseGetter) {
1113
    super.setResponseGetter(responseGetter);
1✔
1114
    trySetResponseGetter(charge, responseGetter);
1✔
1115
    trySetResponseGetter(evidence, responseGetter);
1✔
1116
    trySetResponseGetter(evidenceDetails, responseGetter);
1✔
1117
    trySetResponseGetter(paymentIntent, responseGetter);
1✔
1118
    trySetResponseGetter(paymentMethodDetails, responseGetter);
1✔
1119
  }
1✔
1120
}
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