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

stripe / stripe-java / #16418

13 Sep 2024 05:53PM UTC coverage: 12.856% (-0.02%) from 12.874%
#16418

push

github

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

Update generated code for beta

9 of 344 new or added lines in 28 files covered. (2.62%)

10 existing lines in 8 files now uncovered.

18470 of 143664 relevant lines covered (12.86%)

0.13 hits per line

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

20.99
/src/main/java/com/stripe/param/issuing/TransactionListParams.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 TransactionListParams extends ApiRequestParams {
14
  /** Only return transactions that belong to the given card. */
15
  @SerializedName("card")
16
  String card;
17

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

22
  /** Only return transactions 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
  /** Only return transactions that are associated with the given settlement. */
56
  @SerializedName("settlement")
57
  String settlement;
58

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

68
  /**
69
   * Only return transactions that have the given type. One of {@code capture} or {@code refund}.
70
   */
71
  @SerializedName("type")
72
  Type type;
73

74
  private TransactionListParams(
75
      String card,
76
      String cardholder,
77
      Object created,
78
      String endingBefore,
79
      List<String> expand,
80
      Map<String, Object> extraParams,
81
      Long limit,
82
      String settlement,
83
      String startingAfter,
84
      Type type) {
1✔
85
    this.card = card;
1✔
86
    this.cardholder = cardholder;
1✔
87
    this.created = created;
1✔
88
    this.endingBefore = endingBefore;
1✔
89
    this.expand = expand;
1✔
90
    this.extraParams = extraParams;
1✔
91
    this.limit = limit;
1✔
92
    this.settlement = settlement;
1✔
93
    this.startingAfter = startingAfter;
1✔
94
    this.type = type;
1✔
95
  }
1✔
96

97
  public static Builder builder() {
98
    return new Builder();
1✔
99
  }
100

101
  public static class Builder {
1✔
102
    private String card;
103

104
    private String cardholder;
105

106
    private Object created;
107

108
    private String endingBefore;
109

110
    private List<String> expand;
111

112
    private Map<String, Object> extraParams;
113

114
    private Long limit;
115

116
    private String settlement;
117

118
    private String startingAfter;
119

120
    private Type type;
121

122
    /** Finalize and obtain parameter instance from this builder. */
123
    public TransactionListParams build() {
124
      return new TransactionListParams(
1✔
125
          this.card,
126
          this.cardholder,
127
          this.created,
128
          this.endingBefore,
129
          this.expand,
130
          this.extraParams,
131
          this.limit,
132
          this.settlement,
133
          this.startingAfter,
134
          this.type);
135
    }
136

137
    /** Only return transactions that belong to the given card. */
138
    public Builder setCard(String card) {
139
      this.card = card;
×
140
      return this;
×
141
    }
142

143
    /** Only return transactions that belong to the given cardholder. */
144
    public Builder setCardholder(String cardholder) {
145
      this.cardholder = cardholder;
×
146
      return this;
×
147
    }
148

149
    /** Only return transactions that were created during the given date interval. */
150
    public Builder setCreated(TransactionListParams.Created created) {
151
      this.created = created;
×
152
      return this;
×
153
    }
154

155
    /** Only return transactions that were created during the given date interval. */
156
    public Builder setCreated(Long created) {
157
      this.created = created;
×
158
      return this;
×
159
    }
160

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

172
    /**
173
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
174
     * subsequent calls adds additional elements to the original list. See {@link
175
     * TransactionListParams#expand} for the field documentation.
176
     */
177
    public Builder addExpand(String element) {
178
      if (this.expand == null) {
×
179
        this.expand = new ArrayList<>();
×
180
      }
181
      this.expand.add(element);
×
182
      return this;
×
183
    }
184

185
    /**
186
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
187
     * subsequent calls adds additional elements to the original list. See {@link
188
     * TransactionListParams#expand} for the field documentation.
189
     */
190
    public Builder addAllExpand(List<String> elements) {
191
      if (this.expand == null) {
×
192
        this.expand = new ArrayList<>();
×
193
      }
194
      this.expand.addAll(elements);
×
195
      return this;
×
196
    }
197

198
    /**
199
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
200
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
201
     * TransactionListParams#extraParams} for the field documentation.
202
     */
203
    public Builder putExtraParam(String key, Object value) {
204
      if (this.extraParams == null) {
×
205
        this.extraParams = new HashMap<>();
×
206
      }
207
      this.extraParams.put(key, value);
×
208
      return this;
×
209
    }
210

211
    /**
212
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
213
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
214
     * See {@link TransactionListParams#extraParams} for the field documentation.
215
     */
216
    public Builder putAllExtraParam(Map<String, Object> map) {
217
      if (this.extraParams == null) {
×
218
        this.extraParams = new HashMap<>();
×
219
      }
220
      this.extraParams.putAll(map);
×
221
      return this;
×
222
    }
223

224
    /**
225
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
226
     * default is 10.
227
     */
228
    public Builder setLimit(Long limit) {
229
      this.limit = limit;
1✔
230
      return this;
1✔
231
    }
232

233
    /** Only return transactions that are associated with the given settlement. */
234
    public Builder setSettlement(String settlement) {
NEW
235
      this.settlement = settlement;
×
NEW
236
      return this;
×
237
    }
238

239
    /**
240
     * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
241
     * place in the list. For instance, if you make a list request and receive 100 objects, ending
242
     * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
243
     * order to fetch the next page of the list.
244
     */
245
    public Builder setStartingAfter(String startingAfter) {
246
      this.startingAfter = startingAfter;
×
247
      return this;
×
248
    }
249

250
    /**
251
     * Only return transactions that have the given type. One of {@code capture} or {@code refund}.
252
     */
253
    public Builder setType(TransactionListParams.Type type) {
254
      this.type = type;
×
255
      return this;
×
256
    }
257
  }
258

259
  @Getter
260
  public static class Created {
261
    /**
262
     * Map of extra parameters for custom features not available in this client library. The content
263
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
264
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
265
     * param object. Effectively, this map is flattened to its parent instance.
266
     */
267
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
268
    Map<String, Object> extraParams;
269

270
    /** Minimum value to filter by (exclusive). */
271
    @SerializedName("gt")
272
    Long gt;
273

274
    /** Minimum value to filter by (inclusive). */
275
    @SerializedName("gte")
276
    Long gte;
277

278
    /** Maximum value to filter by (exclusive). */
279
    @SerializedName("lt")
280
    Long lt;
281

282
    /** Maximum value to filter by (inclusive). */
283
    @SerializedName("lte")
284
    Long lte;
285

286
    private Created(Map<String, Object> extraParams, Long gt, Long gte, Long lt, Long lte) {
×
287
      this.extraParams = extraParams;
×
288
      this.gt = gt;
×
289
      this.gte = gte;
×
290
      this.lt = lt;
×
291
      this.lte = lte;
×
292
    }
×
293

294
    public static Builder builder() {
295
      return new Builder();
×
296
    }
297

298
    public static class Builder {
×
299
      private Map<String, Object> extraParams;
300

301
      private Long gt;
302

303
      private Long gte;
304

305
      private Long lt;
306

307
      private Long lte;
308

309
      /** Finalize and obtain parameter instance from this builder. */
310
      public TransactionListParams.Created build() {
311
        return new TransactionListParams.Created(
×
312
            this.extraParams, this.gt, this.gte, this.lt, this.lte);
313
      }
314

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

328
      /**
329
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
330
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
331
       * See {@link TransactionListParams.Created#extraParams} for the field documentation.
332
       */
333
      public Builder putAllExtraParam(Map<String, Object> map) {
334
        if (this.extraParams == null) {
×
335
          this.extraParams = new HashMap<>();
×
336
        }
337
        this.extraParams.putAll(map);
×
338
        return this;
×
339
      }
340

341
      /** Minimum value to filter by (exclusive). */
342
      public Builder setGt(Long gt) {
343
        this.gt = gt;
×
344
        return this;
×
345
      }
346

347
      /** Minimum value to filter by (inclusive). */
348
      public Builder setGte(Long gte) {
349
        this.gte = gte;
×
350
        return this;
×
351
      }
352

353
      /** Maximum value to filter by (exclusive). */
354
      public Builder setLt(Long lt) {
355
        this.lt = lt;
×
356
        return this;
×
357
      }
358

359
      /** Maximum value to filter by (inclusive). */
360
      public Builder setLte(Long lte) {
361
        this.lte = lte;
×
362
        return this;
×
363
      }
364
    }
365
  }
366

367
  public enum Type implements ApiRequestParams.EnumParam {
×
368
    @SerializedName("capture")
×
369
    CAPTURE("capture"),
370

371
    @SerializedName("refund")
×
372
    REFUND("refund");
373

374
    @Getter(onMethod_ = {@Override})
375
    private final String value;
376

377
    Type(String value) {
×
378
      this.value = value;
×
379
    }
×
380
  }
381
}
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