• 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/param/PaymentRecordReportPaymentAttemptParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.net.ApiRequestParams;
6
import java.util.ArrayList;
7
import java.util.HashMap;
8
import java.util.List;
9
import java.util.Map;
10
import lombok.Getter;
11

12
@Getter
13
public class PaymentRecordReportPaymentAttemptParams extends ApiRequestParams {
14
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
15
  @SerializedName("description")
16
  String description;
17

18
  /** Specifies which fields in the response should be expanded. */
19
  @SerializedName("expand")
20
  List<String> expand;
21

22
  /**
23
   * Map of extra parameters for custom features not available in this client library. The content
24
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
25
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
26
   * param object. Effectively, this map is flattened to its parent instance.
27
   */
28
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
29
  Map<String, Object> extraParams;
30

31
  /** Information about the payment attempt failure. */
32
  @SerializedName("failed")
33
  Failed failed;
34

35
  /** Information about the payment attempt guarantee. */
36
  @SerializedName("guaranteed")
37
  Guaranteed guaranteed;
38

39
  /**
40
   * <strong>Required.</strong> When the reported payment was initiated. Measured in seconds since
41
   * the Unix epoch.
42
   */
43
  @SerializedName("initiated_at")
44
  Long initiatedAt;
45

46
  /**
47
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
48
   * to an object. This can be useful for storing additional information about the object in a
49
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
50
   * be unset by posting an empty value to {@code metadata}.
51
   */
52
  @SerializedName("metadata")
53
  Map<String, String> metadata;
54

55
  /** The outcome of the reported payment. */
56
  @SerializedName("outcome")
57
  Outcome outcome;
58

59
  /** Information about the Payment Method debited for this payment. */
60
  @SerializedName("payment_method_details")
61
  PaymentMethodDetails paymentMethodDetails;
62

63
  /** Shipping information for this payment. */
64
  @SerializedName("shipping_details")
65
  ShippingDetails shippingDetails;
66

67
  private PaymentRecordReportPaymentAttemptParams(
68
      String description,
69
      List<String> expand,
70
      Map<String, Object> extraParams,
71
      Failed failed,
72
      Guaranteed guaranteed,
73
      Long initiatedAt,
74
      Map<String, String> metadata,
75
      Outcome outcome,
76
      PaymentMethodDetails paymentMethodDetails,
NEW
77
      ShippingDetails shippingDetails) {
×
NEW
78
    this.description = description;
×
NEW
79
    this.expand = expand;
×
NEW
80
    this.extraParams = extraParams;
×
NEW
81
    this.failed = failed;
×
NEW
82
    this.guaranteed = guaranteed;
×
NEW
83
    this.initiatedAt = initiatedAt;
×
NEW
84
    this.metadata = metadata;
×
NEW
85
    this.outcome = outcome;
×
NEW
86
    this.paymentMethodDetails = paymentMethodDetails;
×
NEW
87
    this.shippingDetails = shippingDetails;
×
NEW
88
  }
×
89

90
  public static Builder builder() {
NEW
91
    return new Builder();
×
92
  }
93

NEW
94
  public static class Builder {
×
95
    private String description;
96

97
    private List<String> expand;
98

99
    private Map<String, Object> extraParams;
100

101
    private Failed failed;
102

103
    private Guaranteed guaranteed;
104

105
    private Long initiatedAt;
106

107
    private Map<String, String> metadata;
108

109
    private Outcome outcome;
110

111
    private PaymentMethodDetails paymentMethodDetails;
112

113
    private ShippingDetails shippingDetails;
114

115
    /** Finalize and obtain parameter instance from this builder. */
116
    public PaymentRecordReportPaymentAttemptParams build() {
NEW
117
      return new PaymentRecordReportPaymentAttemptParams(
×
118
          this.description,
119
          this.expand,
120
          this.extraParams,
121
          this.failed,
122
          this.guaranteed,
123
          this.initiatedAt,
124
          this.metadata,
125
          this.outcome,
126
          this.paymentMethodDetails,
127
          this.shippingDetails);
128
    }
129

130
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
131
    public Builder setDescription(String description) {
NEW
132
      this.description = description;
×
NEW
133
      return this;
×
134
    }
135

136
    /**
137
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
138
     * subsequent calls adds additional elements to the original list. See {@link
139
     * PaymentRecordReportPaymentAttemptParams#expand} for the field documentation.
140
     */
141
    public Builder addExpand(String element) {
NEW
142
      if (this.expand == null) {
×
NEW
143
        this.expand = new ArrayList<>();
×
144
      }
NEW
145
      this.expand.add(element);
×
NEW
146
      return this;
×
147
    }
148

149
    /**
150
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
151
     * subsequent calls adds additional elements to the original list. See {@link
152
     * PaymentRecordReportPaymentAttemptParams#expand} for the field documentation.
153
     */
154
    public Builder addAllExpand(List<String> elements) {
NEW
155
      if (this.expand == null) {
×
NEW
156
        this.expand = new ArrayList<>();
×
157
      }
NEW
158
      this.expand.addAll(elements);
×
NEW
159
      return this;
×
160
    }
161

162
    /**
163
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
164
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
165
     * PaymentRecordReportPaymentAttemptParams#extraParams} for the field documentation.
166
     */
167
    public Builder putExtraParam(String key, Object value) {
NEW
168
      if (this.extraParams == null) {
×
NEW
169
        this.extraParams = new HashMap<>();
×
170
      }
NEW
171
      this.extraParams.put(key, value);
×
NEW
172
      return this;
×
173
    }
174

175
    /**
176
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
177
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
178
     * See {@link PaymentRecordReportPaymentAttemptParams#extraParams} for the field documentation.
179
     */
180
    public Builder putAllExtraParam(Map<String, Object> map) {
NEW
181
      if (this.extraParams == null) {
×
NEW
182
        this.extraParams = new HashMap<>();
×
183
      }
NEW
184
      this.extraParams.putAll(map);
×
NEW
185
      return this;
×
186
    }
187

188
    /** Information about the payment attempt failure. */
189
    public Builder setFailed(PaymentRecordReportPaymentAttemptParams.Failed failed) {
NEW
190
      this.failed = failed;
×
NEW
191
      return this;
×
192
    }
193

194
    /** Information about the payment attempt guarantee. */
195
    public Builder setGuaranteed(PaymentRecordReportPaymentAttemptParams.Guaranteed guaranteed) {
NEW
196
      this.guaranteed = guaranteed;
×
NEW
197
      return this;
×
198
    }
199

200
    /**
201
     * <strong>Required.</strong> When the reported payment was initiated. Measured in seconds since
202
     * the Unix epoch.
203
     */
204
    public Builder setInitiatedAt(Long initiatedAt) {
NEW
205
      this.initiatedAt = initiatedAt;
×
NEW
206
      return this;
×
207
    }
208

209
    /**
210
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
211
     * and subsequent calls add additional key/value pairs to the original map. See {@link
212
     * PaymentRecordReportPaymentAttemptParams#metadata} for the field documentation.
213
     */
214
    public Builder putMetadata(String key, String value) {
NEW
215
      if (this.metadata == null) {
×
NEW
216
        this.metadata = new HashMap<>();
×
217
      }
NEW
218
      this.metadata.put(key, value);
×
NEW
219
      return this;
×
220
    }
221

222
    /**
223
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
224
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
225
     * See {@link PaymentRecordReportPaymentAttemptParams#metadata} for the field documentation.
226
     */
227
    public Builder putAllMetadata(Map<String, String> map) {
NEW
228
      if (this.metadata == null) {
×
NEW
229
        this.metadata = new HashMap<>();
×
230
      }
NEW
231
      this.metadata.putAll(map);
×
NEW
232
      return this;
×
233
    }
234

235
    /** The outcome of the reported payment. */
236
    public Builder setOutcome(PaymentRecordReportPaymentAttemptParams.Outcome outcome) {
NEW
237
      this.outcome = outcome;
×
NEW
238
      return this;
×
239
    }
240

241
    /** Information about the Payment Method debited for this payment. */
242
    public Builder setPaymentMethodDetails(
243
        PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails paymentMethodDetails) {
NEW
244
      this.paymentMethodDetails = paymentMethodDetails;
×
NEW
245
      return this;
×
246
    }
247

248
    /** Shipping information for this payment. */
249
    public Builder setShippingDetails(
250
        PaymentRecordReportPaymentAttemptParams.ShippingDetails shippingDetails) {
NEW
251
      this.shippingDetails = shippingDetails;
×
NEW
252
      return this;
×
253
    }
254
  }
255

256
  @Getter
257
  public static class Failed {
258
    /**
259
     * Map of extra parameters for custom features not available in this client library. The content
260
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
261
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
262
     * param object. Effectively, this map is flattened to its parent instance.
263
     */
264
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
265
    Map<String, Object> extraParams;
266

267
    /**
268
     * <strong>Required.</strong> When the reported payment failed. Measured in seconds since the
269
     * Unix epoch.
270
     */
271
    @SerializedName("failed_at")
272
    Long failedAt;
273

NEW
274
    private Failed(Map<String, Object> extraParams, Long failedAt) {
×
NEW
275
      this.extraParams = extraParams;
×
NEW
276
      this.failedAt = failedAt;
×
NEW
277
    }
×
278

279
    public static Builder builder() {
NEW
280
      return new Builder();
×
281
    }
282

NEW
283
    public static class Builder {
×
284
      private Map<String, Object> extraParams;
285

286
      private Long failedAt;
287

288
      /** Finalize and obtain parameter instance from this builder. */
289
      public PaymentRecordReportPaymentAttemptParams.Failed build() {
NEW
290
        return new PaymentRecordReportPaymentAttemptParams.Failed(this.extraParams, this.failedAt);
×
291
      }
292

293
      /**
294
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
295
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
296
       * PaymentRecordReportPaymentAttemptParams.Failed#extraParams} for the field documentation.
297
       */
298
      public Builder putExtraParam(String key, Object value) {
NEW
299
        if (this.extraParams == null) {
×
NEW
300
          this.extraParams = new HashMap<>();
×
301
        }
NEW
302
        this.extraParams.put(key, value);
×
NEW
303
        return this;
×
304
      }
305

306
      /**
307
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
308
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
309
       * See {@link PaymentRecordReportPaymentAttemptParams.Failed#extraParams} for the field
310
       * documentation.
311
       */
312
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
313
        if (this.extraParams == null) {
×
NEW
314
          this.extraParams = new HashMap<>();
×
315
        }
NEW
316
        this.extraParams.putAll(map);
×
NEW
317
        return this;
×
318
      }
319

320
      /**
321
       * <strong>Required.</strong> When the reported payment failed. Measured in seconds since the
322
       * Unix epoch.
323
       */
324
      public Builder setFailedAt(Long failedAt) {
NEW
325
        this.failedAt = failedAt;
×
NEW
326
        return this;
×
327
      }
328
    }
329
  }
