• 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/PaymentRecordReportPaymentParams.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 PaymentRecordReportPaymentParams extends ApiRequestParams {
14
  /** <strong>Required.</strong> The amount you intend to collect for this payment. */
15
  @SerializedName("amount_requested")
16
  AmountRequested amountRequested;
17

18
  /** Customer information for this payment. */
19
  @SerializedName("customer_details")
20
  CustomerDetails customerDetails;
21

22
  /** Indicates whether the customer was present in your checkout flow during this payment. */
23
  @SerializedName("customer_presence")
24
  CustomerPresence customerPresence;
25

26
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
27
  @SerializedName("description")
28
  String description;
29

30
  /** Specifies which fields in the response should be expanded. */
31
  @SerializedName("expand")
32
  List<String> expand;
33

34
  /**
35
   * Map of extra parameters for custom features not available in this client library. The content
36
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
37
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
38
   * param object. Effectively, this map is flattened to its parent instance.
39
   */
40
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
41
  Map<String, Object> extraParams;
42

43
  /** Information about the payment attempt failure. */
44
  @SerializedName("failed")
45
  Failed failed;
46

47
  /** Information about the payment attempt guarantee. */
48
  @SerializedName("guaranteed")
49
  Guaranteed guaranteed;
50

51
  /**
52
   * <strong>Required.</strong> When the reported payment was initiated. Measured in seconds since
53
   * the Unix epoch.
54
   */
55
  @SerializedName("initiated_at")
56
  Long initiatedAt;
57

58
  /**
59
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
60
   * to an object. This can be useful for storing additional information about the object in a
61
   * structured format. Individual keys can be unset by posting an empty value to them. All keys can
62
   * be unset by posting an empty value to {@code metadata}.
63
   */
64
  @SerializedName("metadata")
65
  Map<String, String> metadata;
66

67
  /** The outcome of the reported payment. */
68
  @SerializedName("outcome")
69
  Outcome outcome;
70

71
  /** <strong>Required.</strong> Information about the Payment Method debited for this payment. */
72
  @SerializedName("payment_method_details")
73
  PaymentMethodDetails paymentMethodDetails;
74

75
  /**
76
   * <strong>Required.</strong> An opaque string for manual reconciliation of this payment, for
77
   * example a check number or a payment processor ID.
78
   */
79
  @SerializedName("payment_reference")
80
  String paymentReference;
81

82
  /** Shipping information for this payment. */
83
  @SerializedName("shipping_details")
84
  ShippingDetails shippingDetails;
85

86
  private PaymentRecordReportPaymentParams(
87
      AmountRequested amountRequested,
88
      CustomerDetails customerDetails,
89
      CustomerPresence customerPresence,
90
      String description,
91
      List<String> expand,
92
      Map<String, Object> extraParams,
93
      Failed failed,
94
      Guaranteed guaranteed,
95
      Long initiatedAt,
96
      Map<String, String> metadata,
97
      Outcome outcome,
98
      PaymentMethodDetails paymentMethodDetails,
99
      String paymentReference,
NEW
100
      ShippingDetails shippingDetails) {
×
NEW
101
    this.amountRequested = amountRequested;
×
NEW
102
    this.customerDetails = customerDetails;
×
NEW
103
    this.customerPresence = customerPresence;
×
NEW
104
    this.description = description;
×
NEW
105
    this.expand = expand;
×
NEW
106
    this.extraParams = extraParams;
×
NEW
107
    this.failed = failed;
×
NEW
108
    this.guaranteed = guaranteed;
×
NEW
109
    this.initiatedAt = initiatedAt;
×
NEW
110
    this.metadata = metadata;
×
NEW
111
    this.outcome = outcome;
×
NEW
112
    this.paymentMethodDetails = paymentMethodDetails;
×
NEW
113
    this.paymentReference = paymentReference;
×
NEW
114
    this.shippingDetails = shippingDetails;
×
NEW
115
  }
×
116

117
  public static Builder builder() {
NEW
118
    return new Builder();
×
119
  }
120

NEW
121
  public static class Builder {
×
122
    private AmountRequested amountRequested;
123

124
    private CustomerDetails customerDetails;
125

126
    private CustomerPresence customerPresence;
127

128
    private String description;
129

130
    private List<String> expand;
131

132
    private Map<String, Object> extraParams;
133

134
    private Failed failed;
135

136
    private Guaranteed guaranteed;
137

138
    private Long initiatedAt;
139

140
    private Map<String, String> metadata;
141

142
    private Outcome outcome;
143

144
    private PaymentMethodDetails paymentMethodDetails;
145

146
    private String paymentReference;
147

148
    private ShippingDetails shippingDetails;
149

150
    /** Finalize and obtain parameter instance from this builder. */
151
    public PaymentRecordReportPaymentParams build() {
NEW
152
      return new PaymentRecordReportPaymentParams(
×
153
          this.amountRequested,
154
          this.customerDetails,
155
          this.customerPresence,
156
          this.description,
157
          this.expand,
158
          this.extraParams,
159
          this.failed,
160
          this.guaranteed,
161
          this.initiatedAt,
162
          this.metadata,
163
          this.outcome,
164
          this.paymentMethodDetails,
165
          this.paymentReference,
166
          this.shippingDetails);
167
    }
168

169
    /** <strong>Required.</strong> The amount you intend to collect for this payment. */
170
    public Builder setAmountRequested(
171
        PaymentRecordReportPaymentParams.AmountRequested amountRequested) {
NEW
172
      this.amountRequested = amountRequested;
×
NEW
173
      return this;
×
174
    }
175

176
    /** Customer information for this payment. */
177
    public Builder setCustomerDetails(
178
        PaymentRecordReportPaymentParams.CustomerDetails customerDetails) {
NEW
179
      this.customerDetails = customerDetails;
×
NEW
180
      return this;
×
181
    }
182

183
    /** Indicates whether the customer was present in your checkout flow during this payment. */
184
    public Builder setCustomerPresence(
185
        PaymentRecordReportPaymentParams.CustomerPresence customerPresence) {
NEW
186
      this.customerPresence = customerPresence;
×
NEW
187
      return this;
×
188
    }
189

190
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
191
    public Builder setDescription(String description) {
NEW
192
      this.description = description;
×
NEW
193
      return this;
×
194
    }
195

196
    /**
197
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
198
     * subsequent calls adds additional elements to the original list. See {@link
199
     * PaymentRecordReportPaymentParams#expand} for the field documentation.
200
     */
201
    public Builder addExpand(String element) {
NEW
202
      if (this.expand == null) {
×
NEW
203
        this.expand = new ArrayList<>();
×
204
      }
NEW
205
      this.expand.add(element);
×
NEW
206
      return this;
×
207
    }
208

209
    /**
210
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
211
     * subsequent calls adds additional elements to the original list. See {@link
212
     * PaymentRecordReportPaymentParams#expand} for the field documentation.
213
     */
214
    public Builder addAllExpand(List<String> elements) {
NEW
215
      if (this.expand == null) {
×
NEW
216
        this.expand = new ArrayList<>();
×
217
      }
NEW
218
      this.expand.addAll(elements);
×
NEW
219
      return this;
×
220
    }
221

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

235
    /**
236
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
237
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
238
     * See {@link PaymentRecordReportPaymentParams#extraParams} for the field documentation.
239
     */
240
    public Builder putAllExtraParam(Map<String, Object> map) {
NEW
241
      if (this.extraParams == null) {
×
NEW
242
        this.extraParams = new HashMap<>();
×
243
      }
NEW
244
      this.extraParams.putAll(map);
×
NEW
245
      return this;
×
246
    }
247

248
    /** Information about the payment attempt failure. */
249
    public Builder setFailed(PaymentRecordReportPaymentParams.Failed failed) {
NEW
250
      this.failed = failed;
×
NEW
251
      return this;
×
252
    }
253

254
    /** Information about the payment attempt guarantee. */
255
    public Builder setGuaranteed(PaymentRecordReportPaymentParams.Guaranteed guaranteed) {
NEW
256
      this.guaranteed = guaranteed;
×
NEW
257
      return this;
×
258
    }
259

260
    /**
261
     * <strong>Required.</strong> When the reported payment was initiated. Measured in seconds since
262
     * the Unix epoch.
263
     */
264
    public Builder setInitiatedAt(Long initiatedAt) {
NEW
265
      this.initiatedAt = initiatedAt;
×
NEW
266
      return this;
×
267
    }
268

269
    /**
270
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
271
     * and subsequent calls add additional key/value pairs to the original map. See {@link
272
     * PaymentRecordReportPaymentParams#metadata} for the field documentation.
273
     */
274
    public Builder putMetadata(String key, String value) {
NEW
275
      if (this.metadata == null) {
×
NEW
276
        this.metadata = new HashMap<>();
×
277
      }
NEW
278
      this.metadata.put(key, value);
×
NEW
279
      return this;
×
280
    }
281

282
    /**
283
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
284
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
285
     * See {@link PaymentRecordReportPaymentParams#metadata} for the field documentation.
286
     */
287
    public Builder putAllMetadata(Map<String, String> map) {
NEW
288
      if (this.metadata == null) {
×
NEW
289
        this.metadata = new HashMap<>();
×
290
      }
NEW
291
      this.metadata.putAll(map);
×
NEW
292
      return this;
×
293
    }
294

295
    /** The outcome of the reported payment. */
296
    public Builder setOutcome(PaymentRecordReportPaymentParams.Outcome outcome) {
NEW
297
      this.outcome = outcome;
×
NEW
298
      return this;
×
299
    }
300

301
    /** <strong>Required.</strong> Information about the Payment Method debited for this payment. */
302
    public Builder setPaymentMethodDetails(
303
        PaymentRecordReportPaymentParams.PaymentMethodDetails paymentMethodDetails) {
NEW
304
      this.paymentMethodDetails = paymentMethodDetails;
×
NEW
305
      return this;
×
306
    }
307

308
    /**
309
     * <strong>Required.</strong> An opaque string for manual reconciliation of this payment, for
310
     * example a check number or a payment processor ID.
311
     */
312
    public Builder setPaymentReference(String paymentReference) {
NEW
313
      this.paymentReference = paymentReference;
×
NEW
314
      return this;
×
315
    }
316

317
    /** Shipping information for this payment. */
318
    public Builder setShippingDetails(
319
        PaymentRecordReportPaymentParams.ShippingDetails shippingDetails) {
NEW
320
      this.shippingDetails = shippingDetails;
×
NEW
321
      return this;
×
322
    }
323
  }
324

325
  @Getter
326
  public static class AmountRequested {
327
    /**
328
     * <strong>Required.</strong> Three-letter <a
329
     * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
330
     * Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
331
     */
332
    @SerializedName("currency")
333
    String currency;
334

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

344
    /**
345
     * <strong>Required.</strong> A positive integer representing the amount in the <a
346
     * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
347
     * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
348
     */
349
    @SerializedName("value")
350
    Long value;
351

NEW
352
    private AmountRequested(String currency, Map<String, Object> extraParams, Long value) {
×
NEW
353
      this.currency = currency;
×
NEW
354
      this.extraParams = extraParams;
×
NEW
355
      this.value = value;
×
NEW
356
    }
×
357

358
    public static Builder builder() {
NEW
359
      return new Builder();
×
360
    }
361

NEW
362
    public static class Builder {
×
363
      private String currency;
364

365
      private Map<String, Object> extraParams;
366

367
      private Long value;
368

369
      /** Finalize and obtain parameter instance from this builder. */
370
      public PaymentRecordReportPaymentParams.AmountRequested build() {
NEW
371
        return new PaymentRecordReportPaymentParams.AmountRequested(
×
372
            this.currency, this.extraParams, this.value);
373
      }
374

375
      /**
376
       * <strong>Required.</strong> Three-letter <a
377
       * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in
378
       * lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
379
       */
380
      public Builder setCurrency(String currency) {
NEW
381
        this.currency = currency;
×
NEW
382
        return this;
×
383
      }
384

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

398
      /**
399
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
400
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
401
       * See {@link PaymentRecordReportPaymentParams.AmountRequested#extraParams} for the field
402
       * documentation.
403
       */
404
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
405
        if (this.extraParams == null) {
×
NEW
406
          this.extraParams = new HashMap<>();
×
407
        }
NEW
408
        this.extraParams.putAll(map);
×
NEW
409
        return this;
×
410
      }
411

412
      /**
413
       * <strong>Required.</strong> A positive integer representing the amount in the <a
414
       * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> e.g., 100
415
       * cents for $1.00 or 100 for ¥100, a zero-decimal currency).
416
       */
417
      public Builder setValue(Long value) {
NEW
418
        this.value = value;
×
NEW
419
        return this;
×
420
      }
421
    }
422
  }
