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

stripe / stripe-java / #16725

08 Jan 2025 03:19PM UTC coverage: 12.341% (-0.04%) from 12.384%
#16725

Pull #1932

github

web-flow
Merge 1890010d3 into 9aeb03b42
Pull Request #1932: Update generated code for beta

29 of 1339 new or added lines in 25 files covered. (2.17%)

45 existing lines in 12 files now uncovered.

18905 of 153189 relevant lines covered (12.34%)

0.12 hits per line

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

16.07
/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.treasury;
3

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

13
@Getter
14
public class OutboundTransferCreateParams extends ApiRequestParams {
15
  /** <strong>Required.</strong> Amount (in cents) to be transferred. */
16
  @SerializedName("amount")
17
  Long amount;
18

19
  /**
20
   * <strong>Required.</strong> Three-letter <a
21
   * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
22
   * Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
23
   */
24
  @SerializedName("currency")
25
  String currency;
26

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

31
  /** The PaymentMethod to use as the payment instrument for the OutboundTransfer. */
32
  @SerializedName("destination_payment_method")
33
  String destinationPaymentMethod;
34

35
  /**
36
   * Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with
37
   * {@code destination_payment_method}.
38
   */
39
  @SerializedName("destination_payment_method_data")
40
  DestinationPaymentMethodData destinationPaymentMethodData;
41

42
  /** Hash describing payment method configuration details. */
43
  @SerializedName("destination_payment_method_options")
44
  DestinationPaymentMethodOptions destinationPaymentMethodOptions;
45

46
  /** Specifies which fields in the response should be expanded. */
47
  @SerializedName("expand")
48
  List<String> expand;
49

50
  /**
51
   * Map of extra parameters for custom features not available in this client library. The content
52
   * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
53
   * key/value pair is serialized as if the key is a root-level field (serialized) name in this
54
   * param object. Effectively, this map is flattened to its parent instance.
55
   */
56
  @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
57
  Map<String, Object> extraParams;
58

59
  /** <strong>Required.</strong> The FinancialAccount to pull funds from. */
60
  @SerializedName("financial_account")
61
  String financialAccount;
62

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

72
  /** Details about the network used for the OutboundTransfer. */
73
  @SerializedName("network_details")
74
  NetworkDetails networkDetails;
75

76
  /**
77
   * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10
78
   * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire} transfers.
79
   * The default value is &quot;transfer&quot;.
80
   */
81
  @SerializedName("statement_descriptor")
82
  String statementDescriptor;
83

84
  private OutboundTransferCreateParams(
85
      Long amount,
86
      String currency,
87
      String description,
88
      String destinationPaymentMethod,
89
      DestinationPaymentMethodData destinationPaymentMethodData,
90
      DestinationPaymentMethodOptions destinationPaymentMethodOptions,
91
      List<String> expand,
92
      Map<String, Object> extraParams,
93
      String financialAccount,
94
      Map<String, String> metadata,
95
      NetworkDetails networkDetails,
96
      String statementDescriptor) {
1✔
97
    this.amount = amount;
1✔
98
    this.currency = currency;
1✔
99
    this.description = description;
1✔
100
    this.destinationPaymentMethod = destinationPaymentMethod;
1✔
101
    this.destinationPaymentMethodData = destinationPaymentMethodData;
1✔
102
    this.destinationPaymentMethodOptions = destinationPaymentMethodOptions;
1✔
103
    this.expand = expand;
1✔
104
    this.extraParams = extraParams;
1✔
105
    this.financialAccount = financialAccount;
1✔
106
    this.metadata = metadata;
1✔
107
    this.networkDetails = networkDetails;
1✔
108
    this.statementDescriptor = statementDescriptor;
1✔
109
  }
1✔
110

111
  public static Builder builder() {
112
    return new Builder();
1✔
113
  }
114

115
  public static class Builder {
1✔
116
    private Long amount;
117

118
    private String currency;
119

120
    private String description;
121

122
    private String destinationPaymentMethod;
123

124
    private DestinationPaymentMethodData destinationPaymentMethodData;
125

126
    private DestinationPaymentMethodOptions destinationPaymentMethodOptions;
127

128
    private List<String> expand;
129

130
    private Map<String, Object> extraParams;
131

132
    private String financialAccount;
133

134
    private Map<String, String> metadata;
135

136
    private NetworkDetails networkDetails;
137

138
    private String statementDescriptor;
139

140
    /** Finalize and obtain parameter instance from this builder. */
141
    public OutboundTransferCreateParams build() {
142
      return new OutboundTransferCreateParams(
1✔
143
          this.amount,
144
          this.currency,
145
          this.description,
146
          this.destinationPaymentMethod,
147
          this.destinationPaymentMethodData,
148
          this.destinationPaymentMethodOptions,
149
          this.expand,
150
          this.extraParams,
151
          this.financialAccount,
152
          this.metadata,
153
          this.networkDetails,
154
          this.statementDescriptor);
155
    }
156

157
    /** <strong>Required.</strong> Amount (in cents) to be transferred. */
158
    public Builder setAmount(Long amount) {
159
      this.amount = amount;
1✔
160
      return this;
1✔
161
    }
162

163
    /**
164
     * <strong>Required.</strong> Three-letter <a
165
     * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
166
     * Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
167
     */
168
    public Builder setCurrency(String currency) {
169
      this.currency = currency;
1✔
170
      return this;
1✔
171
    }
172

173
    /** An arbitrary string attached to the object. Often useful for displaying to users. */
174
    public Builder setDescription(String description) {
175
      this.description = description;
1✔
176
      return this;
1✔
177
    }
178

179
    /** The PaymentMethod to use as the payment instrument for the OutboundTransfer. */
180
    public Builder setDestinationPaymentMethod(String destinationPaymentMethod) {
181
      this.destinationPaymentMethod = destinationPaymentMethod;
1✔
182
      return this;
1✔
183
    }
184

185
    /**
186
     * Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with
187
     * {@code destination_payment_method}.
188
     */
189
    public Builder setDestinationPaymentMethodData(
190
        OutboundTransferCreateParams.DestinationPaymentMethodData destinationPaymentMethodData) {
NEW
191
      this.destinationPaymentMethodData = destinationPaymentMethodData;
×
NEW
192
      return this;
×
193
    }
194

195
    /** Hash describing payment method configuration details. */
196
    public Builder setDestinationPaymentMethodOptions(
197
        OutboundTransferCreateParams.DestinationPaymentMethodOptions
198
            destinationPaymentMethodOptions) {
199
      this.destinationPaymentMethodOptions = destinationPaymentMethodOptions;
×
200
      return this;
×
201
    }
202

203
    /**
204
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
205
     * subsequent calls adds additional elements to the original list. See {@link
206
     * OutboundTransferCreateParams#expand} for the field documentation.
207
     */
208
    public Builder addExpand(String element) {
209
      if (this.expand == null) {
×
210
        this.expand = new ArrayList<>();
×
211
      }
212
      this.expand.add(element);
×
213
      return this;
×
214
    }
215

216
    /**
217
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
218
     * subsequent calls adds additional elements to the original list. See {@link
219
     * OutboundTransferCreateParams#expand} for the field documentation.
220
     */
221
    public Builder addAllExpand(List<String> elements) {
222
      if (this.expand == null) {
×
223
        this.expand = new ArrayList<>();
×
224
      }
225
      this.expand.addAll(elements);
×
226
      return this;
×
227
    }
228

229
    /**
230
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
231
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
232
     * OutboundTransferCreateParams#extraParams} for the field documentation.
233
     */
234
    public Builder putExtraParam(String key, Object value) {
235
      if (this.extraParams == null) {
×
236
        this.extraParams = new HashMap<>();
×
237
      }
238
      this.extraParams.put(key, value);
×
239
      return this;
×
240
    }
241

242
    /**
243
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
244
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
245
     * See {@link OutboundTransferCreateParams#extraParams} for the field documentation.
246
     */
247
    public Builder putAllExtraParam(Map<String, Object> map) {
248
      if (this.extraParams == null) {
×
249
        this.extraParams = new HashMap<>();
×
250
      }
251
      this.extraParams.putAll(map);
×
252
      return this;
×
253
    }
254

255
    /** <strong>Required.</strong> The FinancialAccount to pull funds from. */
256
    public Builder setFinancialAccount(String financialAccount) {
257
      this.financialAccount = financialAccount;
1✔
258
      return this;
1✔
259
    }
260

261
    /**
262
     * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call,
263
     * and subsequent calls add additional key/value pairs to the original map. See {@link
264
     * OutboundTransferCreateParams#metadata} for the field documentation.
265
     */
266
    public Builder putMetadata(String key, String value) {
267
      if (this.metadata == null) {
×
268
        this.metadata = new HashMap<>();
×
269
      }
270
      this.metadata.put(key, value);
×
271
      return this;
×
272
    }
273

274
    /**
275
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
276
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
277
     * See {@link OutboundTransferCreateParams#metadata} for the field documentation.
278
     */
279
    public Builder putAllMetadata(Map<String, String> map) {
280
      if (this.metadata == null) {
×
281
        this.metadata = new HashMap<>();
×
282
      }
283
      this.metadata.putAll(map);
×
284
      return this;
×
285
    }
286

287
    /** Details about the network used for the OutboundTransfer. */
288
    public Builder setNetworkDetails(OutboundTransferCreateParams.NetworkDetails networkDetails) {
289
      this.networkDetails = networkDetails;
×
290
      return this;
×
291
    }
292

293
    /**
294
     * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10
295
     * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire}
296
     * transfers. The default value is &quot;transfer&quot;.
297
     */
298
    public Builder setStatementDescriptor(String statementDescriptor) {
299
      this.statementDescriptor = statementDescriptor;
×
300
      return this;
×
301
    }
302
  }
303

304
  @Getter
305
  public static class DestinationPaymentMethodData {
306
    /**
307
     * Map of extra parameters for custom features not available in this client library. The content
308
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
309
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
310
     * param object. Effectively, this map is flattened to its parent instance.
311
     */
312
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
313
    Map<String, Object> extraParams;
314

315
    /**
316
     * Required if type is set to {@code financial_account}. The FinancialAccount ID to send funds
317
     * to.
318
     */
319
    @SerializedName("financial_account")
320
    String financialAccount;
321

322
    /** <strong>Required.</strong> The type of the destination. */
323
    @SerializedName("type")
324
    Type type;
325

326
    private DestinationPaymentMethodData(
NEW
327
        Map<String, Object> extraParams, String financialAccount, Type type) {
×
NEW
328
      this.extraParams = extraParams;
×
NEW
329
      this.financialAccount = financialAccount;
×
NEW
330
      this.type = type;
×
NEW
331
    }
×
332

333
    public static Builder builder() {
NEW
334
      return new Builder();
×
335
    }
336

NEW
337
    public static class Builder {
×
338
      private Map<String, Object> extraParams;
339

340
      private String financialAccount;
341

342
      private Type type;
343

344
      /** Finalize and obtain parameter instance from this builder. */
345
      public OutboundTransferCreateParams.DestinationPaymentMethodData build() {
NEW
346
        return new OutboundTransferCreateParams.DestinationPaymentMethodData(
×
347
            this.extraParams, this.financialAccount, this.type);
348
      }
349

350
      /**
351
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
352
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
353
       * OutboundTransferCreateParams.DestinationPaymentMethodData#extraParams} for the field
354
       * documentation.
355
       */
356
      public Builder putExtraParam(String key, Object value) {
NEW
357
        if (this.extraParams == null) {
×
NEW
358
          this.extraParams = new HashMap<>();
×
359
        }
NEW
360
        this.extraParams.put(key, value);
×
NEW
361
        return this;
×
362
      }
363

364
      /**
365
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
366
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
367
       * See {@link OutboundTransferCreateParams.DestinationPaymentMethodData#extraParams} for the
368
       * field documentation.
369
       */
370
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
371
        if (this.extraParams == null) {
×
NEW
372
          this.extraParams = new HashMap<>();
×
373
        }
NEW
374
        this.extraParams.putAll(map);
×
NEW
375
        return this;
×
376
      }
377

378
      /**
379
       * Required if type is set to {@code financial_account}. The FinancialAccount ID to send funds
380
       * to.
381
       */
382
      public Builder setFinancialAccount(String financialAccount) {
NEW
383
        this.financialAccount = financialAccount;
×
NEW
384
        return this;
×
385
      }
386

387
      /** <strong>Required.</strong> The type of the destination. */
388
      public Builder setType(OutboundTransferCreateParams.DestinationPaymentMethodData.Type type) {
NEW
389
        this.type = type;
×
NEW
390
        return this;
×
391
      }
392
    }
393

NEW
394
    public enum Type implements ApiRequestParams.EnumParam {
×
NEW
395
      @SerializedName("financial_account")
×
396
      FINANCIAL_ACCOUNT("financial_account");
397

398
      @Getter(onMethod_ = {@Override})
399
      private final String value;
400

NEW
401
      Type(String value) {
×
NEW
402
        this.value = value;
×
NEW
403
      }
×
404
    }
405
  }