330

331
  @Getter
332
  public static class Guaranteed {
333
    /**
334
     * Map of extra parameters for custom features not available in this client library. The content
335
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
336
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
337
     * param object. Effectively, this map is flattened to its parent instance.
338
     */
339
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
340
    Map<String, Object> extraParams;
341

342
    /**
343
     * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds
344
     * since the Unix epoch.
345
     */
346
    @SerializedName("guaranteed_at")
347
    Long guaranteedAt;
348

NEW
349
    private Guaranteed(Map<String, Object> extraParams, Long guaranteedAt) {
×
NEW
350
      this.extraParams = extraParams;
×
NEW
351
      this.guaranteedAt = guaranteedAt;
×
NEW
352
    }
×
353

354
    public static Builder builder() {
NEW
355
      return new Builder();
×
356
    }
357

NEW
358
    public static class Builder {
×
359
      private Map<String, Object> extraParams;
360

361
      private Long guaranteedAt;
362

363
      /** Finalize and obtain parameter instance from this builder. */
364
      public PaymentRecordReportPaymentAttemptParams.Guaranteed build() {
NEW
365
        return new PaymentRecordReportPaymentAttemptParams.Guaranteed(
×
366
            this.extraParams, this.guaranteedAt);
367
      }
368

369
      /**
370
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
371
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
372
       * PaymentRecordReportPaymentAttemptParams.Guaranteed#extraParams} for the field
373
       * documentation.
374
       */
375
      public Builder putExtraParam(String key, Object value) {
NEW
376
        if (this.extraParams == null) {
×
NEW
377
          this.extraParams = new HashMap<>();
×
378
        }
NEW
379
        this.extraParams.put(key, value);
×
NEW
380
        return this;
×
381
      }
382

383
      /**
384
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
385
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
386
       * See {@link PaymentRecordReportPaymentAttemptParams.Guaranteed#extraParams} for the field
387
       * documentation.
388
       */
389
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
390
        if (this.extraParams == null) {
×
NEW
391
          this.extraParams = new HashMap<>();
×
392
        }
NEW
393
        this.extraParams.putAll(map);
×
NEW
394
        return this;
×
395
      }
396

397
      /**
398
       * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds
399
       * since the Unix epoch.
400
       */
401
      public Builder setGuaranteedAt(Long guaranteedAt) {
NEW
402
        this.guaranteedAt = guaranteedAt;
×
NEW
403
        return this;
×
404
      }
405
    }
