Skip to content

Commit 589fa70

Browse files
Update generated code for v2090 and
1 parent 57e00c1 commit 589fa70

File tree

7 files changed

+201
-2
lines changed

7 files changed

+201
-2
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b3c36f1e05eaa7339c3d0d5e862e76cfff6c6bed
1+
563ac1cd28e814b537e2f46a58f9d90cf654aa2c

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2080
1+
v2090

src/main/java/com/stripe/model/billing/Meter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.stripe.param.billing.MeterReactivateParams;
1919
import com.stripe.param.billing.MeterRetrieveParams;
2020
import com.stripe.param.billing.MeterUpdateParams;
21+
import java.util.List;
2122
import java.util.Map;
2223
import lombok.EqualsAndHashCode;
2324
import lombok.Getter;
@@ -45,6 +46,10 @@ public class Meter extends ApiResource implements HasId {
4546
@SerializedName("default_aggregation")
4647
DefaultAggregation defaultAggregation;
4748

49+
/** Set of keys that will be used to group meter events by. */
50+
@SerializedName("dimension_payload_keys")
51+
List<String> dimensionPayloadKeys;
52+
4853
/** The meter's name. */
4954
@SerializedName("display_name")
5055
String displayName;

src/main/java/com/stripe/model/billing/MeterEventSummary.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public class MeterEventSummary extends ApiResource implements HasId {
3535
@SerializedName("aggregated_value")
3636
BigDecimal aggregatedValue;
3737

38+
/** Key-value pairs of dimension values for event summaries with grouping on dimensions. */
39+
@SerializedName("dimensions")
40+
Map<String, String> dimensions;
41+
3842
/** End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. */
3943
@SerializedName("end_time")
4044
Long endTime;

src/main/java/com/stripe/param/billing/MeterCreateParams.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ public class MeterCreateParams extends ApiRequestParams {
2121
@SerializedName("default_aggregation")
2222
DefaultAggregation defaultAggregation;
2323

24+
/**
25+
* Set of keys that will be used to group meter events by. Each key must be present in the event
26+
* payload.
27+
*/
28+
@SerializedName("dimension_payload_keys")
29+
List<String> dimensionPayloadKeys;
30+
2431
/** <strong>Required.</strong> The meter’s name. Not visible to the customer. */
2532
@SerializedName("display_name")
2633
String displayName;
@@ -56,6 +63,7 @@ public class MeterCreateParams extends ApiRequestParams {
5663
private MeterCreateParams(
5764
CustomerMapping customerMapping,
5865
DefaultAggregation defaultAggregation,
66+
List<String> dimensionPayloadKeys,
5967
String displayName,
6068
String eventName,
6169
EventTimeWindow eventTimeWindow,
@@ -64,6 +72,7 @@ private MeterCreateParams(
6472
ValueSettings valueSettings) {
6573
this.customerMapping = customerMapping;
6674
this.defaultAggregation = defaultAggregation;
75+
this.dimensionPayloadKeys = dimensionPayloadKeys;
6776
this.displayName = displayName;
6877
this.eventName = eventName;
6978
this.eventTimeWindow = eventTimeWindow;
@@ -81,6 +90,8 @@ public static class Builder {
8190

8291
private DefaultAggregation defaultAggregation;
8392

93+
private List<String> dimensionPayloadKeys;
94+
8495
private String displayName;
8596

8697
private String eventName;
@@ -98,6 +109,7 @@ public MeterCreateParams build() {
98109
return new MeterCreateParams(
99110
this.customerMapping,
100111
this.defaultAggregation,
112+
this.dimensionPayloadKeys,
101113
this.displayName,
102114
this.eventName,
103115
this.eventTimeWindow,
@@ -118,6 +130,32 @@ public Builder setDefaultAggregation(MeterCreateParams.DefaultAggregation defaul
118130
return this;
119131
}
120132

133+
/**
134+
* Add an element to `dimensionPayloadKeys` list. A list is initialized for the first
135+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
136+
* {@link MeterCreateParams#dimensionPayloadKeys} for the field documentation.
137+
*/
138+
public Builder addDimensionPayloadKey(String element) {
139+
if (this.dimensionPayloadKeys == null) {
140+
this.dimensionPayloadKeys = new ArrayList<>();
141+
}
142+
this.dimensionPayloadKeys.add(element);
143+
return this;
144+
}
145+
146+
/**
147+
* Add all elements to `dimensionPayloadKeys` list. A list is initialized for the first
148+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
149+
* {@link MeterCreateParams#dimensionPayloadKeys} for the field documentation.
150+
*/
151+
public Builder addAllDimensionPayloadKey(List<String> elements) {
152+
if (this.dimensionPayloadKeys == null) {
153+
this.dimensionPayloadKeys = new ArrayList<>();
154+
}
155+
this.dimensionPayloadKeys.addAll(elements);
156+
return this;
157+
}
158+
121159
/** <strong>Required.</strong> The meter’s name. Not visible to the customer. */
122160
public Builder setDisplayName(String displayName) {
123161
this.displayName = displayName;

src/main/java/com/stripe/param/billing/MeterEventSummariesParams.java

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ public class MeterEventSummariesParams extends ApiRequestParams {
1717
@SerializedName("customer")
1818
String customer;
1919

20+
/**
21+
* Key-value pairs used to filter meter events by dimension values. If specified, event summaries
22+
* will be generated with only matching meter events.
23+
*/
24+
@SerializedName("dimension_filters")
25+
Map<String, String> dimensionFilters;
26+
27+
/**
28+
* List of dimension payload keys to group by. If specified, event summaries will be grouped by
29+
* the given dimension payload key values.
30+
*/
31+
@SerializedName("dimension_group_by_keys")
32+
List<String> dimensionGroupByKeys;
33+
2034
/**
2135
* <strong>Required.</strong> The timestamp from when to stop aggregating meter events
2236
* (exclusive). Must be aligned with minute boundaries.
@@ -80,6 +94,8 @@ public class MeterEventSummariesParams extends ApiRequestParams {
8094

8195
private MeterEventSummariesParams(
8296
String customer,
97+
Map<String, String> dimensionFilters,
98+
List<String> dimensionGroupByKeys,
8399
Long endTime,
84100
String endingBefore,
85101
List<String> expand,
@@ -89,6 +105,8 @@ private MeterEventSummariesParams(
89105
String startingAfter,
90106
ValueGroupingWindow valueGroupingWindow) {
91107
this.customer = customer;
108+
this.dimensionFilters = dimensionFilters;
109+
this.dimensionGroupByKeys = dimensionGroupByKeys;
92110
this.endTime = endTime;
93111
this.endingBefore = endingBefore;
94112
this.expand = expand;
@@ -106,6 +124,10 @@ public static Builder builder() {
106124
public static class Builder {
107125
private String customer;
108126

127+
private Map<String, String> dimensionFilters;
128+
129+
private List<String> dimensionGroupByKeys;
130+
109131
private Long endTime;
110132

111133
private String endingBefore;
@@ -126,6 +148,8 @@ public static class Builder {
126148
public MeterEventSummariesParams build() {
127149
return new MeterEventSummariesParams(
128150
this.customer,
151+
this.dimensionFilters,
152+
this.dimensionGroupByKeys,
129153
this.endTime,
130154
this.endingBefore,
131155
this.expand,
@@ -142,6 +166,58 @@ public Builder setCustomer(String customer) {
142166
return this;
143167
}
144168

169+
/**
170+
* Add a key/value pair to `dimensionFilters` 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 MeterEventSummariesParams#dimensionFilters} for the field documentation.
173+
*/
174+
public Builder putDimensionFilter(String key, String value) {
175+
if (this.dimensionFilters == null) {
176+
this.dimensionFilters = new HashMap<>();
177+
}
178+
this.dimensionFilters.put(key, value);
179+
return this;
180+
}
181+
182+
/**
183+
* Add all map key/value pairs to `dimensionFilters` map. A map is initialized for the first
184+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
185+
* See {@link MeterEventSummariesParams#dimensionFilters} for the field documentation.
186+
*/
187+
public Builder putAllDimensionFilter(Map<String, String> map) {
188+
if (this.dimensionFilters == null) {
189+
this.dimensionFilters = new HashMap<>();
190+
}
191+
this.dimensionFilters.putAll(map);
192+
return this;
193+
}
194+
195+
/**
196+
* Add an element to `dimensionGroupByKeys` list. A list is initialized for the first
197+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
198+
* {@link MeterEventSummariesParams#dimensionGroupByKeys} for the field documentation.
199+
*/
200+
public Builder addDimensionGroupByKey(String element) {
201+
if (this.dimensionGroupByKeys == null) {
202+
this.dimensionGroupByKeys = new ArrayList<>();
203+
}
204+
this.dimensionGroupByKeys.add(element);
205+
return this;
206+
}
207+
208+
/**
209+
* Add all elements to `dimensionGroupByKeys` list. A list is initialized for the first
210+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
211+
* {@link MeterEventSummariesParams#dimensionGroupByKeys} for the field documentation.
212+
*/
213+
public Builder addAllDimensionGroupByKey(List<String> elements) {
214+
if (this.dimensionGroupByKeys == null) {
215+
this.dimensionGroupByKeys = new ArrayList<>();
216+
}
217+
this.dimensionGroupByKeys.addAll(elements);
218+
return this;
219+
}
220+
145221
/**
146222
* <strong>Required.</strong> The timestamp from when to stop aggregating meter events
147223
* (exclusive). Must be aligned with minute boundaries.

src/main/java/com/stripe/param/billing/MeterEventSummaryListParams.java

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ public class MeterEventSummaryListParams extends ApiRequestParams {
1717
@SerializedName("customer")
1818
String customer;
1919

20+
/**
21+
* Key-value pairs used to filter meter events by dimension values. If specified, event summaries
22+
* will be generated with only matching meter events.
23+
*/
24+
@SerializedName("dimension_filters")
25+
Map<String, String> dimensionFilters;
26+
27+
/**
28+
* List of dimension payload keys to group by. If specified, event summaries will be grouped by
29+
* the given dimension payload key values.
30+
*/
31+
@SerializedName("dimension_group_by_keys")
32+
List<String> dimensionGroupByKeys;
33+
2034
/**
2135
* <strong>Required.</strong> The timestamp from when to stop aggregating meter events
2236
* (exclusive). Must be aligned with minute boundaries.
@@ -80,6 +94,8 @@ public class MeterEventSummaryListParams extends ApiRequestParams {
8094

8195
private MeterEventSummaryListParams(
8296
String customer,
97+
Map<String, String> dimensionFilters,
98+
List<String> dimensionGroupByKeys,
8399
Long endTime,
84100
String endingBefore,
85101
List<String> expand,
@@ -89,6 +105,8 @@ private MeterEventSummaryListParams(
89105
String startingAfter,
90106
ValueGroupingWindow valueGroupingWindow) {
91107
this.customer = customer;
108+
this.dimensionFilters = dimensionFilters;
109+
this.dimensionGroupByKeys = dimensionGroupByKeys;
92110
this.endTime = endTime;
93111
this.endingBefore = endingBefore;
94112
this.expand = expand;
@@ -106,6 +124,10 @@ public static Builder builder() {
106124
public static class Builder {
107125
private String customer;
108126

127+
private Map<String, String> dimensionFilters;
128+
129+
private List<String> dimensionGroupByKeys;
130+
109131
private Long endTime;
110132

111133
private String endingBefore;
@@ -126,6 +148,8 @@ public static class Builder {
126148
public MeterEventSummaryListParams build() {
127149
return new MeterEventSummaryListParams(
128150
this.customer,
151+
this.dimensionFilters,
152+
this.dimensionGroupByKeys,
129153
this.endTime,
130154
this.endingBefore,
131155
this.expand,
@@ -142,6 +166,58 @@ public Builder setCustomer(String customer) {
142166
return this;
143167
}
144168

169+
/**
170+
* Add a key/value pair to `dimensionFilters` 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 MeterEventSummaryListParams#dimensionFilters} for the field documentation.
173+
*/
174+
public Builder putDimensionFilter(String key, String value) {
175+
if (this.dimensionFilters == null) {
176+
this.dimensionFilters = new HashMap<>();
177+
}
178+
this.dimensionFilters.put(key, value);
179+
return this;
180+
}
181+
182+
/**
183+
* Add all map key/value pairs to `dimensionFilters` map. A map is initialized for the first
184+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
185+
* See {@link MeterEventSummaryListParams#dimensionFilters} for the field documentation.
186+
*/
187+
public Builder putAllDimensionFilter(Map<String, String> map) {
188+
if (this.dimensionFilters == null) {
189+
this.dimensionFilters = new HashMap<>();
190+
}
191+
this.dimensionFilters.putAll(map);
192+
return this;
193+
}
194+
195+
/**
196+
* Add an element to `dimensionGroupByKeys` list. A list is initialized for the first
197+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
198+
* {@link MeterEventSummaryListParams#dimensionGroupByKeys} for the field documentation.
199+
*/
200+
public Builder addDimensionGroupByKey(String element) {
201+
if (this.dimensionGroupByKeys == null) {
202+
this.dimensionGroupByKeys = new ArrayList<>();
203+
}
204+
this.dimensionGroupByKeys.add(element);
205+
return this;
206+
}
207+
208+
/**
209+
* Add all elements to `dimensionGroupByKeys` list. A list is initialized for the first
210+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
211+
* {@link MeterEventSummaryListParams#dimensionGroupByKeys} for the field documentation.
212+
*/
213+
public Builder addAllDimensionGroupByKey(List<String> elements) {
214+
if (this.dimensionGroupByKeys == null) {
215+
this.dimensionGroupByKeys = new ArrayList<>();
216+
}
217+
this.dimensionGroupByKeys.addAll(elements);
218+
return this;
219+
}
220+
145221
/**
146222
* <strong>Required.</strong> The timestamp from when to stop aggregating meter events
147223
* (exclusive). Must be aligned with minute boundaries.

0 commit comments

Comments
 (0)