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

stripe / stripe-java / #16517

08 Oct 2024 06:27PM UTC coverage: 12.74% (-0.2%) from 12.899%
#16517

push

github

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

Update generated code for beta

53 of 2404 new or added lines in 50 files covered. (2.2%)

91 existing lines in 27 files now uncovered.

18753 of 147196 relevant lines covered (12.74%)

0.13 hits per line

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

20.0
/src/main/java/com/stripe/param/issuing/AuthorizationListParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.issuing;
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 AuthorizationListParams extends ApiRequestParams {
14
  /** Only return authorizations that belong to the given card. */
15
  @SerializedName("card")
16
  String card;
17

18
  /** Only return authorizations that belong to the given cardholder. */
19
  @SerializedName("cardholder")
20
  String cardholder;
21

22
  /** Only return authorizations that were created during the given date interval. */
23
  @SerializedName("created")
24
  Object created;
25

26
  /**
27
   * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
28
   * in the list. For instance, if you make a list request and receive 100 objects, starting with
29
   * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
30
   * fetch the previous page of the list.
31
   */
32
  @SerializedName("ending_before")
33
  String endingBefore;
34

35
  /** Specifies which fields in the response should be expanded. */
36
  @SerializedName("expand")
37
  List<String> expand;
38

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

48
  /**
49
   * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
50
   * default is 10.
51
   */
52
  @SerializedName("limit")
53
  Long limit;
54

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

64
  /**
65
   * Only return authorizations with the given status. One of {@code pending}, {@code closed}, or
66
   * {@code reversed}.
67
   */
68
  @SerializedName("status")
69
  Status status;
70

71
  private AuthorizationListParams(
72
      String card,
73
      String cardholder,
74
      Object created,
75
      String endingBefore,
76
      List<String> expand,
77
      Map<String, Object> extraParams,
78
      Long limit,
79
      String startingAfter,
80
      Status status) {
1✔
81
    this.card = card;
1✔
82
    this.cardholder = cardholder;
1✔
83
    this.created = created;
1✔
84
    this.endingBefore = endingBefore;
1✔
85
    this.expand = expand;
1✔
86
    this.extraParams = extraParams;
1✔
87
    this.limit = limit;
1✔
88
    this.startingAfter = startingAfter;
1✔
89
    this.status = status;
1✔
90
  }
1✔
91

92
  public static Builder builder() {
93
    return new Builder();
1✔
94
  }
95

96
  public static class Builder {
1✔
97
    private String card;
98

99
    private String cardholder;
100

101
    private Object created;
102

103
    private String endingBefore;
104

105
    private List<String> expand;
106

107
    private Map<String, Object> extraParams;
108

109
    private Long limit;
110

111
    private String startingAfter;
112

113
    private Status status;
114

115
    /** Finalize and obtain parameter instance from this builder. */
116
    public AuthorizationListParams build() {
117
      return new AuthorizationListParams(
1✔
118
          this.card,
119
          this.cardholder,
120
          this.created,
121
          this.endingBefore,
122
          this.expand,
123
          this.extraParams,
124
          this.limit,
125
          this.startingAfter,
126
          this.status);
127
    }
128

129
    /** Only return authorizations that belong to the given card. */
130
    public Builder setCard(String card) {
131
      this.card = card;
×
132
      return this;
×
133
    }
134

135
    /** Only return authorizations that belong to the given cardholder. */
136
    public Builder setCardholder(String cardholder) {
137
      this.cardholder = cardholder;
×
138
      return this;
×
139
    }
140

141
    /** Only return authorizations that were created during the given date interval. */
142
    public Builder setCreated(AuthorizationListParams.Created created) {
143
      this.created = created;
×
144
      return this;
×
145
    }
146

147
    /** Only return authorizations that were created during the given date interval. */
148
    public Builder setCreated(Long created) {
149
      this.created = created;
×
150
      return this;
×
151
    }
152

153
    /**
154
     * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
155
     * in the list. For instance, if you make a list request and receive 100 objects, starting with
156
     * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
157
     * fetch the previous page of the list.
158
     */
159
    public Builder setEndingBefore(String endingBefore) {
160
      this.endingBefore = endingBefore;
×
161
      return this;
×
162
    }
163

164
    /**
165
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
166
     * subsequent calls adds additional elements to the original list. See {@link
167
     * AuthorizationListParams#expand} for the field documentation.
168
     */
169
    public Builder addExpand(String element) {
170
      if (this.expand == null) {
×
171
        this.expand = new ArrayList<>();
×
172
      }
173
      this.expand.add(element);
×
174
      return this;
×
175
    }
176

177
    /**
178
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
179
     * subsequent calls adds additional elements to the original list. See {@link
180
     * AuthorizationListParams#expand} for the field documentation.
181
     */
182
    public Builder addAllExpand(List<String> elements) {
183
      if (this.expand == null) {
×
184
        this.expand = new ArrayList<>();
×
185
      }
186
      this.expand.addAll(elements);
×
187
      return this;
×
188
    }
189

190
    /**
191
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
192
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
193
     * AuthorizationListParams#extraParams} for the field documentation.
194
     */
195
    public Builder putExtraParam(String key, Object value) {
196
      if (this.extraParams == null) {
×
197
        this.extraParams = new HashMap<>();
×
198
      }
199
      this.extraParams.put(key, value);
×
200
      return this;
×
201
    }
202

203
    /**
204
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
205
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
206
     * See {@link AuthorizationListParams#extraParams} for the field documentation.
207
     */
208
    public Builder putAllExtraParam(Map<String, Object> map) {
209
      if (this.extraParams == null) {
×
210
        this.extraParams = new HashMap<>();
×
211
      }
212
      this.extraParams.putAll(map);
×
213
      return this;
×
214
    }
215

216
    /**
217
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
218
     * default is 10.
219
     */
220
    public Builder setLimit(Long limit) {
221
      this.limit = limit;
1✔
222
      return this;
1✔
223
    }
224

225
    /**
226
     * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
227
     * place in the list. For instance, if you make a list request and receive 100 objects, ending
228
     * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
229
     * order to fetch the next page of the list.
230
     */
231
    public Builder setStartingAfter(String startingAfter) {
232
      this.startingAfter = startingAfter;
×
233
      return this;
×
234
    }
235

236
    /**
237
     * Only return authorizations with the given status. One of {@code pending}, {@code closed}, or
238
     * {@code reversed}.
239
     */
240
    public Builder setStatus(AuthorizationListParams.Status status) {
241
      this.status = status;
×
242
      return this;
×
243
    }
244
  }
245

246
  @Getter
247
  public static class Created {
248
    /**
249
     * Map of extra parameters for custom features not available in this client library. The content
250
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
251
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
252
     * param object. Effectively, this map is flattened to its parent instance.
253
     */
254
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
255
    Map<String, Object> extraParams;
256

257
    /** Minimum value to filter by (exclusive). */
258
    @SerializedName("gt")
259
    Long gt;
260

261
    /** Minimum value to filter by (inclusive). */
262
    @SerializedName("gte")
263
    Long gte;
264

265
    /** Maximum value to filter by (exclusive). */
266
    @SerializedName("lt")
267
    Long lt;
268

269
    /** Maximum value to filter by (inclusive). */
270
    @SerializedName("lte")
271
    Long lte;
272

273
    private Created(Map<String, Object> extraParams, Long gt, Long gte, Long lt, Long lte) {
×
274
      this.extraParams = extraParams;
×
275
      this.gt = gt;
×
276
      this.gte = gte;
×
277
      this.lt = lt;
×
278
      this.lte = lte;
×
279
    }
×
280

281
    public static Builder builder() {
282
      return new Builder();
×
283
    }
284

285
    public static class Builder {
×
286
      private Map<String, Object> extraParams;
287

288
      private Long gt;
289

290
      private Long gte;
291

292
      private Long lt;
293

294
      private Long lte;
295

296
      /** Finalize and obtain parameter instance from this builder. */
297
      public AuthorizationListParams.Created build() {
298
        return new AuthorizationListParams.Created(
×
299
            this.extraParams, this.gt, this.gte, this.lt, this.lte);
300
      }
301

302
      /**
303
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
304
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
305
       * AuthorizationListParams.Created#extraParams} for the field documentation.
306
       */
307
      public Builder putExtraParam(String key, Object value) {
308
        if (this.extraParams == null) {
×
309
          this.extraParams = new HashMap<>();
×
310
        }
311
        this.extraParams.put(key, value);
×
312
        return this;
×
313
      }
314

315
      /**
316
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
317
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
318
       * See {@link AuthorizationListParams.Created#extraParams} for the field documentation.
319
       */
320
      public Builder putAllExtraParam(Map<String, Object> map) {
321
        if (this.extraParams == null) {
×
322
          this.extraParams = new HashMap<>();
×
323
        }
324
        this.extraParams.putAll(map);
×
325
        return this;
×
326
      }
327

328
      /** Minimum value to filter by (exclusive). */
329
      public Builder setGt(Long gt) {
330
        this.gt = gt;
×
331
        return this;
×
332
      }
333

334
      /** Minimum value to filter by (inclusive). */
335
      public Builder setGte(Long gte) {
336
        this.gte = gte;
×
337
        return this;
×
338
      }
339

340
      /** Maximum value to filter by (exclusive). */
341
      public Builder setLt(Long lt) {
342
        this.lt = lt;
×
343
        return this;
×
344
      }
345

346
      /** Maximum value to filter by (inclusive). */
347
      public Builder setLte(Long lte) {
348
        this.lte = lte;
×
349
        return this;
×
350
      }
351
    }
352
  }
353

354
  public enum Status implements ApiRequestParams.EnumParam {
×
355
    @SerializedName("closed")
×
356
    CLOSED("closed"),
357

NEW
358
    @SerializedName("expired")
×
359
    EXPIRED("expired"),
360

UNCOV
361
    @SerializedName("pending")
×
362
    PENDING("pending"),
363

364
    @SerializedName("reversed")
×
365
    REVERSED("reversed");
366

367
    @Getter(onMethod_ = {@Override})
368
    private final String value;
369

370
    Status(String value) {
×
371
      this.value = value;
×
372
    }
×
373
  }
374
}
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