423

424
  @Getter
425
  public static class CustomerDetails {
426
    /** The customer who made the payment. */
427
    @SerializedName("customer")
428
    String customer;
429

430
    /** The customer's phone number. */
431
    @SerializedName("email")
432
    String email;
433

434
    /**
435
     * Map of extra parameters for custom features not available in this client library. The content
436
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
437
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
438
     * param object. Effectively, this map is flattened to its parent instance.
439
     */
440
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
441
    Map<String, Object> extraParams;
442

443
    /** The customer's name. */
444
    @SerializedName("name")
445
    String name;
446

447
    /** The customer's phone number. */
448
    @SerializedName("phone")
449
    String phone;
450

451
    private CustomerDetails(
NEW
452
        String customer, String email, Map<String, Object> extraParams, String name, String phone) {
×
NEW
453
      this.customer = customer;
×
NEW
454
      this.email = email;
×
NEW
455
      this.extraParams = extraParams;
×
NEW
456
      this.name = name;
×
NEW
457
      this.phone = phone;
×
NEW
458
    }
×
459

460
    public static Builder builder() {
NEW
461
      return new Builder();
×
462
    }
463

NEW
464
    public static class Builder {
×
465
      private String customer;
466

467
      private String email;
468

469
      private Map<String, Object> extraParams;
470

471
      private String name;
472

473
      private String phone;
474

475
      /** Finalize and obtain parameter instance from this builder. */
476
      public PaymentRecordReportPaymentParams.CustomerDetails build() {
NEW
477
        return new PaymentRecordReportPaymentParams.CustomerDetails(
×
478
            this.customer, this.email, this.extraParams, this.name, this.phone);
479
      }
480

481
      /** The customer who made the payment. */
482
      public Builder setCustomer(String customer) {
NEW
483
        this.customer = customer;
×
NEW
484
        return this;
×
485
      }
486

487
      /** The customer's phone number. */
488
      public Builder setEmail(String email) {
NEW
489
        this.email = email;
×
NEW
490
        return this;
×
491
      }
492

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

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

520
      /** The customer's name. */
521
      public Builder setName(String name) {
NEW
522
        this.name = name;
×
NEW
523
        return this;
×
524
      }
525

526
      /** The customer's phone number. */
527
      public Builder setPhone(String phone) {
NEW
528
        this.phone = phone;
×
NEW
529
        return this;
×
530
      }
531
    }
532
  }
