Package com.stripe.param
Class UsageRecordCreateOnSubscriptionItemParams.Builder
- java.lang.Object
-
- com.stripe.param.UsageRecordCreateOnSubscriptionItemParams.Builder
-
- Enclosing class:
- UsageRecordCreateOnSubscriptionItemParams
public static class UsageRecordCreateOnSubscriptionItemParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UsageRecordCreateOnSubscriptionItemParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.UsageRecordCreateOnSubscriptionItemParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.UsageRecordCreateOnSubscriptionItemParamsbuild()Finalize and obtain parameter instance from this builder.UsageRecordCreateOnSubscriptionItemParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.UsageRecordCreateOnSubscriptionItemParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.UsageRecordCreateOnSubscriptionItemParams.BuildersetAction(UsageRecordCreateOnSubscriptionItemParams.Action action)Valid values areincrement(default) orset.UsageRecordCreateOnSubscriptionItemParams.BuildersetQuantity(java.lang.Long quantity)The usage quantity for the specified timestamp.UsageRecordCreateOnSubscriptionItemParams.BuildersetTimestamp(java.lang.Long timestamp)The timestamp for the usage event.
-
-
-
Method Detail
-
build
public UsageRecordCreateOnSubscriptionItemParams build()
Finalize and obtain parameter instance from this builder.
-
setAction
public UsageRecordCreateOnSubscriptionItemParams.Builder setAction(UsageRecordCreateOnSubscriptionItemParams.Action action)
Valid values areincrement(default) orset. When usingincrementthe specifiedquantitywill be added to the usage at the specified timestamp. Thesetaction will overwrite the usage quantity at that timestamp. If the subscription has billing thresholds,incrementis the only allowed value.
-
addExpand
public UsageRecordCreateOnSubscriptionItemParams.Builder addExpand(java.lang.String element)
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. SeeUsageRecordCreateOnSubscriptionItemParams.expandfor the field documentation.
-
addAllExpand
public UsageRecordCreateOnSubscriptionItemParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
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. SeeUsageRecordCreateOnSubscriptionItemParams.expandfor the field documentation.
-
putExtraParam
public UsageRecordCreateOnSubscriptionItemParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
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. SeeUsageRecordCreateOnSubscriptionItemParams.extraParamsfor the field documentation.
-
putAllExtraParam
public UsageRecordCreateOnSubscriptionItemParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
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. SeeUsageRecordCreateOnSubscriptionItemParams.extraParamsfor the field documentation.
-
setQuantity
public UsageRecordCreateOnSubscriptionItemParams.Builder setQuantity(java.lang.Long quantity)
The usage quantity for the specified timestamp.
-
setTimestamp
public UsageRecordCreateOnSubscriptionItemParams.Builder setTimestamp(java.lang.Long timestamp)
The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the providedsubscription_item.
-
-