Package com.stripe.param
Class SubscriptionItemUsageRecordCreateParams.Builder
java.lang.Object
com.stripe.param.SubscriptionItemUsageRecordCreateParams.Builder
- Enclosing class:
- SubscriptionItemUsageRecordCreateParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand
(List<String> elements) Add all elements to `expand` list.Add an element to `expand` 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.Valid values areincrement
(default) orset
.setQuantity
(Long quantity) Required. The usage quantity for the specified timestamp.The timestamp for the usage event.setTimestamp
(Long timestamp) The timestamp for the usage event.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAction
public SubscriptionItemUsageRecordCreateParams.Builder setAction(SubscriptionItemUsageRecordCreateParams.Action action) Valid values areincrement
(default) orset
. When usingincrement
the specifiedquantity
will be added to the usage at the specified timestamp. Theset
action will overwrite the usage quantity at that timestamp. If the subscription has billing thresholds,increment
is the only allowed value. -
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. SeeSubscriptionItemUsageRecordCreateParams.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. SeeSubscriptionItemUsageRecordCreateParams.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. SeeSubscriptionItemUsageRecordCreateParams.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. SeeSubscriptionItemUsageRecordCreateParams.extraParams
for the field documentation. -
setQuantity
Required. The usage quantity for the specified timestamp. -
setTimestamp
public SubscriptionItemUsageRecordCreateParams.Builder setTimestamp(SubscriptionItemUsageRecordCreateParams.Timestamp timestamp) The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the providedsubscription_item
, and must not be in the future. When passing"now"
, Stripe records usage for the current time. Default is"now"
if a value is not provided. -
setTimestamp
The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the providedsubscription_item
, and must not be in the future. When passing"now"
, Stripe records usage for the current time. Default is"now"
if a value is not provided.
-