533

534
  @Getter
535
  public static class Failed {
536
    /**
537
     * Map of extra parameters for custom features not available in this client library. The content
538
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
539
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
540
     * param object. Effectively, this map is flattened to its parent instance.
541
     */
542
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
543
    Map<String, Object> extraParams;
544

545
    /**
546
     * <strong>Required.</strong> When the reported payment failed. Measured in seconds since the
547
     * Unix epoch.
548
     */
549
    @SerializedName("failed_at")
550
    Long failedAt;
551

NEW
552
    private Failed(Map<String, Object> extraParams, Long failedAt) {
×
NEW
553
      this.extraParams = extraParams;
×
NEW
554
      this.failedAt = failedAt;
×
NEW
555
    }
×
556

557
    public static Builder builder() {
NEW
558
      return new Builder();
×
559
    }
560

NEW
561
    public static class Builder {
×
562
      private Map<String, Object> extraParams;
563

564
      private Long failedAt;
565

566
      /** Finalize and obtain parameter instance from this builder. */
567
      public PaymentRecordReportPaymentParams.Failed build() {
NEW
568
        return new PaymentRecordReportPaymentParams.Failed(this.extraParams, this.failedAt);
×
569
      }
570

571
      /**
572
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
573
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
574
       * PaymentRecordReportPaymentParams.Failed#extraParams} for the field documentation.
575
       */
576
      public Builder putExtraParam(String key, Object value) {
NEW
577
        if (this.extraParams == null) {
×
NEW
578
          this.extraParams = new HashMap<>();
×
579
        }
NEW
580
        this.extraParams.put(key, value);
×
NEW
581
        return this;
×
582
      }
583

584
      /**
585
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
586
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
587
       * See {@link PaymentRecordReportPaymentParams.Failed#extraParams} for the field
588
       * documentation.
589
       */
590
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
591
        if (this.extraParams == null) {
×
NEW
592
          this.extraParams = new HashMap<>();
×
593
        }
NEW
594
        this.extraParams.putAll(map);
×
NEW
595
        return this;
×
596
      }
597

598
      /**
599
       * <strong>Required.</strong> When the reported payment failed. Measured in seconds since the
600
       * Unix epoch.
601
       */
602
      public Builder setFailedAt(Long failedAt) {
NEW
603
        this.failedAt = failedAt;
×
NEW
604
        return this;
×
605
      }
606
    }
