• 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

0.0
/src/main/java/com/stripe/param/TaxIdCreateParams.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 TaxIdCreateParams extends ApiRequestParams {
14
  /** Specifies which fields in the response should be expanded. */
15
  @SerializedName("expand")
16
  List<String> expand;
17

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

27
  /** The account or customer the tax ID belongs to. Defaults to {@code owner[type]=self}. */
28
  @SerializedName("owner")
29
  Owner owner;
30

31
  /**
32
   * <strong>Required.</strong> Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code
33
   * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn},
34
   * {@code ba_tin}, {@code bb_tin}, {@code bg_uic}, {@code bh_vat}, {@code bo_tin}, {@code
35
   * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst},
36
   * {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif}, {@code
37
   * ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code
38
   * de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code eu_oss_vat},
39
   * {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code hk_br}, {@code hr_oib},
40
   * {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code jp_cn},
41
   * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin},
42
   * {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat},
43
   * {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin},
44
   * {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code
45
   * pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code
46
   * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin},
47
   * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat},
48
   * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat},
49
   * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin}
50
   */
51
  @SerializedName("type")
52
  Type type;
53

54
  /** <strong>Required.</strong> Value of the tax ID. */
55
  @SerializedName("value")
56
  String value;
57

58
  private TaxIdCreateParams(
59
      List<String> expand, Map<String, Object> extraParams, Owner owner, Type type, String value) {
×
60
    this.expand = expand;
×
61
    this.extraParams = extraParams;
×
62
    this.owner = owner;
×
63
    this.type = type;
×
64
    this.value = value;
×
65
  }
×
66

67
  public static Builder builder() {
68
    return new Builder();
×
69
  }
70

71
  public static class Builder {
×
72
    private List<String> expand;
73

74
    private Map<String, Object> extraParams;
75

76
    private Owner owner;
77

78
    private Type type;
79

80
    private String value;
81

82
    /** Finalize and obtain parameter instance from this builder. */
83
    public TaxIdCreateParams build() {
84
      return new TaxIdCreateParams(
×
85
          this.expand, this.extraParams, this.owner, this.type, this.value);
86
    }
87

88
    /**
89
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
90
     * subsequent calls adds additional elements to the original list. See {@link
91
     * TaxIdCreateParams#expand} for the field documentation.
92
     */
93
    public Builder addExpand(String element) {
94
      if (this.expand == null) {
×
95
        this.expand = new ArrayList<>();
×
96
      }
97
      this.expand.add(element);
×
98
      return this;
×
99
    }
100

101
    /**
102
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
103
     * subsequent calls adds additional elements to the original list. See {@link
104
     * TaxIdCreateParams#expand} for the field documentation.
105
     */
106
    public Builder addAllExpand(List<String> elements) {
107
      if (this.expand == null) {
×
108
        this.expand = new ArrayList<>();
×
109
      }
110
      this.expand.addAll(elements);
×
111
      return this;
×
112
    }
113

114
    /**
115
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
116
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
117
     * TaxIdCreateParams#extraParams} for the field documentation.
118
     */
119
    public Builder putExtraParam(String key, Object value) {
120
      if (this.extraParams == null) {
×
121
        this.extraParams = new HashMap<>();
×
122
      }
123
      this.extraParams.put(key, value);
×
124
      return this;
×
125
    }
126

127
    /**
128
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
129
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
130
     * See {@link TaxIdCreateParams#extraParams} for the field documentation.
131
     */
132
    public Builder putAllExtraParam(Map<String, Object> map) {
133
      if (this.extraParams == null) {
×
134
        this.extraParams = new HashMap<>();
×
135
      }
136
      this.extraParams.putAll(map);
×
137
      return this;
×
138
    }
139

140
    /** The account or customer the tax ID belongs to. Defaults to {@code owner[type]=self}. */
141
    public Builder setOwner(TaxIdCreateParams.Owner owner) {
142
      this.owner = owner;
×
143
      return this;
×
144
    }
145

146
    /**
147
     * <strong>Required.</strong> Type of the tax ID, one of {@code ad_nrt}, {@code ae_trn}, {@code
148
     * al_tin}, {@code am_tin}, {@code ao_tin}, {@code ar_cuit}, {@code au_abn}, {@code au_arn},
149
     * {@code ba_tin}, {@code bb_tin}, {@code bg_uic}, {@code bh_vat}, {@code bo_tin}, {@code
150
     * br_cnpj}, {@code br_cpf}, {@code bs_tin}, {@code by_tin}, {@code ca_bn}, {@code ca_gst_hst},
151
     * {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code ca_qst}, {@code cd_nif},
152
     * {@code ch_uid}, {@code ch_vat}, {@code cl_tin}, {@code cn_tin}, {@code co_nit}, {@code
153
     * cr_tin}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif},
154
     * {@code eu_oss_vat}, {@code eu_vat}, {@code gb_vat}, {@code ge_vat}, {@code gn_nif}, {@code
155
     * hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst},
156
     * {@code is_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kh_tin},
157
     * {@code kr_brn}, {@code kz_bin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code
158
     * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp},
159
     * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code
160
     * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin},
161
     * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code
162
     * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat},
163
     * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code
164
     * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif},
165
     * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin}
166
     */
167
    public Builder setType(TaxIdCreateParams.Type type) {
168
      this.type = type;
×
169
      return this;
×
170
    }
171

172
    /** <strong>Required.</strong> Value of the tax ID. */
173
    public Builder setValue(String value) {
174
      this.value = value;
×
175
      return this;
×
176
    }
177
  }
178

179
  @Getter
180
  public static class Owner {
181
    /** Account the tax ID belongs to. Required when {@code type=account} */
182
    @SerializedName("account")
183
    String account;
184

185
    /** Customer the tax ID belongs to. Required when {@code type=customer} */
186
    @SerializedName("customer")
187
    String customer;
188

189
    /**
190
     * Map of extra parameters for custom features not available in this client library. The content
191
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
192
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
193
     * param object. Effectively, this map is flattened to its parent instance.
194
     */
195
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
196
    Map<String, Object> extraParams;
197

198
    /** <strong>Required.</strong> Type of owner referenced. */
199
    @SerializedName("type")
200
    Type type;
201

202
    private Owner(String account, String customer, Map<String, Object> extraParams, Type type) {
×
203
      this.account = account;
×
204
      this.customer = customer;
×
205
      this.extraParams = extraParams;
×
206
      this.type = type;
×
207
    }
×
208

209
    public static Builder builder() {
210
      return new Builder();
×
211
    }
212

213
    public static class Builder {
×
214
      private String account;
215

216
      private String customer;
217

218
      private Map<String, Object> extraParams;
219

220
      private Type type;
221

222
      /** Finalize and obtain parameter instance from this builder. */
223
      public TaxIdCreateParams.Owner build() {
224
        return new TaxIdCreateParams.Owner(
×
225
            this.account, this.customer, this.extraParams, this.type);
226
      }
227

228
      /** Account the tax ID belongs to. Required when {@code type=account} */
229
      public Builder setAccount(String account) {
230
        this.account = account;
×
231
        return this;
×
232
      }
233

234
      /** Customer the tax ID belongs to. Required when {@code type=customer} */
235
      public Builder setCustomer(String customer) {
236
        this.customer = customer;
×
237
        return this;
×
238
      }
239

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

253
      /**
254
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
255
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
256
       * See {@link TaxIdCreateParams.Owner#extraParams} for the field documentation.
257
       */
258
      public Builder putAllExtraParam(Map<String, Object> map) {
259
        if (this.extraParams == null) {
×
260
          this.extraParams = new HashMap<>();
×
261
        }
262
        this.extraParams.putAll(map);
×
263
        return this;
×
264
      }
265

266
      /** <strong>Required.</strong> Type of owner referenced. */
267
      public Builder setType(TaxIdCreateParams.Owner.Type type) {
268
        this.type = type;
×
269
        return this;
×
270
      }
271
    }
272

273
    public enum Type implements ApiRequestParams.EnumParam {
×
274
      @SerializedName("account")
×
275
      ACCOUNT("account"),
276

277
      @SerializedName("application")
×
278
      APPLICATION("application"),
279

280
      @SerializedName("customer")
×
281
      CUSTOMER("customer"),
282

283
      @SerializedName("self")
×
284
      SELF("self");
285

286
      @Getter(onMethod_ = {@Override})
287
      private final String value;
288

289
      Type(String value) {
×
290
        this.value = value;
×
291
      }
×
292
    }
293
  }
294

295
  public enum Type implements ApiRequestParams.EnumParam {
×
296
    @SerializedName("ad_nrt")
×
297
    AD_NRT("ad_nrt"),
298

299
    @SerializedName("ae_trn")
×
300
    AE_TRN("ae_trn"),
301

NEW
302
    @SerializedName("al_tin")
×
303
    AL_TIN("al_tin"),
304

UNCOV
305
    @SerializedName("am_tin")
×
306
    AM_TIN("am_tin"),
307

308
    @SerializedName("ao_tin")
×
309
    AO_TIN("ao_tin"),
310

311
    @SerializedName("ar_cuit")
×
312
    AR_CUIT("ar_cuit"),
313

314
    @SerializedName("au_abn")
×
315
    AU_ABN("au_abn"),
316

317
    @SerializedName("au_arn")
×
318
    AU_ARN("au_arn"),
319

320
    @SerializedName("ba_tin")
×
321
    BA_TIN("ba_tin"),
322

323
    @SerializedName("bb_tin")
×
324
    BB_TIN("bb_tin"),
325

326
    @SerializedName("bg_uic")
×
327
    BG_UIC("bg_uic"),
328

329
    @SerializedName("bh_vat")
×
330
    BH_VAT("bh_vat"),
331

332
    @SerializedName("bo_tin")
×
333
    BO_TIN("bo_tin"),
334

335
    @SerializedName("br_cnpj")
×
336
    BR_CNPJ("br_cnpj"),
337

338
    @SerializedName("br_cpf")
×
339
    BR_CPF("br_cpf"),
340

341
    @SerializedName("bs_tin")
×
342
    BS_TIN("bs_tin"),
343

344
    @SerializedName("by_tin")
×
345
    BY_TIN("by_tin"),
346

347
    @SerializedName("ca_bn")
×
348
    CA_BN("ca_bn"),
349

350
    @SerializedName("ca_gst_hst")
×
351
    CA_GST_HST("ca_gst_hst"),
352

353
    @SerializedName("ca_pst_bc")
×
354
    CA_PST_BC("ca_pst_bc"),
355

356
    @SerializedName("ca_pst_mb")
×
357
    CA_PST_MB("ca_pst_mb"),
358

359
    @SerializedName("ca_pst_sk")
×
360
    CA_PST_SK("ca_pst_sk"),
361

362
    @SerializedName("ca_qst")
×
363
    CA_QST("ca_qst"),
364

365
    @SerializedName("cd_nif")
×
366
    CD_NIF("cd_nif"),
367

368
    @SerializedName("ch_uid")
×
369
    CH_UID("ch_uid"),
370

371
    @SerializedName("ch_vat")
×
372
    CH_VAT("ch_vat"),
373

374
    @SerializedName("cl_tin")
×
375
    CL_TIN("cl_tin"),
376

377
    @SerializedName("cn_tin")
×
378
    CN_TIN("cn_tin"),
379

380
    @SerializedName("co_nit")
×
381
    CO_NIT("co_nit"),
382

383
    @SerializedName("cr_tin")
×
384
    CR_TIN("cr_tin"),
385

386
    @SerializedName("de_stn")
×
387
    DE_STN("de_stn"),
388

389
    @SerializedName("do_rcn")
×
390
    DO_RCN("do_rcn"),
391

392
    @SerializedName("ec_ruc")
×
393
    EC_RUC("ec_ruc"),
394

395
    @SerializedName("eg_tin")
×
396
    EG_TIN("eg_tin"),
397

398
    @SerializedName("es_cif")
×
399
    ES_CIF("es_cif"),
400

401
    @SerializedName("eu_oss_vat")
×
402
    EU_OSS_VAT("eu_oss_vat"),
403

404
    @SerializedName("eu_vat")
×
405
    EU_VAT("eu_vat"),
406

407
    @SerializedName("gb_vat")
×
408
    GB_VAT("gb_vat"),
409

410
    @SerializedName("ge_vat")
×
411
    GE_VAT("ge_vat"),
412

413
    @SerializedName("gn_nif")
×
414
    GN_NIF("gn_nif"),
415

416
    @SerializedName("hk_br")
×
417
    HK_BR("hk_br"),
418

419
    @SerializedName("hr_oib")
×
420
    HR_OIB("hr_oib"),
421

422
    @SerializedName("hu_tin")
×
423
    HU_TIN("hu_tin"),
424

425
    @SerializedName("id_npwp")
×
426
    ID_NPWP("id_npwp"),
427

428
    @SerializedName("il_vat")
×
429
    IL_VAT("il_vat"),
430

431
    @SerializedName("in_gst")
×
432
    IN_GST("in_gst"),
433

434
    @SerializedName("is_vat")
×
435
    IS_VAT("is_vat"),
436

437
    @SerializedName("jp_cn")
×
438
    JP_CN("jp_cn"),
439

440
    @SerializedName("jp_rn")
×
441
    JP_RN("jp_rn"),
442

443
    @SerializedName("jp_trn")
×
444
    JP_TRN("jp_trn"),
445

446
    @SerializedName("ke_pin")
×
447
    KE_PIN("ke_pin"),
448

449
    @SerializedName("kh_tin")
×
450
    KH_TIN("kh_tin"),
451

452
    @SerializedName("kr_brn")
×
453
    KR_BRN("kr_brn"),
454

455
    @SerializedName("kz_bin")
×
456
    KZ_BIN("kz_bin"),
457

458
    @SerializedName("li_uid")
×
459
    LI_UID("li_uid"),
460

461
    @SerializedName("li_vat")
×
462
    LI_VAT("li_vat"),
463

464
    @SerializedName("ma_vat")
×
465
    MA_VAT("ma_vat"),
466

467
    @SerializedName("md_vat")
×
468
    MD_VAT("md_vat"),
469

470
    @SerializedName("me_pib")
×
471
    ME_PIB("me_pib"),
472

473
    @SerializedName("mk_vat")
×
474
    MK_VAT("mk_vat"),
475

476
    @SerializedName("mr_nif")
×
477
    MR_NIF("mr_nif"),
478

479
    @SerializedName("mx_rfc")
×
480
    MX_RFC("mx_rfc"),
481

482
    @SerializedName("my_frp")
×
483
    MY_FRP("my_frp"),
484

485
    @SerializedName("my_itn")
×
486
    MY_ITN("my_itn"),
487

488
    @SerializedName("my_sst")
×
489
    MY_SST("my_sst"),
490

491
    @SerializedName("ng_tin")
×
492
    NG_TIN("ng_tin"),
493

494
    @SerializedName("no_vat")
×
495
    NO_VAT("no_vat"),
496

497
    @SerializedName("no_voec")
×
498
    NO_VOEC("no_voec"),
499

500
    @SerializedName("np_pan")
×
501
    NP_PAN("np_pan"),
502

503
    @SerializedName("nz_gst")
×
504
    NZ_GST("nz_gst"),
505

506
    @SerializedName("om_vat")
×
507
    OM_VAT("om_vat"),
508

509
    @SerializedName("pe_ruc")
×
510
    PE_RUC("pe_ruc"),
511

512
    @SerializedName("ph_tin")
×
513
    PH_TIN("ph_tin"),
514

515
    @SerializedName("ro_tin")
×
516
    RO_TIN("ro_tin"),
517

518
    @SerializedName("rs_pib")
×
519
    RS_PIB("rs_pib"),
520

521
    @SerializedName("ru_inn")
×
522
    RU_INN("ru_inn"),
523

524
    @SerializedName("ru_kpp")
×
525
    RU_KPP("ru_kpp"),
526

527
    @SerializedName("sa_vat")
×
528
    SA_VAT("sa_vat"),
529

530
    @SerializedName("sg_gst")
×
531
    SG_GST("sg_gst"),
532

533
    @SerializedName("sg_uen")
×
534
    SG_UEN("sg_uen"),
535

536
    @SerializedName("si_tin")
×
537
    SI_TIN("si_tin"),
538

539
    @SerializedName("sn_ninea")
×
540
    SN_NINEA("sn_ninea"),
541

542
    @SerializedName("sr_fin")
×
543
    SR_FIN("sr_fin"),
544

545
    @SerializedName("sv_nit")
×
546
    SV_NIT("sv_nit"),
547

548
    @SerializedName("th_vat")
×
549
    TH_VAT("th_vat"),
550

551
    @SerializedName("tj_tin")
×
552
    TJ_TIN("tj_tin"),
553

554
    @SerializedName("tr_tin")
×
555
    TR_TIN("tr_tin"),
556

557
    @SerializedName("tw_vat")
×
558
    TW_VAT("tw_vat"),
559

560
    @SerializedName("tz_vat")
×
561
    TZ_VAT("tz_vat"),
562

563
    @SerializedName("ua_vat")
×
564
    UA_VAT("ua_vat"),
565

566
    @SerializedName("ug_tin")
×
567
    UG_TIN("ug_tin"),
568

569
    @SerializedName("us_ein")
×
570
    US_EIN("us_ein"),
571

572
    @SerializedName("uy_ruc")
×
573
    UY_RUC("uy_ruc"),
574

575
    @SerializedName("uz_tin")
×
576
    UZ_TIN("uz_tin"),
577

578
    @SerializedName("uz_vat")
×
579
    UZ_VAT("uz_vat"),
580

581
    @SerializedName("ve_rif")
×
582
    VE_RIF("ve_rif"),
583

584
    @SerializedName("vn_tin")
×
585
    VN_TIN("vn_tin"),
586

587
    @SerializedName("za_vat")
×
588
    ZA_VAT("za_vat"),
589

590
    @SerializedName("zm_tin")
×
591
    ZM_TIN("zm_tin"),
592

593
    @SerializedName("zw_tin")
×
594
    ZW_TIN("zw_tin");
595

596
    @Getter(onMethod_ = {@Override})
597
    private final String value;
598

599
    Type(String value) {
×
600
      this.value = value;
×
601
    }
×
602
  }
603
}
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