• 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

0.0
/src/main/java/com/stripe/param/InvoiceRenderingTemplateListParams.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 InvoiceRenderingTemplateListParams 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
   * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
45
   * in the list. For instance, if you make a list request and receive 100 objects, ending with
46
   * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to
47
   * fetch the next page of the list.
48
   */
49
  @SerializedName("starting_after")
50
  String startingAfter;
51

52
  @SerializedName("status")
53
  Status status;
54

55
  private InvoiceRenderingTemplateListParams(
56
      String endingBefore,
57
      List<String> expand,
58
      Map<String, Object> extraParams,
59
      Long limit,
60
      String startingAfter,
NEW
61
      Status status) {
×
62
    this.endingBefore = endingBefore;
×
63
    this.expand = expand;
×
64
    this.extraParams = extraParams;
×
65
    this.limit = limit;
×
66
    this.startingAfter = startingAfter;
×
NEW
67
    this.status = status;
×
68
  }
×
69

70
  public static Builder builder() {
71
    return new Builder();
×
72
  }
73

74
  public static class Builder {
×
75
    private String endingBefore;
76

77
    private List<String> expand;
78

79
    private Map<String, Object> extraParams;
80

81
    private Long limit;
82

83
    private String startingAfter;
84

85
    private Status status;
86

87
    /** Finalize and obtain parameter instance from this builder. */
88
    public InvoiceRenderingTemplateListParams build() {
NEW
89
      return new InvoiceRenderingTemplateListParams(
×
90
          this.endingBefore,
91
          this.expand,
92
          this.extraParams,
93
          this.limit,
94
          this.startingAfter,
95
          this.status);
96
    }
97

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

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

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

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

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

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

170
    /**
171
     * A cursor for use in pagination. {@code starting_after} is an object ID that defines your
172
     * place in the list. For instance, if you make a list request and receive 100 objects, ending
173
     * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in
174
     * order to fetch the next page of the list.
175
     */
176
    public Builder setStartingAfter(String startingAfter) {
177
      this.startingAfter = startingAfter;
×
178
      return this;
×
179
    }
180

181
    public Builder setStatus(InvoiceRenderingTemplateListParams.Status status) {
NEW
182
      this.status = status;
×
NEW
183
      return this;
×
184
    }
185
  }
186

NEW
187
  public enum Status implements ApiRequestParams.EnumParam {
×
NEW
188
    @SerializedName("active")
×
189
    ACTIVE("active"),
190

NEW
191
    @SerializedName("archived")
×
192
    ARCHIVED("archived");
193

194
    @Getter(onMethod_ = {@Override})
195
    private final String value;
196

NEW
197
    Status(String value) {
×
NEW
198
      this.value = value;
×
NEW
199
    }
×
200
  }
201
}
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