607
  }
608

609
  @Getter
610
  public static class Guaranteed {
611
    /**
612
     * Map of extra parameters for custom features not available in this client library. The content
613
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
614
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
615
     * param object. Effectively, this map is flattened to its parent instance.
616
     */
617
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
618
    Map<String, Object> extraParams;
619

620
    /**
621
     * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds
622
     * since the Unix epoch.
623
     */
624
    @SerializedName("guaranteed_at")
625
    Long guaranteedAt;
626

NEW
627
    private Guaranteed(Map<String, Object> extraParams, Long guaranteedAt) {
×
NEW
628
      this.extraParams = extraParams;
×
NEW
629
      this.guaranteedAt = guaranteedAt;
×
NEW
630
    }
×
631

632
    public static Builder builder() {
NEW
633
      return new Builder();
×
634
    }
635

NEW
636
    public static class Builder {
×
637
      private Map<String, Object> extraParams;
638

639
      private Long guaranteedAt;
640

641
      /** Finalize and obtain parameter instance from this builder. */
642
      public PaymentRecordReportPaymentParams.Guaranteed build() {
NEW
643
        return new PaymentRecordReportPaymentParams.Guaranteed(this.extraParams, this.guaranteedAt);
×
644
      }
645

646
      /**
647
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
648
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
649
       * PaymentRecordReportPaymentParams.Guaranteed#extraParams} for the field documentation.
650
       */
651
      public Builder putExtraParam(String key, Object value) {
NEW
652
        if (this.extraParams == null) {
×
NEW
653
          this.extraParams = new HashMap<>();
×
654
        }
NEW
655
        this.extraParams.put(key, value);
×
NEW
656
        return this;
×
657
      }
658

659
      /**
660
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
661
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
662
       * See {@link PaymentRecordReportPaymentParams.Guaranteed#extraParams} for the field
663
       * documentation.
664
       */
665
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
666
        if (this.extraParams == null) {
×
NEW
667
          this.extraParams = new HashMap<>();
×
668
        }
NEW
669
        this.extraParams.putAll(map);
×
NEW
670
        return this;
×
671
      }
672

673
      /**
674
       * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds
675
       * since the Unix epoch.
676
       */
677
      public Builder setGuaranteedAt(Long guaranteedAt) {
NEW
678
        this.guaranteedAt = guaranteedAt;
×
NEW
679
        return this;
×
680
      }
681
    }
682
  }
683

684
  @Getter