406
  }
407

408
  @Getter
409
  public static class PaymentMethodDetails {
410
    /** The billing details associated with the method of payment. */
411
    @SerializedName("billing_details")
412
    BillingDetails billingDetails;
413

414
    /** Information about the custom (user-defined) payment method used to make this payment. */
415
    @SerializedName("custom")
416
    Custom custom;
417

418
    /**
419
     * Map of extra parameters for custom features not available in this client library. The content
420
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
421
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
422
     * param object. Effectively, this map is flattened to its parent instance.
423
     */
424
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
425
    Map<String, Object> extraParams;
426

427
    /** ID of the Stripe Payment Method used to make this payment. */
428
    @SerializedName("payment_method")
429
    String paymentMethod;
430

431
    /**
432
     * The type of the payment method details. An additional hash is included on the
433
     * payment_method_details with a name matching this value. It contains additional information
434
     * specific to the type.
435
     */
436
    @SerializedName("type")
437
    Type type;
438

439
    private PaymentMethodDetails(
440
        BillingDetails billingDetails,
441
        Custom custom,
442
        Map<String, Object> extraParams,
443
        String paymentMethod,
NEW
444
        Type type) {
×
NEW
445
      this.billingDetails = billingDetails;
×
NEW
446
      this.custom = custom;
×
NEW
447
      this.extraParams = extraParams;
×
NEW
448
      this.paymentMethod = paymentMethod;
×
NEW
449
      this.type = type;
×
NEW
450
    }
×
451

452
    public static Builder builder() {
NEW
453
      return new Builder();
×
454
    }
455

NEW
456
    public static class Builder {
×
457
      private BillingDetails billingDetails;
458

459
      private Custom custom;
460

461
      private Map<String, Object> extraParams;
462

463
      private String paymentMethod;
464

465
      private Type type;
466

467
      /** Finalize and obtain parameter instance from this builder. */
468
      public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails build() {
NEW
469
        return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails(
×
470
            this.billingDetails, this.custom, this.extraParams, this.paymentMethod, this.type);
471
      }
472

473
      /** The billing details associated with the method of payment. */
474
      public Builder setBillingDetails(
475
          PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails
476
              billingDetails) {
NEW
477
        this.billingDetails = billingDetails;
×
NEW
478
        return this;
×
479
      }
480

481
      /** Information about the custom (user-defined) payment method used to make this payment. */
482
      public Builder setCustom(
483
          PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom custom) {
NEW
484
        this.custom = custom;
×
NEW
485
        return this;
×
486
      }
487

488
      /**
489
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
490
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
491
       * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails#extraParams} for the field
492
       * documentation.
493
       */
494
      public Builder putExtraParam(String key, Object value) {
NEW
495
        if (this.extraParams == null) {
×
NEW
496
          this.extraParams = new HashMap<>();
×
497
        }
NEW
498
        this.extraParams.put(key, value);
×
NEW
499
        return this;
×
500
      }
501

502
      /**
503
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
504
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
505
       * See {@link PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails#extraParams} for
506
       * the field documentation.
507
       */
508
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
509
        if (this.extraParams == null) {
×
NEW
510
          this.extraParams = new HashMap<>();
×
511
        }
NEW
512
        this.extraParams.putAll(map);
×
NEW
513
        return this;
×
514
      }
515

516
      /** ID of the Stripe Payment Method used to make this payment. */
517
      public Builder setPaymentMethod(String paymentMethod) {
NEW
518
        this.paymentMethod = paymentMethod;
×
NEW
519
        return this;
×
520
      }
521

522
      /**
523
       * The type of the payment method details. An additional hash is included on the
524
       * payment_method_details with a name matching this value. It contains additional information
525
       * specific to the type.
526
       */
527
      public Builder setType(
528
          PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Type type) {
NEW
529
        this.type = type;
×
NEW
530
        return this;
×
531
      }
532
    }
