Package com.stripe.param.billing
Class MeterUsageRetrieveParams.Builder
java.lang.Object
com.stripe.param.billing.MeterUsageRetrieveParams.Builder
- Enclosing class:
- MeterUsageRetrieveParams
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand
(List<String> elements) Add all elements to `expand` list.addAllMeter
(List<MeterUsageRetrieveParams.Meter> elements) Add all elements to `meters` list.Add an element to `expand` list.addMeter
(MeterUsageRetrieveParams.Meter element) Add an element to `meters` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.setCustomer
(String customer) Required. The customer id to fetch meter usage data for.setEndTime
(Long endTime) Required. The timestamp from when to stop aggregating meter events (exclusive).setStartTime
(Long startTime) Required. The timestamp from when to start aggregating meter events (inclusive).setTimezone
(MeterUsageRetrieveParams.Timezone timezone) The timezone to use for the start and end times.setValueGroupingWindow
(MeterUsageRetrieveParams.ValueGroupingWindow valueGroupingWindow) Specifies what granularity to use when aggregating meter usage events.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setCustomer
Required. The customer id to fetch meter usage data for. -
setEndTime
Required. The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. -
addExpand
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeMeterUsageRetrieveParams.expand
for the field documentation. -
addAllExpand
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeMeterUsageRetrieveParams.expand
for the field documentation. -
putExtraParam
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeMeterUsageRetrieveParams.extraParams
for the field documentation. -
putAllExtraParam
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeMeterUsageRetrieveParams.extraParams
for the field documentation. -
addMeter
Add an element to `meters` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeMeterUsageRetrieveParams.meters
for the field documentation. -
addAllMeter
Add all elements to `meters` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeMeterUsageRetrieveParams.meters
for the field documentation. -
setStartTime
Required. The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. -
setTimezone
The timezone to use for the start and end times. Defaults to UTC if not specified. -
setValueGroupingWindow
public MeterUsageRetrieveParams.Builder setValueGroupingWindow(MeterUsageRetrieveParams.ValueGroupingWindow valueGroupingWindow) Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range.
-