406

407
  @Getter
408
  public static class DestinationPaymentMethodOptions {
409
    /**
410
     * Map of extra parameters for custom features not available in this client library. The content
411
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
412
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
413
     * param object. Effectively, this map is flattened to its parent instance.
414
     */
415
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
416
    Map<String, Object> extraParams;
417

418
    /** Optional fields for {@code us_bank_account}. */
419
    @SerializedName("us_bank_account")
420
    Object usBankAccount;
421

422
    private DestinationPaymentMethodOptions(Map<String, Object> extraParams, Object usBankAccount) {
×
423
      this.extraParams = extraParams;
×
424
      this.usBankAccount = usBankAccount;
×
425
    }
×
426

427
    public static Builder builder() {
428
      return new Builder();
×
429
    }
430

431
    public static class Builder {
×
432
      private Map<String, Object> extraParams;
433

434
      private Object usBankAccount;
435

436
      /** Finalize and obtain parameter instance from this builder. */
437
      public OutboundTransferCreateParams.DestinationPaymentMethodOptions build() {
438
        return new OutboundTransferCreateParams.DestinationPaymentMethodOptions(
×
439
            this.extraParams, this.usBankAccount);
440
      }
441

442
      /**
443
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
444
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
445
       * OutboundTransferCreateParams.DestinationPaymentMethodOptions#extraParams} for the field
446
       * documentation.
447
       */
448
      public Builder putExtraParam(String key, Object value) {
449
        if (this.extraParams == null) {
×
450
          this.extraParams = new HashMap<>();
×
451
        }
452
        this.extraParams.put(key, value);
×
453
        return this;
×
454
      }
455

456
      /**
457
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
458
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
459
       * See {@link OutboundTransferCreateParams.DestinationPaymentMethodOptions#extraParams} for
460
       * the field documentation.
461
       */
462
      public Builder putAllExtraParam(Map<String, Object> map) {
463
        if (this.extraParams == null) {
×
464
          this.extraParams = new HashMap<>();
×
465
        }
466
        this.extraParams.putAll(map);
×
467
        return this;
×
468
      }
469

470
      /** Optional fields for {@code us_bank_account}. */
471
      public Builder setUsBankAccount(
472
          OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount
473
              usBankAccount) {
474
        this.usBankAccount = usBankAccount;
×
475
        return this;
×
476
      }
477

478
      /** Optional fields for {@code us_bank_account}. */
479
      public Builder setUsBankAccount(EmptyParam usBankAccount) {
480
        this.usBankAccount = usBankAccount;
×
481
        return this;
×
482
      }
483
    }
484

485
    @Getter
486
    public static class UsBankAccount {
487
      /**
488
       * Map of extra parameters for custom features not available in this client library. The
489
       * content in this map is not serialized under this field's {@code @SerializedName} value.
490
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
491
       * name in this param object. Effectively, this map is flattened to its parent instance.
492
       */
493
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
494
      Map<String, Object> extraParams;
495

496
      /**
497
       * Specifies the network rails to be used. If not set, will default to the PaymentMethod's
498
       * preferred network. See the <a
499
       * href="https://stripe.com/docs/treasury/money-movement/timelines">docs</a> to learn more
500
       * about money movement timelines for each network type.
501
       */
502
      @SerializedName("network")
503
      Network network;
504

505
      private UsBankAccount(Map<String, Object> extraParams, Network network) {
×
506
        this.extraParams = extraParams;
×
507
        this.network = network;
×
508
      }
×
509

510
      public static Builder builder() {
511
        return new Builder();
×
512
      }
513

514
      public static class Builder {
×
515
        private Map<String, Object> extraParams;
516

517
        private Network network;
518

519
        /** Finalize and obtain parameter instance from this builder. */
520
        public OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount build() {
521
          return new OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount(
×
522
              this.extraParams, this.network);
523
        }
524

525
        /**
526
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
527
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
528
         * map. See {@link
529
         * OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount#extraParams}
530
         * for the field documentation.
531
         */
532
        public Builder putExtraParam(String key, Object value) {
533
          if (this.extraParams == null) {
×
534
            this.extraParams = new HashMap<>();
×
535
          }
536
          this.extraParams.put(key, value);
×
537
          return this;
×
538
        }
539

540
        /**
541
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
542
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
543
         * map. See {@link
544
         * OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount#extraParams}
545
         * for the field documentation.
546
         */
547
        public Builder putAllExtraParam(Map<String, Object> map) {
548
          if (this.extraParams == null) {
×
549
            this.extraParams = new HashMap<>();
×
550
          }
551
          this.extraParams.putAll(map);
×
552
          return this;
×
553
        }
554

555
        /**
556
         * Specifies the network rails to be used. If not set, will default to the PaymentMethod's
557
         * preferred network. See the <a
558
         * href="https://stripe.com/docs/treasury/money-movement/timelines">docs</a> to learn more
559
         * about money movement timelines for each network type.
560
         */
561
        public Builder setNetwork(
562
            OutboundTransferCreateParams.DestinationPaymentMethodOptions.UsBankAccount.Network
563
                network) {
564
          this.network = network;
×
565
          return this;
×
566
        }
567
      }
568

569
      public enum Network implements ApiRequestParams.EnumParam {
×
570
        @SerializedName("ach")
×
571
        ACH("ach"),
572

573
        @SerializedName("us_domestic_wire")
×
574
        US_DOMESTIC_WIRE("us_domestic_wire");
575

576
        @Getter(onMethod_ = {@Override})
577
        private final String value;
578

579
        Network(String value) {
×
580
          this.value = value;
×
581
        }
×
582
      }
583
    }
584
  }