533

534
    @Getter
535
    public static class BillingDetails {
536
      /** The billing address associated with the method of payment. */
537
      @SerializedName("address")
538
      Address address;
539

540
      /** The billing email associated with the method of payment. */
541
      @SerializedName("email")
542
      String email;
543

544
      /**
545
       * Map of extra parameters for custom features not available in this client library. The
546
       * content in this map is not serialized under this field's {@code @SerializedName} value.
547
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
548
       * name in this param object. Effectively, this map is flattened to its parent instance.
549
       */
550
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
551
      Map<String, Object> extraParams;
552

553
      /** The billing name associated with the method of payment. */
554
      @SerializedName("name")
555
      String name;
556

557
      /** The billing phone number associated with the method of payment. */
558
      @SerializedName("phone")
559
      String phone;
560

561
      private BillingDetails(
562
          Address address,
563
          String email,
564
          Map<String, Object> extraParams,
565
          String name,
NEW
566
          String phone) {
×
NEW
567
        this.address = address;
×
NEW
568
        this.email = email;
×
NEW
569
        this.extraParams = extraParams;
×
NEW
570
        this.name = name;
×
NEW
571
        this.phone = phone;
×
NEW
572
      }
×
573

574
      public static Builder builder() {
NEW
575
        return new Builder();
×
576
      }
577

NEW
578
      public static class Builder {
×
579
        private Address address;
580

581
        private String email;
582

583
        private Map<String, Object> extraParams;
584

585
        private String name;
586

587
        private String phone;
588

589
        /** Finalize and obtain parameter instance from this builder. */
590
        public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails build() {
NEW
591
          return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails(
×
592
              this.address, this.email, this.extraParams, this.name, this.phone);
593
        }
594

595
        /** The billing address associated with the method of payment. */
596
        public Builder setAddress(
597
            PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address
598
                address) {
NEW
599
          this.address = address;
×
NEW
600
          return this;
×
601
        }
602

603
        /** The billing email associated with the method of payment. */
604
        public Builder setEmail(String email) {
NEW
605
          this.email = email;
×
NEW
606
          return this;
×
607
        }
608

609
        /**
610
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
611
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
612
         * map. See {@link
613
         * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails#extraParams}
614
         * for the field documentation.
615
         */
616
        public Builder putExtraParam(String key, Object value) {
NEW
617
          if (this.extraParams == null) {
×
NEW
618
            this.extraParams = new HashMap<>();
×
619
          }
NEW
620
          this.extraParams.put(key, value);
×
NEW
621
          return this;
×
622
        }
623

624
        /**
625
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
626
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
627
         * map. See {@link
628
         * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails#extraParams}
629
         * for the field documentation.
630
         */
631
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
632
          if (this.extraParams == null) {
×
NEW
633
            this.extraParams = new HashMap<>();
×
634
          }
NEW
635
          this.extraParams.putAll(map);
×
NEW
636
          return this;
×
637
        }
638

639
        /** The billing name associated with the method of payment. */
640
        public Builder setName(String name) {
NEW
641
          this.name = name;
×
NEW
642
          return this;
×
643
        }
644

645
        /** The billing phone number associated with the method of payment. */
646
        public Builder setPhone(String phone) {
NEW
647
          this.phone = phone;
×
NEW
648
          return this;
×
649
        }
650
      }
