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

stripe / stripe-java / #16725

08 Jan 2025 03:19PM UTC coverage: 12.341% (-0.04%) from 12.384%
#16725

Pull #1932

github

web-flow
Merge 1890010d3 into 9aeb03b42
Pull Request #1932: Update generated code for beta

29 of 1339 new or added lines in 25 files covered. (2.17%)

45 existing lines in 12 files now uncovered.

18905 of 153189 relevant lines covered (12.34%)

0.12 hits per line

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

23.29
/src/main/java/com/stripe/param/treasury/ReceivedCreditListParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.treasury;
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 ReceivedCreditListParams 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
  /** <strong>Required.</strong> The FinancialAccount that received the funds. */
37
  @SerializedName("financial_account")
38
  String financialAccount;
39

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

47
  /** Only return ReceivedCredits described by the flow. */
48
  @SerializedName("linked_flows")
49
  LinkedFlows linkedFlows;
50

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

60
  /**
61
   * Only return ReceivedCredits that have the given status: {@code succeeded} or {@code failed}.
62
   */
63
  @SerializedName("status")
64
  Status status;
65

66
  private ReceivedCreditListParams(
67
      String endingBefore,
68
      List<String> expand,
69
      Map<String, Object> extraParams,
70
      String financialAccount,
71
      Long limit,
72
      LinkedFlows linkedFlows,
73
      String startingAfter,
74
      Status status) {
1✔
75
    this.endingBefore = endingBefore;
1✔
76
    this.expand = expand;
1✔
77
    this.extraParams = extraParams;
1✔
78
    this.financialAccount = financialAccount;
1✔
79
    this.limit = limit;
1✔
80
    this.linkedFlows = linkedFlows;
1✔
81
    this.startingAfter = startingAfter;
1✔
82
    this.status = status;
1✔
83
  }
1✔
84

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

89
  public static class Builder {
1✔
90
    private String endingBefore;
91

92
    private List<String> expand;
93

94
    private Map<String, Object> extraParams;
95

96
    private String financialAccount;
97

98
    private Long limit;
99

100
    private LinkedFlows linkedFlows;
101

102
    private String startingAfter;
103

104
    private Status status;
105

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

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

130
    /**
131
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
132
     * subsequent calls adds additional elements to the original list. See {@link
133
     * ReceivedCreditListParams#expand} for the field documentation.
134
     */
135
    public Builder addExpand(String element) {
136
      if (this.expand == null) {
×
137
        this.expand = new ArrayList<>();
×
138
      }
139
      this.expand.add(element);
×
140
      return this;
×
141
    }
142

143
    /**
144
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
145
     * subsequent calls adds additional elements to the original list. See {@link
146
     * ReceivedCreditListParams#expand} for the field documentation.
147
     */
148
    public Builder addAllExpand(List<String> elements) {
149
      if (this.expand == null) {
×
150
        this.expand = new ArrayList<>();
×
151
      }
152
      this.expand.addAll(elements);
×
153
      return this;
×
154
    }
155

156
    /**
157
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
158
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
159
     * ReceivedCreditListParams#extraParams} for the field documentation.
160
     */
161
    public Builder putExtraParam(String key, Object value) {
162
      if (this.extraParams == null) {
×
163
        this.extraParams = new HashMap<>();
×
164
      }
165
      this.extraParams.put(key, value);
×
166
      return this;
×
167
    }
168

169
    /**
170
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
171
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
172
     * See {@link ReceivedCreditListParams#extraParams} for the field documentation.
173
     */
174
    public Builder putAllExtraParam(Map<String, Object> map) {
175
      if (this.extraParams == null) {
×
176
        this.extraParams = new HashMap<>();
×
177
      }
178
      this.extraParams.putAll(map);
×
179
      return this;
×
180
    }
181

182
    /** <strong>Required.</strong> The FinancialAccount that received the funds. */
183
    public Builder setFinancialAccount(String financialAccount) {
184
      this.financialAccount = financialAccount;
1✔
185
      return this;
1✔
186
    }
187

188
    /**
189
     * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the
190
     * default is 10.
191
     */
192
    public Builder setLimit(Long limit) {
193
      this.limit = limit;
1✔
194
      return this;
1✔
195
    }
196

197
    /** Only return ReceivedCredits described by the flow. */
198
    public Builder setLinkedFlows(ReceivedCreditListParams.LinkedFlows linkedFlows) {
199
      this.linkedFlows = linkedFlows;
×
200
      return this;
×
201
    }
202

203
    /**
204
     * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
205
     * place in the list. For instance, if you make a list request and receive 100 objects, ending
206
     * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
207
     * order to fetch the next page of the list.
208
     */
209
    public Builder setStartingAfter(String startingAfter) {
210
      this.startingAfter = startingAfter;
×
211
      return this;
×
212
    }
213

214
    /**
215
     * Only return ReceivedCredits that have the given status: {@code succeeded} or {@code failed}.
216
     */
217
    public Builder setStatus(ReceivedCreditListParams.Status status) {
218
      this.status = status;
×
219
      return this;
×
220
    }
221
  }
