public static class SubscriptionItemDeleteParams.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SubscriptionItemDeleteParams |
build()
Finalize and obtain parameter instance from this builder.
|
SubscriptionItemDeleteParams.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
SubscriptionItemDeleteParams.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
SubscriptionItemDeleteParams.Builder |
setClearUsage(java.lang.Boolean clearUsage)
Delete all usage for the given subscription item.
|
SubscriptionItemDeleteParams.Builder |
setProrationBehavior(SubscriptionItemDeleteParams.ProrationBehavior prorationBehavior)
Determines how to handle prorations when the
billing cycle changes (e.g., when switching plans, resetting
billing_cycle_anchor=now , or starting a trial), or if an item's quantity changes. |
SubscriptionItemDeleteParams.Builder |
setProrationDate(java.lang.Long prorationDate)
If set, the proration will be calculated as though the subscription was updated at the given
time.
|
public SubscriptionItemDeleteParams build()
public SubscriptionItemDeleteParams.Builder setClearUsage(java.lang.Boolean clearUsage)
usage_type
is metered
.public SubscriptionItemDeleteParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
SubscriptionItemDeleteParams.extraParams
for the field documentation.public SubscriptionItemDeleteParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
SubscriptionItemDeleteParams.extraParams
for the field documentation.public SubscriptionItemDeleteParams.Builder setProrationBehavior(SubscriptionItemDeleteParams.ProrationBehavior prorationBehavior)
billing_cycle_anchor=now
, or starting a trial), or if an item's quantity
changes.
Valid values are create_prorations
, none
, or always_invoice
.
Passing create_prorations
will cause proration invoice items to be created when
applicable. These proration items will only be invoiced immediately under certain
conditions. In order to always invoice immediately for prorations, pass always_invoice
.
Prorations can be disabled by passing none
.
public SubscriptionItemDeleteParams.Builder setProrationDate(java.lang.Long prorationDate)