651

652
      @Getter
653
      public static class Address {
654
        /** City, district, suburb, town, or village. */
655
        @SerializedName("city")
656
        String city;
657

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

665
        /**
666
         * Map of extra parameters for custom features not available in this client library. The
667
         * content in this map is not serialized under this field's {@code @SerializedName} value.
668
         * Instead, each key/value pair is serialized as if the key is a root-level field
669
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
670
         * instance.
671
         */
672
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
673
        Map<String, Object> extraParams;
674

675
        /** Address line 1 (e.g., street, PO Box, or company name). */
676
        @SerializedName("line1")
677
        String line1;
678

679
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
680
        @SerializedName("line2")
681
        String line2;
682

683
        /** ZIP or postal code. */
684
        @SerializedName("postal_code")
685
        String postalCode;
686

687
        /** State, county, province, or region. */
688
        @SerializedName("state")
689
        String state;
690

691
        private Address(
692
            String city,
693
            String country,
694
            Map<String, Object> extraParams,
695
            String line1,
696
            String line2,
697
            String postalCode,
NEW
698
            String state) {
×
NEW
699
          this.city = city;
×
NEW
700
          this.country = country;
×
NEW
701
          this.extraParams = extraParams;
×
NEW
702
          this.line1 = line1;
×
NEW
703
          this.line2 = line2;
×
NEW
704
          this.postalCode = postalCode;
×
NEW
705
          this.state = state;
×
NEW
706
        }
×
707

708
        public static Builder builder() {
NEW
709
          return new Builder();
×
710
        }
711

NEW
712
        public static class Builder {
×
713
          private String city;
714

715
          private String country;
716

717
          private Map<String, Object> extraParams;
718

719
          private String line1;
720

721
          private String line2;
722

723
          private String postalCode;
724

725
          private String state;
726

727
          /** Finalize and obtain parameter instance from this builder. */
728
          public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address
729
              build() {
NEW
730
            return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails
×
731
                .Address(
732
                this.city,
733
                this.country,
734
                this.extraParams,
735
                this.line1,
736
                this.line2,
737
                this.postalCode,
738
                this.state);
739
          }
740

741
          /** City, district, suburb, town, or village. */
742
          public Builder setCity(String city) {
NEW
743
            this.city = city;
×
NEW
744
            return this;
×
745
          }
746

747
          /**
748
           * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
749
           * 3166-1 alpha-2</a>).
750
           */
751
          public Builder setCountry(String country) {
NEW
752
            this.country = country;
×
NEW
753
            return this;
×
754
          }
755

756
          /**
757
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
758
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
759
           * map. See {@link
760
           * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address#extraParams}
761
           * for the field documentation.
762
           */
763
          public Builder putExtraParam(String key, Object value) {
NEW
764
            if (this.extraParams == null) {
×
NEW
765
              this.extraParams = new HashMap<>();
×
766
            }
NEW
767
            this.extraParams.put(key, value);
×
NEW
768
            return this;
×
769
          }
770

771
          /**
772
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
773
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
774
           * map. See {@link
775
           * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address#extraParams}
776
           * for the field documentation.
777
           */
778
          public Builder putAllExtraParam(Map<String, Object> map) {
NEW
779
            if (this.extraParams == null) {
×
NEW
780
              this.extraParams = new HashMap<>();
×
781
            }
NEW
782
            this.extraParams.putAll(map);
×
NEW
783
            return this;
×
784
          }
785

786
          /** Address line 1 (e.g., street, PO Box, or company name). */
787
          public Builder setLine1(String line1) {
NEW
788
            this.line1 = line1;
×
NEW
789
            return this;
×
790
          }
791

792
          /** Address line 2 (e.g., apartment, suite, unit, or building). */
793
          public Builder setLine2(String line2) {
NEW
794
            this.line2 = line2;
×
NEW
795
            return this;
×
796
          }
797

798
          /** ZIP or postal code. */
799
          public Builder setPostalCode(String postalCode) {
NEW
800
            this.postalCode = postalCode;
×
NEW
801
            return this;
×
802
          }
803

804
          /** State, county, province, or region. */
805
          public Builder setState(String state) {
NEW
806
            this.state = state;
×
NEW
807
            return this;
×
808
          }
809
        }
810
      }