685
  public static class PaymentMethodDetails {
686
    /** The billing details associated with the method of payment. */
687
    @SerializedName("billing_details")
688
    BillingDetails billingDetails;
689

690
    /** Information about the custom (user-defined) payment method used to make this payment. */
691
    @SerializedName("custom")
692
    Custom custom;
693

694
    /**
695
     * Map of extra parameters for custom features not available in this client library. The content
696
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
697
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
698
     * param object. Effectively, this map is flattened to its parent instance.
699
     */
700
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
701
    Map<String, Object> extraParams;
702

703
    /** ID of the Stripe Payment Method used to make this payment. */
704
    @SerializedName("payment_method")
705
    String paymentMethod;
706

707
    /**
708
     * The type of the payment method details. An additional hash is included on the
709
     * payment_method_details with a name matching this value. It contains additional information
710
     * specific to the type.
711
     */
712
    @SerializedName("type")
713
    Type type;
714

715
    private PaymentMethodDetails(
716
        BillingDetails billingDetails,
717
        Custom custom,
718
        Map<String, Object> extraParams,
719
        String paymentMethod,
NEW
720
        Type type) {
×
NEW
721
      this.billingDetails = billingDetails;
×
NEW
722
      this.custom = custom;
×
NEW
723
      this.extraParams = extraParams;
×
NEW
724
      this.paymentMethod = paymentMethod;
×
NEW
725
      this.type = type;
×
NEW
726
    }
×
727

728
    public static Builder builder() {
NEW
729
      return new Builder();
×
730
    }
731

NEW
732
    public static class Builder {
×
733
      private BillingDetails billingDetails;
734

735
      private Custom custom;
736

737
      private Map<String, Object> extraParams;
738

739
      private String paymentMethod;
740

741
      private Type type;
742

743
      /** Finalize and obtain parameter instance from this builder. */
744
      public PaymentRecordReportPaymentParams.PaymentMethodDetails build() {
NEW
745
        return new PaymentRecordReportPaymentParams.PaymentMethodDetails(
×
746
            this.billingDetails, this.custom, this.extraParams, this.paymentMethod, this.type);
747
      }
748

749
      /** The billing details associated with the method of payment. */
750
      public Builder setBillingDetails(
751
          PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails billingDetails) {
NEW
752
        this.billingDetails = billingDetails;
×
NEW
753
        return this;
×
754
      }
755

756
      /** Information about the custom (user-defined) payment method used to make this payment. */
757
      public Builder setCustom(
758
          PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom custom) {
NEW
759
        this.custom = custom;
×
NEW
760
        return this;
×
761
      }
762

763
      /**
764
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
765
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
766
       * PaymentRecordReportPaymentParams.PaymentMethodDetails#extraParams} for the field
767
       * documentation.
768
       */
769
      public Builder putExtraParam(String key, Object value) {
NEW
770
        if (this.extraParams == null) {
×
NEW
771
          this.extraParams = new HashMap<>();
×
772
        }
NEW
773
        this.extraParams.put(key, value);
×
NEW
774
        return this;
×
775
      }
776

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

791
      /** ID of the Stripe Payment Method used to make this payment. */
792
      public Builder setPaymentMethod(String paymentMethod) {
NEW
793
        this.paymentMethod = paymentMethod;
×
NEW
794
        return this;
×
795
      }
796

797
      /**
798
       * The type of the payment method details. An additional hash is included on the
799
       * payment_method_details with a name matching this value. It contains additional information
800
       * specific to the type.
801
       */
802
      public Builder setType(PaymentRecordReportPaymentParams.PaymentMethodDetails.Type type) {
NEW
803
        this.type = type;
×
NEW
804
        return this;
×
805
      }
806
    }
807

808
    @Getter
809
    public static class BillingDetails {
810
      /** The billing address associated with the method of payment. */
811
      @SerializedName("address")
812
      Address address;
813

814
      /** The billing email associated with the method of payment. */
815
      @SerializedName("email")
816
      String email;
817

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

827
      /** The billing name associated with the method of payment. */
828
      @SerializedName("name")
829
      String name;
830

831
      /** The billing phone number associated with the method of payment. */
832
      @SerializedName("phone")
833
      String phone;
834

835
      private BillingDetails(
836
          Address address,
837
          String email,
838
          Map<String, Object> extraParams,
839
          String name,
NEW
840
          String phone) {
×
NEW
841
        this.address = address;
×
NEW
842
        this.email = email;
×
NEW
843
        this.extraParams = extraParams;
×
NEW
844
        this.name = name;
×
NEW
845
        this.phone = phone;
×
NEW
846
      }
×
847

848
      public static Builder builder() {
NEW
849
        return new Builder();
×
850
      }
851

NEW
852
      public static class Builder {
×
853
        private Address address;
854

855
        private String email;
856

857
        private Map<String, Object> extraParams;
858

859
        private String name;
860

861
        private String phone;
862

863
        /** Finalize and obtain parameter instance from this builder. */
864
        public PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails build() {
NEW
865
          return new PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails(
×
866
              this.address, this.email, this.extraParams, this.name, this.phone);
867
        }
868

869
        /** The billing address associated with the method of payment. */
870
        public Builder setAddress(
871
            PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address address) {
NEW
872
          this.address = address;
×
NEW
873
          return this;
×
874
        }
875

876
        /** The billing email associated with the method of payment. */
877
        public Builder setEmail(String email) {
NEW
878
          this.email = email;
×
NEW
879
          return this;
×
880
        }
881

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

897
        /**
898
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
899
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
900
         * map. See {@link
901
         * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails#extraParams} for the
902
         * field documentation.
903
         */
904
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
905
          if (this.extraParams == null) {
×
NEW
906
            this.extraParams = new HashMap<>();
×
907
          }
NEW
908
          this.extraParams.putAll(map);
×
NEW
909
          return this;
×
910
        }
911

912
        /** The billing name associated with the method of payment. */
913
        public Builder setName(String name) {
NEW
914
          this.name = name;
×
NEW
915
          return this;
×
916
        }
917

918
        /** The billing phone number associated with the method of payment. */
919
        public Builder setPhone(String phone) {
NEW
920
          this.phone = phone;
×
NEW
921
          return this;
×
922
        }
923
      }
924

925
      @Getter
926
      public static class Address {
927
        /** City, district, suburb, town, or village. */
928
        @SerializedName("city")
929
        String city;
930

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

938
        /**
939
         * Map of extra parameters for custom features not available in this client library. The
940
         * content in this map is not serialized under this field's {@code @SerializedName} value.
941
         * Instead, each key/value pair is serialized as if the key is a root-level field
942
         * (serialized) name in this param object. Effectively, this map is flattened to its parent
943
         * instance.
944
         */
945
        @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
946
        Map<String, Object> extraParams;
947

948
        /** Address line 1 (e.g., street, PO Box, or company name). */
949
        @SerializedName("line1")
950
        String line1;
951

952
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
953
        @SerializedName("line2")
954
        String line2;
955

956
        /** ZIP or postal code. */
957
        @SerializedName("postal_code")
958
        String postalCode;
959

960
        /** State, county, province, or region. */
961
        @SerializedName("state")
962
        String state;
963

964
        private Address(
965
            String city,
966
            String country,
967
            Map<String, Object> extraParams,
968
            String line1,
969
            String line2,
970
            String postalCode,
NEW
971
            String state) {
×
NEW
972
          this.city = city;
×
NEW
973
          this.country = country;
×
NEW
974
          this.extraParams = extraParams;
×
NEW
975
          this.line1 = line1;
×
NEW
976
          this.line2 = line2;
×
NEW
977
          this.postalCode = postalCode;
×
NEW
978
          this.state = state;
×
NEW
979
        }
×
980

981
        public static Builder builder() {
NEW
982
          return new Builder();
×
983
        }
984

NEW
985
        public static class Builder {
×
986
          private String city;
987

988
          private String country;
989

990
          private Map<String, Object> extraParams;
991

992
          private String line1;
993

994
          private String line2;
995

996
          private String postalCode;
997

998
          private String state;
999

1000
          /** Finalize and obtain parameter instance from this builder. */
1001
          public PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address
1002
              build() {
NEW
1003
            return new PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address(
×
1004
                this.city,
1005
                this.country,
1006
                this.extraParams,
1007
                this.line1,
1008
                this.line2,
1009
                this.postalCode,
1010
                this.state);
1011
          }
1012

1013
          /** City, district, suburb, town, or village. */
1014
          public Builder setCity(String city) {
NEW
1015
            this.city = city;
×
NEW
1016
            return this;
×
1017
          }
1018

1019
          /**
1020
           * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1021
           * 3166-1 alpha-2</a>).
1022
           */
1023
          public Builder setCountry(String country) {
NEW
1024
            this.country = country;
×
NEW
1025
            return this;
×
1026
          }
1027

1028
          /**
1029
           * Add a key/value pair to `extraParams` map. A map is initialized for the first
1030
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1031
           * map. See {@link
1032
           * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address#extraParams}
1033
           * for the field documentation.
1034
           */
1035
          public Builder putExtraParam(String key, Object value) {
NEW
1036
            if (this.extraParams == null) {
×
NEW
1037
              this.extraParams = new HashMap<>();
×
1038
            }
NEW
1039
            this.extraParams.put(key, value);
×
NEW
1040
            return this;
×
1041
          }
1042

1043
          /**
1044
           * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1045
           * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1046
           * map. See {@link
1047
           * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address#extraParams}
1048
           * for the field documentation.
1049
           */
1050
          public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1051
            if (this.extraParams == null) {
×
NEW
1052
              this.extraParams = new HashMap<>();
×
1053
            }
NEW
1054
            this.extraParams.putAll(map);
×
NEW
1055
            return this;
×
1056
          }
1057

1058
          /** Address line 1 (e.g., street, PO Box, or company name). */
1059
          public Builder setLine1(String line1) {
NEW
1060
            this.line1 = line1;
×
NEW
1061
            return this;
×
1062
          }
1063

1064
          /** Address line 2 (e.g., apartment, suite, unit, or building). */
1065
          public Builder setLine2(String line2) {
NEW
1066
            this.line2 = line2;
×
NEW
1067
            return this;
×
1068
          }
1069

1070
          /** ZIP or postal code. */
1071
          public Builder setPostalCode(String postalCode) {
NEW
1072
            this.postalCode = postalCode;
×
NEW
1073
            return this;
×
1074
          }
1075

1076
          /** State, county, province, or region. */
1077
          public Builder setState(String state) {
NEW
1078
            this.state = state;
×
NEW
1079
            return this;
×
1080
          }
1081
        }
1082
      }