222

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

234
    /** <strong>Required.</strong> The source flow type. */
235
    @SerializedName("source_flow_type")
236
    SourceFlowType sourceFlowType;
237

238
    private LinkedFlows(Map<String, Object> extraParams, SourceFlowType sourceFlowType) {
×
239
      this.extraParams = extraParams;
×
240
      this.sourceFlowType = sourceFlowType;
×
241
    }
×
242

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

247
    public static class Builder {
×
248
      private Map<String, Object> extraParams;
249

250
      private SourceFlowType sourceFlowType;
251

252
      /** Finalize and obtain parameter instance from this builder. */
253
      public ReceivedCreditListParams.LinkedFlows build() {
254
        return new ReceivedCreditListParams.LinkedFlows(this.extraParams, this.sourceFlowType);
×
255
      }
256

257
      /**
258
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
259
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
260
       * ReceivedCreditListParams.LinkedFlows#extraParams} for the field documentation.
261
       */
262
      public Builder putExtraParam(String key, Object value) {
263
        if (this.extraParams == null) {
×
264
          this.extraParams = new HashMap<>();
×
265
        }
266
        this.extraParams.put(key, value);
×
267
        return this;
×
268
      }
269

270
      /**
271
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
272
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
273
       * See {@link ReceivedCreditListParams.LinkedFlows#extraParams} for the field documentation.
274
       */
275
      public Builder putAllExtraParam(Map<String, Object> map) {
276
        if (this.extraParams == null) {
×
277
          this.extraParams = new HashMap<>();
×
278
        }
279
        this.extraParams.putAll(map);
×
280
        return this;
×
281
      }
282

283
      /** <strong>Required.</strong> The source flow type. */
284
      public Builder setSourceFlowType(
285
          ReceivedCreditListParams.LinkedFlows.SourceFlowType sourceFlowType) {
286
        this.sourceFlowType = sourceFlowType;
×
287
        return this;
×
288
      }
289
    }
290

291
    public enum SourceFlowType implements ApiRequestParams.EnumParam {
×
292
      @SerializedName("credit_reversal")
×
293
      CREDIT_REVERSAL("credit_reversal"),
294

295
      @SerializedName("other")
×
296
      OTHER("other"),
297

298
      @SerializedName("outbound_payment")
×
299
      OUTBOUND_PAYMENT("outbound_payment"),
300

NEW
301
      @SerializedName("outbound_transfer")
×
302
      OUTBOUND_TRANSFER("outbound_transfer"),
303

UNCOV
304
      @SerializedName("payout")
×
305
      PAYOUT("payout");
306

307
      @Getter(onMethod_ = {@Override})
308
      private final String value;
309

310
      SourceFlowType(String value) {
×
311
        this.value = value;
×
312
      }
×
313
    }
314
  }
315

316
  public enum Status implements ApiRequestParams.EnumParam {
×
317
    @SerializedName("failed")
×
318
    FAILED("failed"),
319

320
    @SerializedName("succeeded")
×
321
    SUCCEEDED("succeeded");
322

323
    @Getter(onMethod_ = {@Override})
324
    private final String value;
325

326
    Status(String value) {
×
327
      this.value = value;
×
328
    }
×
329
  }
330
}
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