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

stripe / stripe-java / #15179

15 Dec 2023 01:42AM UTC coverage: 14.029% (-0.1%) from 14.165%
#15179

push

github

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

Update generated code for beta

4 of 1279 new or added lines in 4 files covered. (0.31%)

18 existing lines in 3 files now uncovered.

17447 of 124368 relevant lines covered (14.03%)

0.14 hits per line

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

21.74
/src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.radar;
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 EarlyFraudWarningListParams extends ApiRequestParams {
14
  /** Only return early fraud warnings for the charge specified by this charge ID. */
15
  @SerializedName("charge")
16
  String charge;
17

18
  /** Only return early fraud warnings that were created during the given date interval. */
19
  @SerializedName("created")
20
  Object created;
21

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

31
  /** Specifies which fields in the response should be expanded. */
32
  @SerializedName("expand")
33
  List<String> expand;
34

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

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

51
  /**
52
   * Only return early fraud warnings for charges that were created by the PaymentIntent specified
53
   * by this PaymentIntent ID.
54
   */
55
  @SerializedName("payment_intent")
56
  String paymentIntent;
57

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

67
  private EarlyFraudWarningListParams(
68
      String charge,
69
      Object created,
70
      String endingBefore,
71
      List<String> expand,
72
      Map<String, Object> extraParams,
73
      Long limit,
74
      String paymentIntent,
75
      String startingAfter) {
1✔
76
    this.charge = charge;
1✔
77
    this.created = created;
1✔
78
    this.endingBefore = endingBefore;
1✔
79
    this.expand = expand;
1✔
80
    this.extraParams = extraParams;
1✔
81
    this.limit = limit;
1✔
82
    this.paymentIntent = paymentIntent;
1✔
83
    this.startingAfter = startingAfter;
1✔
84
  }
1✔
85

86
  public static Builder builder() {
87
    return new Builder();
1✔
88
  }
89

90
  public static class Builder {
1✔
91
    private String charge;
92

93
    private Object created;
94

95
    private String endingBefore;
96

97
    private List<String> expand;
98

99
    private Map<String, Object> extraParams;
100

101
    private Long limit;
102

103
    private String paymentIntent;
104

105
    private String startingAfter;
106

107
    /** Finalize and obtain parameter instance from this builder. */
108
    public EarlyFraudWarningListParams build() {
109
      return new EarlyFraudWarningListParams(
1✔
110
          this.charge,
111
          this.created,
112
          this.endingBefore,
113
          this.expand,
114
          this.extraParams,
115
          this.limit,
116
          this.paymentIntent,
117
          this.startingAfter);
118
    }
119

120
    /** Only return early fraud warnings for the charge specified by this charge ID. */
121
    public Builder setCharge(String charge) {
122
      this.charge = charge;
×
123
      return this;
×
124
    }
125

126
    /** Only return early fraud warnings that were created during the given date interval. */
127
    public Builder setCreated(EarlyFraudWarningListParams.Created created) {
NEW
128
      this.created = created;
×
NEW
129
      return this;
×
130
    }
131

132
    /** Only return early fraud warnings that were created during the given date interval. */
133
    public Builder setCreated(Long created) {
NEW
134
      this.created = created;
×
NEW
135
      return this;
×
136
    }
137

138
    /**
139
     * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place
140
     * in the list. For instance, if you make a list request and receive 100 objects, starting with
141
     * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to
142
     * fetch the previous page of the list.
143
     */
144
    public Builder setEndingBefore(String endingBefore) {
145
      this.endingBefore = endingBefore;
×
146
      return this;
×
147
    }
148

149
    /**
150
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
151
     * subsequent calls adds additional elements to the original list. See {@link
152
     * EarlyFraudWarningListParams#expand} for the field documentation.
153
     */
154
    public Builder addExpand(String element) {
155
      if (this.expand == null) {
×
156
        this.expand = new ArrayList<>();
×
157
      }
158
      this.expand.add(element);
×
159
      return this;
×
160
    }
161

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

175
    /**
176
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
177
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
178
     * EarlyFraudWarningListParams#extraParams} for the field documentation.
179
     */
180
    public Builder putExtraParam(String key, Object value) {
181
      if (this.extraParams == null) {
×
182
        this.extraParams = new HashMap<>();
×
183
      }
184
      this.extraParams.put(key, value);
×
185
      return this;
×
186
    }
187

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

201
    /**
202
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
203
     * default is 10.
204
     */
205
    public Builder setLimit(Long limit) {
206
      this.limit = limit;
1✔
207
      return this;
1✔
208
    }
209

210
    /**
211
     * Only return early fraud warnings for charges that were created by the PaymentIntent specified
212
     * by this PaymentIntent ID.
213
     */
214
    public Builder setPaymentIntent(String paymentIntent) {
215
      this.paymentIntent = paymentIntent;
×
216
      return this;
×
217
    }
218

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

231
  @Getter
232
  public static class Created {
233
    /**
234
     * Map of extra parameters for custom features not available in this client library. The content
235
     * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
236
     * key/value pair is serialized as if the key is a root-level field (serialized) name in this
237
     * param object. Effectively, this map is flattened to its parent instance.
238
     */
239
    @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
240
    Map<String, Object> extraParams;
241

242
    /** Minimum value to filter by (exclusive). */
243
    @SerializedName("gt")
244
    Long gt;
245

246
    /** Minimum value to filter by (inclusive). */
247
    @SerializedName("gte")
248
    Long gte;
249

250
    /** Maximum value to filter by (exclusive). */
251
    @SerializedName("lt")
252
    Long lt;
253

254
    /** Maximum value to filter by (inclusive). */
255
    @SerializedName("lte")
256
    Long lte;
257

NEW
258
    private Created(Map<String, Object> extraParams, Long gt, Long gte, Long lt, Long lte) {
×
NEW
259
      this.extraParams = extraParams;
×
NEW
260
      this.gt = gt;
×
NEW
261
      this.gte = gte;
×
NEW
262
      this.lt = lt;
×
NEW
263
      this.lte = lte;
×
NEW
264
    }
×
265

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

NEW
270
    public static class Builder {
×
271
      private Map<String, Object> extraParams;
272

273
      private Long gt;
274

275
      private Long gte;
276

277
      private Long lt;
278

279
      private Long lte;
280

281
      /** Finalize and obtain parameter instance from this builder. */
282
      public EarlyFraudWarningListParams.Created build() {
NEW
283
        return new EarlyFraudWarningListParams.Created(
×
284
            this.extraParams, this.gt, this.gte, this.lt, this.lte);
285
      }
286

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

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

313
      /** Minimum value to filter by (exclusive). */
314
      public Builder setGt(Long gt) {
NEW
315
        this.gt = gt;
×
NEW
316
        return this;
×
317
      }
318

319
      /** Minimum value to filter by (inclusive). */
320
      public Builder setGte(Long gte) {
NEW
321
        this.gte = gte;
×
NEW
322
        return this;
×
323
      }
324

325
      /** Maximum value to filter by (exclusive). */
326
      public Builder setLt(Long lt) {
NEW
327
        this.lt = lt;
×
NEW
328
        return this;
×
329
      }
330

331
      /** Maximum value to filter by (inclusive). */
332
      public Builder setLte(Long lte) {
NEW
333
        this.lte = lte;
×
NEW
334
        return this;
×
335
      }
336
    }
337
  }
338
}
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