1083
    }
1084

1085
    @Getter
1086
    public static class Custom {
1087
      /**
1088
       * Display name for the custom (user-defined) payment method type used to make this payment.
1089
       */
1090
      @SerializedName("display_name")
1091
      String displayName;
1092

1093
      /**
1094
       * Map of extra parameters for custom features not available in this client library. The
1095
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1096
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1097
       * name in this param object. Effectively, this map is flattened to its parent instance.
1098
       */
1099
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1100
      Map<String, Object> extraParams;
1101

1102
      /** The custom payment method type associated with this payment. */
1103
      @SerializedName("type")
1104
      String type;
1105

NEW
1106
      private Custom(String displayName, Map<String, Object> extraParams, String type) {
×
NEW
1107
        this.displayName = displayName;
×
NEW
1108
        this.extraParams = extraParams;
×
NEW
1109
        this.type = type;
×
NEW
1110
      }
×
1111

1112
      public static Builder builder() {
NEW
1113
        return new Builder();
×
1114
      }
1115

NEW
1116
      public static class Builder {
×
1117
        private String displayName;
1118

1119
        private Map<String, Object> extraParams;
1120

1121
        private String type;
1122

1123
        /** Finalize and obtain parameter instance from this builder. */
1124
        public PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom build() {
NEW
1125
          return new PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom(
×
1126
              this.displayName, this.extraParams, this.type);
1127
        }
1128

1129
        /**
1130
         * Display name for the custom (user-defined) payment method type used to make this payment.
1131
         */
1132
        public Builder setDisplayName(String displayName) {
NEW
1133
          this.displayName = displayName;
×
NEW
1134
          return this;
×
1135
        }
1136

1137
        /**
1138
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1139
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1140
         * map. See {@link PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom#extraParams}
1141
         * for the field documentation.
1142
         */
1143
        public Builder putExtraParam(String key, Object value) {
NEW
1144
          if (this.extraParams == null) {
×
NEW
1145
            this.extraParams = new HashMap<>();
×
1146
          }
NEW
1147
          this.extraParams.put(key, value);
×
NEW
1148
          return this;
×
1149
        }
1150

1151
        /**
1152
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1153
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1154
         * map. See {@link PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom#extraParams}
1155
         * for the field documentation.
1156
         */
1157
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1158
          if (this.extraParams == null) {
×
NEW
1159
            this.extraParams = new HashMap<>();
×
1160
          }
NEW
1161
          this.extraParams.putAll(map);
×
NEW
1162
          return this;
×
1163
        }
1164

1165
        /** The custom payment method type associated with this payment. */
1166
        public Builder setType(String type) {
NEW
1167
          this.type = type;
×
NEW
1168
          return this;
×
1169
        }
1170
      }