811
    }
812

813
    @Getter
814
    public static class Custom {
815
      /**
816
       * Display name for the custom (user-defined) payment method type used to make this payment.
817
       */
818
      @SerializedName("display_name")
819
      String displayName;
820

821
      /**
822
       * Map of extra parameters for custom features not available in this client library. The
823
       * content in this map is not serialized under this field's {@code @SerializedName} value.
824
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
825
       * name in this param object. Effectively, this map is flattened to its parent instance.
826
       */
827
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
828
      Map<String, Object> extraParams;
829

830
      /** The custom payment method type associated with this payment. */
831
      @SerializedName("type")
832
      String type;
833

NEW
834
      private Custom(String displayName, Map<String, Object> extraParams, String type) {
×
NEW
835
        this.displayName = displayName;
×
NEW
836
        this.extraParams = extraParams;
×
NEW
837
        this.type = type;
×
NEW
838
      }
×
839

840
      public static Builder builder() {
NEW
841
        return new Builder();
×
842
      }
843

NEW
844
      public static class Builder {
×
845
        private String displayName;
846

847
        private Map<String, Object> extraParams;
848

849
        private String type;
850

851
        /** Finalize and obtain parameter instance from this builder. */
852
        public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom build() {
NEW
853
          return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom(
×
854
              this.displayName, this.extraParams, this.type);
855
        }
856

857
        /**
858
         * Display name for the custom (user-defined) payment method type used to make this payment.
859
         */
860
        public Builder setDisplayName(String displayName) {
NEW
861
          this.displayName = displayName;
×
NEW
862
          return this;
×
863
        }
864

865
        /**
866
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
867
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
868
         * map. See {@link
869
         * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom#extraParams} for the
870
         * field documentation.
871
         */
872
        public Builder putExtraParam(String key, Object value) {
NEW
873
          if (this.extraParams == null) {
×
NEW
874
            this.extraParams = new HashMap<>();
×
875
          }
NEW
876
          this.extraParams.put(key, value);
×
NEW
877
          return this;
×
878
        }
879

880
        /**
881
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
882
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
883
         * map. See {@link
884
         * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom#extraParams} for the
885
         * field documentation.
886
         */
887
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
888
          if (this.extraParams == null) {
×
NEW
889
            this.extraParams = new HashMap<>();
×
890
          }
NEW
891
          this.extraParams.putAll(map);
×
NEW
892
          return this;
×
893
        }
894

895
        /** The custom payment method type associated with this payment. */
896
        public Builder setType(String type) {
NEW
897
          this.type = type;
×
NEW
898
          return this;
×
899
        }
900
      }
