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

stripe / stripe-java / #16644

14 Nov 2024 11:58PM UTC coverage: 12.414% (-0.005%) from 12.419%
#16644

push

github

web-flow
Update generated code for beta (#1922)

* Update generated code for v1334

* Update generated code for v1335

* Update generated code for v1337

* Update generated code for v1339

* Update generated code for v1340

* Update generated code for v1343

* Update generated code for v1345

* Update generated code for v1346

* Update generated code for v1347

* Update generated code for v1348

* Update generated code for v1349

* Update generated code for v1350

* Update generated code for v1352

* Update generated code for v1353

* Update generated code for v1356

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

2 of 79 new or added lines in 17 files covered. (2.53%)

1 existing line in 1 file now uncovered.

18857 of 151907 relevant lines covered (12.41%)

0.12 hits per line

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

19.4
/src/main/java/com/stripe/param/AccountPersonListParams.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 AccountPersonListParams 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
  /**
44
   * Filters on the list of people returned based on the person's relationship to the account's
45
   * company.
46
   */
47
  @SerializedName("relationship")
48
  Relationship relationship;
49

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

59
  private AccountPersonListParams(
60
      String endingBefore,
61
      List<String> expand,
62
      Map<String, Object> extraParams,
63
      Long limit,
64
      Relationship relationship,
65
      String startingAfter) {
1✔
66
    this.endingBefore = endingBefore;
1✔
67
    this.expand = expand;
1✔
68
    this.extraParams = extraParams;
1✔
69
    this.limit = limit;
1✔
70
    this.relationship = relationship;
1✔
71
    this.startingAfter = startingAfter;
1✔
72
  }
1✔
73

74
  public static Builder builder() {
75
    return new Builder();
1✔
76
  }
77

78
  public static class Builder {
1✔
79
    private String endingBefore;
80

81
    private List<String> expand;
82

83
    private Map<String, Object> extraParams;
84

85
    private Long limit;
86

87
    private Relationship relationship;
88

89
    private String startingAfter;
90

91
    /** Finalize and obtain parameter instance from this builder. */
92
    public AccountPersonListParams build() {
93
      return new AccountPersonListParams(
1✔
94
          this.endingBefore,
95
          this.expand,
96
          this.extraParams,
97
          this.limit,
98
          this.relationship,
99
          this.startingAfter);
100
    }
101

102
    /**
103
     * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
104
     * in the list. For instance, if you make a list request and receive 100 objects, starting with
105
     * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
106
     * fetch the previous page of the list.
107
     */
108
    public Builder setEndingBefore(String endingBefore) {
109
      this.endingBefore = endingBefore;
×
110
      return this;
×
111
    }
112

113
    /**
114
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
115
     * subsequent calls adds additional elements to the original list. See {@link
116
     * AccountPersonListParams#expand} for the field documentation.
117
     */
118
    public Builder addExpand(String element) {
119
      if (this.expand == null) {
×
120
        this.expand = new ArrayList<>();
×
121
      }
122
      this.expand.add(element);
×
123
      return this;
×
124
    }
125

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

139
    /**
140
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
141
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
142
     * AccountPersonListParams#extraParams} for the field documentation.
143
     */
144
    public Builder putExtraParam(String key, Object value) {
145
      if (this.extraParams == null) {
×
146
        this.extraParams = new HashMap<>();
×
147
      }
148
      this.extraParams.put(key, value);
×
149
      return this;
×
150
    }
151

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

165
    /**
166
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
167
     * default is 10.
168
     */
169
    public Builder setLimit(Long limit) {
170
      this.limit = limit;
1✔
171
      return this;
1✔
172
    }
173

174
    /**
175
     * Filters on the list of people returned based on the person's relationship to the account's
176
     * company.
177
     */
178
    public Builder setRelationship(AccountPersonListParams.Relationship relationship) {
179
      this.relationship = relationship;
×
180
      return this;
×
181
    }
182

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

195
  @Getter
196
  public static class Relationship {
197
    /**
198
     * A filter on the list of people returned based on whether these people are authorizers of the
199
     * account's representative.
200
     */
201
    @SerializedName("authorizer")
202
    Boolean authorizer;
203

204
    /**
205
     * A filter on the list of people returned based on whether these people are directors of the
206
     * account's company.
207
     */
208
    @SerializedName("director")
209
    Boolean director;
210

211
    /**
212
     * A filter on the list of people returned based on whether these people are executives of the
213
     * account's company.
214
     */
215
    @SerializedName("executive")
216
    Boolean executive;
217

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

227
    /**
228
     * A filter on the list of people returned based on whether these people are legal guardians of
229
     * the account's representative.
230
     */
231
    @SerializedName("legal_guardian")
232
    Boolean legalGuardian;
233

234
    /**
235
     * A filter on the list of people returned based on whether these people are owners of the
236
     * account's company.
237
     */
238
    @SerializedName("owner")
239
    Boolean owner;
240

241
    /**
242
     * A filter on the list of people returned based on whether these people are the representative
243
     * of the account's company.
244
     */
245
    @SerializedName("representative")
246
    Boolean representative;
247

248
    private Relationship(
249
        Boolean authorizer,
250
        Boolean director,
251
        Boolean executive,
252
        Map<String, Object> extraParams,
253
        Boolean legalGuardian,
254
        Boolean owner,
255
        Boolean representative) {
×
NEW
256
      this.authorizer = authorizer;
×
257
      this.director = director;
×
258
      this.executive = executive;
×
259
      this.extraParams = extraParams;
×
260
      this.legalGuardian = legalGuardian;
×
261
      this.owner = owner;
×
262
      this.representative = representative;
×
263
    }
×
264

265
    public static Builder builder() {
266
      return new Builder();
×
267
    }
268

269
    public static class Builder {
×
270
      private Boolean authorizer;
271

272
      private Boolean director;
273

274
      private Boolean executive;
275

276
      private Map<String, Object> extraParams;
277

278
      private Boolean legalGuardian;
279

280
      private Boolean owner;
281

282
      private Boolean representative;
283

284
      /** Finalize and obtain parameter instance from this builder. */
285
      public AccountPersonListParams.Relationship build() {
286
        return new AccountPersonListParams.Relationship(
×
287
            this.authorizer,
288
            this.director,
289
            this.executive,
290
            this.extraParams,
291
            this.legalGuardian,
292
            this.owner,
293
            this.representative);
294
      }
295

296
      /**
297
       * A filter on the list of people returned based on whether these people are authorizers of
298
       * the account's representative.
299
       */
300
      public Builder setAuthorizer(Boolean authorizer) {
NEW
301
        this.authorizer = authorizer;
×
NEW
302
        return this;
×
303
      }
304

305
      /**
306
       * A filter on the list of people returned based on whether these people are directors of the
307
       * account's company.
308
       */
309
      public Builder setDirector(Boolean director) {
310
        this.director = director;
×
311
        return this;
×
312
      }
313

314
      /**
315
       * A filter on the list of people returned based on whether these people are executives of the
316
       * account's company.
317
       */
318
      public Builder setExecutive(Boolean executive) {
319
        this.executive = executive;
×
320
        return this;
×
321
      }
322

323
      /**
324
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
325
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
326
       * AccountPersonListParams.Relationship#extraParams} for the field documentation.
327
       */
328
      public Builder putExtraParam(String key, Object value) {
329
        if (this.extraParams == null) {
×
330
          this.extraParams = new HashMap<>();
×
331
        }
332
        this.extraParams.put(key, value);
×
333
        return this;
×
334
      }
335

336
      /**
337
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
338
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
339
       * See {@link AccountPersonListParams.Relationship#extraParams} for the field documentation.
340
       */
341
      public Builder putAllExtraParam(Map<String, Object> map) {
342
        if (this.extraParams == null) {
×
343
          this.extraParams = new HashMap<>();
×
344
        }
345
        this.extraParams.putAll(map);
×
346
        return this;
×
347
      }
348

349
      /**
350
       * A filter on the list of people returned based on whether these people are legal guardians
351
       * of the account's representative.
352
       */
353
      public Builder setLegalGuardian(Boolean legalGuardian) {
354
        this.legalGuardian = legalGuardian;
×
355
        return this;
×
356
      }
357

358
      /**
359
       * A filter on the list of people returned based on whether these people are owners of the
360
       * account's company.
361
       */
362
      public Builder setOwner(Boolean owner) {
363
        this.owner = owner;
×
364
        return this;
×
365
      }
366

367
      /**
368
       * A filter on the list of people returned based on whether these people are the
369
       * representative of the account's company.
370
       */
371
      public Builder setRepresentative(Boolean representative) {
372
        this.representative = representative;
×
373
        return this;
×
374
      }
375
    }
376
  }
377
}
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