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

stripe / stripe-java / #16562

18 Oct 2024 07:00PM UTC coverage: 12.614% (-0.1%) from 12.74%
#16562

push

github

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

Update generated code for beta

49 of 1978 new or added lines in 47 files covered. (2.48%)

68 existing lines in 20 files now uncovered.

18798 of 149026 relevant lines covered (12.61%)

0.13 hits per line

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

0.0
/src/main/java/com/stripe/param/tax/FormListParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.tax;
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 FormListParams extends ApiRequestParams {
14
  /**
15
   * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
16
   * in the list. For instance, if you make a list request and receive 100 objects, starting with
17
   * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
18
   * fetch the previous page of the list.
19
   */
20
  @SerializedName("ending_before")
21
  String endingBefore;
22

23
  /** Specifies which fields in the response should be expanded. */
24
  @SerializedName("expand")
25
  List<String> expand;
26

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

36
  /**
37
   * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
38
   * default is 10.
39
   */
40
  @SerializedName("limit")
41
  Long limit;
42

43
  /** <strong>Required.</strong> The payee whose volume is represented on the tax form. */
44
  @SerializedName("payee")
45
  Payee payee;
46

47
  /**
48
   * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
49
   * in the list. For instance, if you make a list request and receive 100 objects, ending with
50
   * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
51
   * fetch the next page of the list.
52
   */
53
  @SerializedName("starting_after")
54
  String startingAfter;
55

56
  /**
57
   * An optional filter on the list, based on the object {@code type} field. Without the filter, the
58
   * list includes all current and future tax form types. If your integration expects only one type
59
   * of tax form in the response, make sure to provide a type value in the request.
60
   */
61
  @SerializedName("type")
62
  Type type;
63

64
  private FormListParams(
65
      String endingBefore,
66
      List<String> expand,
67
      Map<String, Object> extraParams,
68
      Long limit,
69
      Payee payee,
70
      String startingAfter,
71
      Type type) {
×
72
    this.endingBefore = endingBefore;
×
73
    this.expand = expand;
×
74
    this.extraParams = extraParams;
×
75
    this.limit = limit;
×
76
    this.payee = payee;
×
77
    this.startingAfter = startingAfter;
×
78
    this.type = type;
×
79
  }
×
80

81
  public static Builder builder() {
82
    return new Builder();
×
83
  }
84

85
  public static class Builder {
×
86
    private String endingBefore;
87

88
    private List<String> expand;
89

90
    private Map<String, Object> extraParams;
91

92
    private Long limit;
93

94
    private Payee payee;
95

96
    private String startingAfter;
97

98
    private Type type;
99

100
    /** Finalize and obtain parameter instance from this builder. */
101
    public FormListParams build() {
102
      return new FormListParams(
×
103
          this.endingBefore,
104
          this.expand,
105
          this.extraParams,
106
          this.limit,
107
          this.payee,
108
          this.startingAfter,
109
          this.type);
110
    }
111

112
    /**
113
     * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
114
     * in the list. For instance, if you make a list request and receive 100 objects, starting with
115
     * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
116
     * fetch the previous page of the list.
117
     */
118
    public Builder setEndingBefore(String endingBefore) {
119
      this.endingBefore = endingBefore;
×
120
      return this;
×
121
    }
122

123
    /**
124
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
125
     * subsequent calls adds additional elements to the original list. See {@link
126
     * FormListParams#expand} for the field documentation.
127
     */
128
    public Builder addExpand(String element) {
129
      if (this.expand == null) {
×
130
        this.expand = new ArrayList<>();
×
131
      }
132
      this.expand.add(element);
×
133
      return this;
×
134
    }
135

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

149
    /**
150
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
151
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
152
     * FormListParams#extraParams} for the field documentation.
153
     */
154
    public Builder putExtraParam(String key, Object value) {
155
      if (this.extraParams == null) {
×
156
        this.extraParams = new HashMap<>();
×
157
      }
158
      this.extraParams.put(key, value);
×
159
      return this;
×
160
    }
161

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

175
    /**
176
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
177
     * default is 10.
178
     */
179
    public Builder setLimit(Long limit) {
180
      this.limit = limit;
×
181
      return this;
×
182
    }
183

184
    /** <strong>Required.</strong> The payee whose volume is represented on the tax form. */
185
    public Builder setPayee(FormListParams.Payee payee) {
186
      this.payee = payee;
×
187
      return this;
×
188
    }
189

190
    /**
191
     * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
192
     * place in the list. For instance, if you make a list request and receive 100 objects, ending
193
     * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
194
     * order to fetch the next page of the list.
195
     */
196
    public Builder setStartingAfter(String startingAfter) {
197
      this.startingAfter = startingAfter;
×
198
      return this;
×
199
    }
200

201
    /**
202
     * An optional filter on the list, based on the object {@code type} field. Without the filter,
203
     * the list includes all current and future tax form types. If your integration expects only one
204
     * type of tax form in the response, make sure to provide a type value in the request.
205
     */
206
    public Builder setType(FormListParams.Type type) {
207
      this.type = type;
×
208
      return this;
×
209
    }
210
  }
211

212
  @Getter
213
  public static class Payee {
214
    /** The ID of the Stripe account whose forms will be retrieved. */
215
    @SerializedName("account")
216
    String account;
217

218
    /** The external reference to the payee whose forms will be retrieved. */
219
    @SerializedName("external_reference")
220
    String externalReference;
221

222
    /**
223
     * Map of extra parameters for custom features not available in this client library. The content
224
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
225
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
226
     * param object. Effectively, this map is flattened to its parent instance.
227
     */
228
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
229
    Map<String, Object> extraParams;
230

231
    /** Specifies the payee type. Either {@code account} or {@code external_reference}. */
232
    @SerializedName("type")
233
    Type type;
234

235
    private Payee(
NEW
236
        String account, String externalReference, Map<String, Object> extraParams, Type type) {
×
237
      this.account = account;
×
NEW
238
      this.externalReference = externalReference;
×
239
      this.extraParams = extraParams;
×
240
      this.type = type;
×
241
    }
×
242

243
    public static Builder builder() {
244
      return new Builder();
×
245
    }
246

247
    public static class Builder {
×
248
      private String account;
249

250
      private String externalReference;
251

252
      private Map<String, Object> extraParams;
253

254
      private Type type;
255

256
      /** Finalize and obtain parameter instance from this builder. */
257
      public FormListParams.Payee build() {
NEW
258
        return new FormListParams.Payee(
×
259
            this.account, this.externalReference, this.extraParams, this.type);
260
      }
261

262
      /** The ID of the Stripe account whose forms will be retrieved. */
263
      public Builder setAccount(String account) {
264
        this.account = account;
×
265
        return this;
×
266
      }
267

268
      /** The external reference to the payee whose forms will be retrieved. */
269
      public Builder setExternalReference(String externalReference) {
NEW
270
        this.externalReference = externalReference;
×
NEW
271
        return this;
×
272
      }
273

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

287
      /**
288
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
289
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
290
       * See {@link FormListParams.Payee#extraParams} for the field documentation.
291
       */
292
      public Builder putAllExtraParam(Map<String, Object> map) {
293
        if (this.extraParams == null) {
×
294
          this.extraParams = new HashMap<>();
×
295
        }
296
        this.extraParams.putAll(map);
×
297
        return this;
×
298
      }
299

300
      /** Specifies the payee type. Either {@code account} or {@code external_reference}. */
301
      public Builder setType(FormListParams.Payee.Type type) {
302
        this.type = type;
×
303
        return this;
×
304
      }
305
    }
306

307
    public enum Type implements ApiRequestParams.EnumParam {
×
308
      @SerializedName("account")
×
309
      ACCOUNT("account"),
310

NEW
311
      @SerializedName("external_reference")
×
312
      EXTERNAL_REFERENCE("external_reference");
313

314
      @Getter(onMethod_ = {@Override})
315
      private final String value;
316

317
      Type(String value) {
×
318
        this.value = value;
×
319
      }
×
320
    }
321
  }
322

323
  public enum Type implements ApiRequestParams.EnumParam {
×
NEW
324
    @SerializedName("au_serr")
×
325
    AU_SERR("au_serr"),
326

NEW
327
    @SerializedName("ca_mrdp")
×
328
    CA_MRDP("ca_mrdp"),
329

NEW
330
    @SerializedName("eu_dac7")
×
331
    EU_DAC7("eu_dac7"),
332

NEW
333
    @SerializedName("gb_mrdp")
×
334
    GB_MRDP("gb_mrdp"),
335

NEW
336
    @SerializedName("nz_mrdp")
×
337
    NZ_MRDP("nz_mrdp"),
338

UNCOV
339
    @SerializedName("us_1099_k")
×
340
    US_1099_K("us_1099_k"),
341

342
    @SerializedName("us_1099_misc")
×
343
    US_1099_MISC("us_1099_misc"),
344

345
    @SerializedName("us_1099_nec")
×
346
    US_1099_NEC("us_1099_nec");
347

348
    @Getter(onMethod_ = {@Override})
349
    private final String value;
350

351
    Type(String value) {
×
352
      this.value = value;
×
353
    }
×
354
  }
355
}
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