901
    }
902

NEW
903
    public enum Type implements ApiRequestParams.EnumParam {
×
NEW
904
      @SerializedName("custom")
×
905
      CUSTOM("custom");
906

907
      @Getter(onMethod_ = {@Override})
908
      private final String value;
909

NEW
910
      Type(String value) {
×
NEW
911
        this.value = value;
×
NEW
912
      }
×
913
    }
914
  }
915

916
  @Getter
917
  public static class ShippingDetails {
918
    /** The physical shipping address. */
919
    @SerializedName("address")
920
    Address address;
921

922
    /**
923
     * Map of extra parameters for custom features not available in this client library. The content
924
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
925
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
926
     * param object. Effectively, this map is flattened to its parent instance.
927
     */
928
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
929
    Map<String, Object> extraParams;
930

931
    /** The shipping recipient's name. */
932
    @SerializedName("name")
933
    String name;
934

935
    /** The shipping recipient's phone number. */
936
    @SerializedName("phone")
937
    String phone;
938

939
    private ShippingDetails(
NEW
940
        Address address, Map<String, Object> extraParams, String name, String phone) {
×
NEW
941
      this.address = address;
×
NEW
942
      this.extraParams = extraParams;
×
NEW
943
      this.name = name;
×
NEW
944
      this.phone = phone;
×
NEW
945
    }
×
946

947
    public static Builder builder() {
NEW
948
      return new Builder();
×
949
    }
950

NEW
951
    public static class Builder {
×
952
      private Address address;
953

954
      private Map<String, Object> extraParams;
955

956
      private String name;
957

958
      private String phone;
959

960
      /** Finalize and obtain parameter instance from this builder. */
961
      public PaymentRecordReportPaymentAttemptParams.ShippingDetails build() {
NEW
962
        return new PaymentRecordReportPaymentAttemptParams.ShippingDetails(
×
963
            this.address, this.extraParams, this.name, this.phone);
964
      }
965

966
      /** The physical shipping address. */
967
      public Builder setAddress(
968
          PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address address) {
NEW
969
        this.address = address;
×
NEW
970
        return this;
×
971
      }
972

973
      /**
974
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
975
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
976
       * PaymentRecordReportPaymentAttemptParams.ShippingDetails#extraParams} for the field
977
       * documentation.
978
       */
979
      public Builder putExtraParam(String key, Object value) {
NEW
980
        if (this.extraParams == null) {
×
NEW
981
          this.extraParams = new HashMap<>();
×
982
        }
NEW
983
        this.extraParams.put(key, value);
×
NEW
984
        return this;
×
985
      }
986

987
      /**
988
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
989
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
990
       * See {@link PaymentRecordReportPaymentAttemptParams.ShippingDetails#extraParams} for the
991
       * field documentation.
992
       */
993
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
994
        if (this.extraParams == null) {
×
NEW
995
          this.extraParams = new HashMap<>();
×
996
        }
NEW
997
        this.extraParams.putAll(map);
×
NEW
998
        return this;
×
999
      }
1000

1001
      /** The shipping recipient's name. */
1002
      public Builder setName(String name) {
NEW
1003
        this.name = name;
×
NEW
1004
        return this;
×
1005
      }
1006

1007
      /** The shipping recipient's phone number. */
1008
      public Builder setPhone(String phone) {
NEW
1009
        this.phone = phone;
×
NEW
1010
        return this;
×
1011
      }
1012
    }
1013

1014
    @Getter