585

586
  @Getter
587
  public static class NetworkDetails {
588
    /** Optional fields for {@code ach}. */
589
    @SerializedName("ach")
590
    Ach ach;
591

592
    /**
593
     * Map of extra parameters for custom features not available in this client library. The content
594
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
595
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
596
     * param object. Effectively, this map is flattened to its parent instance.
597
     */
598
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
599
    Map<String, Object> extraParams;
600

601
    /** <strong>Required.</strong> The type of flow that originated the OutboundTransfer. */
602
    @SerializedName("type")
603
    Type type;
604

605
    private NetworkDetails(Ach ach, Map<String, Object> extraParams, Type type) {
×
606
      this.ach = ach;
×
607
      this.extraParams = extraParams;
×
608
      this.type = type;
×
609
    }
×
610

611
    public static Builder builder() {
612
      return new Builder();
×
613
    }
614

615
    public static class Builder {
×
616
      private Ach ach;
617

618
      private Map<String, Object> extraParams;
619

620
      private Type type;
621

622
      /** Finalize and obtain parameter instance from this builder. */
623
      public OutboundTransferCreateParams.NetworkDetails build() {
624
        return new OutboundTransferCreateParams.NetworkDetails(
×
625
            this.ach, this.extraParams, this.type);
626
      }
627

628
      /** Optional fields for {@code ach}. */
629
      public Builder setAch(OutboundTransferCreateParams.NetworkDetails.Ach ach) {
630
        this.ach = ach;
×
631
        return this;
×
632
      }
633

634
      /**
635
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
636
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
637
       * OutboundTransferCreateParams.NetworkDetails#extraParams} for the field documentation.
638
       */
639
      public Builder putExtraParam(String key, Object value) {
640
        if (this.extraParams == null) {
×
641
          this.extraParams = new HashMap<>();
×
642
        }
643
        this.extraParams.put(key, value);
×
644
        return this;
×
645
      }
646

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

661
      /** <strong>Required.</strong> The type of flow that originated the OutboundTransfer. */
662
      public Builder setType(OutboundTransferCreateParams.NetworkDetails.Type type) {
663
        this.type = type;
×
664
        return this;
×
665
      }
666
    }
667

668
    @Getter
669
    public static class Ach {
670
      /** Addenda record data associated with this OutboundTransfer. */
671
      @SerializedName("addenda")
672
      String addenda;
673

674
      /**
675
       * Map of extra parameters for custom features not available in this client library. The
676
       * content in this map is not serialized under this field's {@code @SerializedName} value.
677
       * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
678
       * name in this param object. Effectively, this map is flattened to its parent instance.
679
       */
680
      @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
681
      Map<String, Object> extraParams;
682

683
      private Ach(String addenda, Map<String, Object> extraParams) {
×
684
        this.addenda = addenda;
×
685
        this.extraParams = extraParams;
×
686
      }
×
687

688
      public static Builder builder() {
689
        return new Builder();
×
690
      }
691

692
      public static class Builder {
×
693
        private String addenda;
694

695
        private Map<String, Object> extraParams;
696

697
        /** Finalize and obtain parameter instance from this builder. */
698
        public OutboundTransferCreateParams.NetworkDetails.Ach build() {
699
          return new OutboundTransferCreateParams.NetworkDetails.Ach(
×
700
              this.addenda, this.extraParams);
701
        }
702

703
        /** Addenda record data associated with this OutboundTransfer. */
704
        public Builder setAddenda(String addenda) {
705
          this.addenda = addenda;
×
706
          return this;
×
707
        }
708

709
        /**
710
         * Add a key/value pair to `extraParams` map. A map is initialized for the first
711
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
712
         * map. See {@link OutboundTransferCreateParams.NetworkDetails.Ach#extraParams} for the
713
         * field documentation.
714
         */
715
        public Builder putExtraParam(String key, Object value) {
716
          if (this.extraParams == null) {
×
717
            this.extraParams = new HashMap<>();
×
718
          }
719
          this.extraParams.put(key, value);
×
720
          return this;
×
721
        }
722

723
        /**
724
         * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
725
         * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
726
         * map. See {@link OutboundTransferCreateParams.NetworkDetails.Ach#extraParams} for the
727
         * field documentation.
728
         */
729
        public Builder putAllExtraParam(Map<String, Object> map) {
730
          if (this.extraParams == null) {
×
731
            this.extraParams = new HashMap<>();
×
732
          }
733
          this.extraParams.putAll(map);
×
734
          return this;
×
735
        }
736
      }
737
    }
738

739
    public enum Type implements ApiRequestParams.EnumParam {
×
740
      @SerializedName("ach")
×
741
      ACH("ach");
742

743
      @Getter(onMethod_ = {@Override})
744
      private final String value;
745

746
      Type(String value) {
×
747
        this.value = value;
×
748
      }
×
749
    }
750
  }
751
}
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

© 2025 Coveralls, Inc