1171
    }
1172

NEW
1173
    public enum Type implements ApiRequestParams.EnumParam {
×
NEW
1174
      @SerializedName("custom")
×
1175
      CUSTOM("custom");
1176

1177
      @Getter(onMethod_ = {@Override})
1178
      private final String value;
1179

NEW
1180
      Type(String value) {
×
NEW
1181
        this.value = value;
×
NEW
1182
      }
×
1183
    }
1184
  }
1185

1186
  @Getter
1187
  public static class ShippingDetails {
1188
    /** The physical shipping address. */
1189
    @SerializedName("address")
1190
    Address address;
1191

1192
    /**
1193
     * Map of extra parameters for custom features not available in this client library. The content
1194
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1195
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
1196
     * param object. Effectively, this map is flattened to its parent instance.
1197
     */
1198
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1199
    Map<String, Object> extraParams;
1200

1201
    /** The shipping recipient's name. */
1202
    @SerializedName("name")
1203
    String name;
1204

1205
    /** The shipping recipient's phone number. */
1206
    @SerializedName("phone")
1207
    String phone;
1208

1209
    private ShippingDetails(
NEW
1210
        Address address, Map<String, Object> extraParams, String name, String phone) {
×
NEW
1211
      this.address = address;
×
NEW
1212
      this.extraParams = extraParams;
×
NEW
1213
      this.name = name;
×
NEW
1214
      this.phone = phone;
×
NEW
1215
    }
×
1216

1217
    public static Builder builder() {
NEW
1218
      return new Builder();
×
1219
    }
1220

NEW
1221
    public static class Builder {
×
1222
      private Address address;
1223

1224
      private Map<String, Object> extraParams;
1225

1226
      private String name;
1227

1228
      private String phone;
1229

1230
      /** Finalize and obtain parameter instance from this builder. */
1231
      public PaymentRecordReportPaymentParams.ShippingDetails build() {
NEW
1232
        return new PaymentRecordReportPaymentParams.ShippingDetails(
×
1233
            this.address, this.extraParams, this.name, this.phone);
1234
      }
1235

1236
      /** The physical shipping address. */
1237
      public Builder setAddress(PaymentRecordReportPaymentParams.ShippingDetails.Address address) {
NEW
1238
        this.address = address;
×
NEW
1239
        return this;
×
1240
      }
1241

1242
      /**
1243
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1244
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
1245
       * PaymentRecordReportPaymentParams.ShippingDetails#extraParams} for the field documentation.
1246
       */
1247
      public Builder putExtraParam(String key, Object value) {
NEW
1248
        if (this.extraParams == null) {
×
NEW
1249
          this.extraParams = new HashMap<>();
×
1250
        }
NEW
1251
        this.extraParams.put(key, value);
×
NEW
1252
        return this;
×
1253
      }
1254

1255
      /**
1256
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1257
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1258
       * See {@link PaymentRecordReportPaymentParams.ShippingDetails#extraParams} for the field
1259
       * documentation.
1260
       */
1261
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1262
        if (this.extraParams == null) {
×
NEW
1263
          this.extraParams = new HashMap<>();
×
1264
        }
NEW
1265
        this.extraParams.putAll(map);
×
NEW
1266
        return this;
×
1267
      }
1268

1269
      /** The shipping recipient's name. */
1270
      public Builder setName(String name) {
NEW
1271
        this.name = name;
×
NEW
1272
        return this;
×
1273
      }
1274

1275
      /** The shipping recipient's phone number. */
1276
      public Builder setPhone(String phone) {
NEW
1277
        this.phone = phone;
×
NEW
1278
        return this;
×
1279
      }
1280
    }
1281

1282
    @Getter