1015
    public static class Address {
1016
      /** City, district, suburb, town, or village. */
1017
      @SerializedName("city")
1018
      String city;
1019

1020
      /**
1021
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1022
       * 3166-1 alpha-2</a>).
1023
       */
1024
      @SerializedName("country")
1025
      String country;
1026

1027
      /**
1028
       * Map of extra parameters for custom features not available in this client library. The
1029
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1030
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1031
       * name in this param object. Effectively, this map is flattened to its parent instance.
1032
       */
1033
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1034
      Map<String, Object> extraParams;
1035

1036
      /** Address line 1 (e.g., street, PO Box, or company name). */
1037
      @SerializedName("line1")
1038
      String line1;
1039

1040
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
1041
      @SerializedName("line2")
1042
      String line2;
1043

1044
      /** ZIP or postal code. */
1045
      @SerializedName("postal_code")
1046
      String postalCode;
1047

1048
      /** State, county, province, or region. */
1049
      @SerializedName("state")
1050
      String state;
1051

1052
      private Address(
1053
          String city,
1054
          String country,
1055
          Map<String, Object> extraParams,
1056
          String line1,
1057
          String line2,
1058
          String postalCode,
NEW
1059
          String state) {
×
NEW
1060
        this.city = city;
×
NEW
1061
        this.country = country;
×
NEW
1062
        this.extraParams = extraParams;
×
NEW
1063
        this.line1 = line1;
×
NEW
1064
        this.line2 = line2;
×
NEW
1065
        this.postalCode = postalCode;
×
NEW
1066
        this.state = state;
×
NEW
1067
      }
×
1068

1069
      public static Builder builder() {
NEW
1070
        return new Builder();
×
1071
      }
1072

NEW
1073
      public static class Builder {
×
1074
        private String city;
1075

1076
        private String country;
1077

1078
        private Map<String, Object> extraParams;
1079

1080
        private String line1;
1081

1082
        private String line2;
1083

1084
        private String postalCode;
1085

1086
        private String state;
1087

1088
        /** Finalize and obtain parameter instance from this builder. */
1089
        public PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address build() {
NEW
1090
          return new PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address(
×
1091
              this.city,
1092
              this.country,
1093
              this.extraParams,
1094
              this.line1,
1095
              this.line2,
1096
              this.postalCode,
1097
              this.state);
1098
        }
1099

1100
        /** City, district, suburb, town, or village. */
1101
        public Builder setCity(String city) {
NEW
1102
          this.city = city;
×
NEW
1103
          return this;
×
1104
        }
1105

1106
        /**
1107
         * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1108
         * 3166-1 alpha-2</a>).
1109
         */
1110
        public Builder setCountry(String country) {
NEW
1111
          this.country = country;
×
NEW
1112
          return this;
×
1113
        }
1114

1115
        /**
1116
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1117
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1118
         * map. See {@link
1119
         * PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address#extraParams} for the
1120
         * field documentation.
1121
         */
1122
        public Builder putExtraParam(String key, Object value) {
NEW
1123
          if (this.extraParams == null) {
×
NEW
1124
            this.extraParams = new HashMap<>();
×
1125
          }
NEW
1126
          this.extraParams.put(key, value);
×
NEW
1127
          return this;
×
1128
        }
1129

1130
        /**
1131
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1132
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1133
         * map. See {@link
1134
         * PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address#extraParams} for the
1135
         * field documentation.
1136
         */
1137
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1138
          if (this.extraParams == null) {
×
NEW
1139
            this.extraParams = new HashMap<>();
×
1140
          }
NEW
1141
          this.extraParams.putAll(map);
×
NEW
1142
          return this;
×
1143
        }
1144

1145
        /** Address line 1 (e.g., street, PO Box, or company name). */
1146
        public Builder setLine1(String line1) {
NEW
1147
          this.line1 = line1;
×
NEW
1148
          return this;
×
1149
        }
1150

1151
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
1152
        public Builder setLine2(String line2) {
NEW
1153
          this.line2 = line2;
×
NEW
1154
          return this;
×
1155
        }
1156

1157
        /** ZIP or postal code. */
1158
        public Builder setPostalCode(String postalCode) {
NEW
1159
          this.postalCode = postalCode;
×
NEW
1160
          return this;
×
1161
        }
1162

1163
        /** State, county, province, or region. */
1164
        public Builder setState(String state) {
NEW
1165
          this.state = state;
×
NEW
1166
          return this;
×
1167
        }
1168
      }
1169
    }
1170
  }
1171

NEW
1172
  public enum Outcome implements ApiRequestParams.EnumParam {
×
NEW
1173
    @SerializedName("failed")
×
1174
    FAILED("failed"),
1175

NEW
1176
    @SerializedName("guaranteed")
×
1177
    GUARANTEED("guaranteed");
1178

1179
    @Getter(onMethod_ = {@Override})
1180
    private final String value;
1181

NEW
1182
    Outcome(String value) {
×
NEW
1183
      this.value = value;
×
NEW
1184
    }
×
1185
  }
1186
}
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