1283
    public static class Address {
1284
      /** City, district, suburb, town, or village. */
1285
      @SerializedName("city")
1286
      String city;
1287

1288
      /**
1289
       * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1290
       * 3166-1 alpha-2</a>).
1291
       */
1292
      @SerializedName("country")
1293
      String country;
1294

1295
      /**
1296
       * Map of extra parameters for custom features not available in this client library. The
1297
       * content in this map is not serialized under this field's {@code @SerializedName} value.
1298
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1299
       * name in this param object. Effectively, this map is flattened to its parent instance.
1300
       */
1301
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1302
      Map<String, Object> extraParams;
1303

1304
      /** Address line 1 (e.g., street, PO Box, or company name). */
1305
      @SerializedName("line1")
1306
      String line1;
1307

1308
      /** Address line 2 (e.g., apartment, suite, unit, or building). */
1309
      @SerializedName("line2")
1310
      String line2;
1311

1312
      /** ZIP or postal code. */
1313
      @SerializedName("postal_code")
1314
      String postalCode;
1315

1316
      /** State, county, province, or region. */
1317
      @SerializedName("state")
1318
      String state;
1319

1320
      private Address(
1321
          String city,
1322
          String country,
1323
          Map<String, Object> extraParams,
1324
          String line1,
1325
          String line2,
1326
          String postalCode,
NEW
1327
          String state) {
×
NEW
1328
        this.city = city;
×
NEW
1329
        this.country = country;
×
NEW
1330
        this.extraParams = extraParams;
×
NEW
1331
        this.line1 = line1;
×
NEW
1332
        this.line2 = line2;
×
NEW
1333
        this.postalCode = postalCode;
×
NEW
1334
        this.state = state;
×
NEW
1335
      }
×
1336

1337
      public static Builder builder() {
NEW
1338
        return new Builder();
×
1339
      }
1340

NEW
1341
      public static class Builder {
×
1342
        private String city;
1343

1344
        private String country;
1345

1346
        private Map<String, Object> extraParams;
1347

1348
        private String line1;
1349

1350
        private String line2;
1351

1352
        private String postalCode;
1353

1354
        private String state;
1355

1356
        /** Finalize and obtain parameter instance from this builder. */
1357
        public PaymentRecordReportPaymentParams.ShippingDetails.Address build() {
NEW
1358
          return new PaymentRecordReportPaymentParams.ShippingDetails.Address(
×
1359
              this.city,
1360
              this.country,
1361
              this.extraParams,
1362
              this.line1,
1363
              this.line2,
1364
              this.postalCode,
1365
              this.state);
1366
        }
1367

1368
        /** City, district, suburb, town, or village. */
1369
        public Builder setCity(String city) {
NEW
1370
          this.city = city;
×
NEW
1371
          return this;
×
1372
        }
1373

1374
        /**
1375
         * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1376
         * 3166-1 alpha-2</a>).
1377
         */
1378
        public Builder setCountry(String country) {
NEW
1379
          this.country = country;
×
NEW
1380
          return this;
×
1381
        }
1382

1383
        /**
1384
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
1385
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1386
         * map. See {@link PaymentRecordReportPaymentParams.ShippingDetails.Address#extraParams} for
1387
         * the field documentation.
1388
         */
1389
        public Builder putExtraParam(String key, Object value) {
NEW
1390
          if (this.extraParams == null) {
×
NEW
1391
            this.extraParams = new HashMap<>();
×
1392
          }
NEW
1393
          this.extraParams.put(key, value);
×
NEW
1394
          return this;
×
1395
        }
1396

1397
        /**
1398
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1399
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1400
         * map. See {@link PaymentRecordReportPaymentParams.ShippingDetails.Address#extraParams} for
1401
         * the field documentation.
1402
         */
1403
        public Builder putAllExtraParam(Map<String, Object> map) {
NEW
1404
          if (this.extraParams == null) {
×
NEW
1405
            this.extraParams = new HashMap<>();
×
1406
          }
NEW
1407
          this.extraParams.putAll(map);
×
NEW
1408
          return this;
×
1409
        }
1410

1411
        /** Address line 1 (e.g., street, PO Box, or company name). */
1412
        public Builder setLine1(String line1) {
NEW
1413
          this.line1 = line1;
×
NEW
1414
          return this;
×
1415
        }
1416

1417
        /** Address line 2 (e.g., apartment, suite, unit, or building). */
1418
        public Builder setLine2(String line2) {
NEW
1419
          this.line2 = line2;
×
NEW
1420
          return this;
×
1421
        }
1422

1423
        /** ZIP or postal code. */
1424
        public Builder setPostalCode(String postalCode) {
NEW
1425
          this.postalCode = postalCode;
×
NEW
1426
          return this;
×
1427
        }
1428

1429
        /** State, county, province, or region. */
1430
        public Builder setState(String state) {
NEW
1431
          this.state = state;
×
NEW
1432
          return this;
×
1433
        }
1434
      }
1435
    }
1436
  }
1437

NEW
1438
  public enum CustomerPresence implements ApiRequestParams.EnumParam {
×
NEW
1439
    @SerializedName("off_session")
×
1440
    OFF_SESSION("off_session"),
1441

NEW
1442
    @SerializedName("on_session")
×
1443
    ON_SESSION("on_session");
1444

1445
    @Getter(onMethod_ = {@Override})
1446
    private final String value;
1447

NEW
1448
    CustomerPresence(String value) {
×
NEW
1449
      this.value = value;
×
NEW
1450
    }
×
1451
  }
1452

NEW
1453
  public enum Outcome implements ApiRequestParams.EnumParam {
×
NEW
1454
    @SerializedName("failed")
×
1455
    FAILED("failed"),
1456

NEW
1457
    @SerializedName("guaranteed")
×
1458
    GUARANTEED("guaranteed");
1459

1460
    @Getter(onMethod_ = {@Override})
1461
    private final String value;
1462

NEW
1463
    Outcome(String value) {
×
NEW
1464
      this.value = value;
×
NEW
1465
    }
×
1466
  }
1467
}
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