Package com.stripe.param
Class SubscriptionItemDeleteParams.Builder
- java.lang.Object
-
- com.stripe.param.SubscriptionItemDeleteParams.Builder
-
- Enclosing class:
- SubscriptionItemDeleteParams
public static class SubscriptionItemDeleteParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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, resettingbilling_cycle_anchor=now
, or starting a trial), or if an item'squantity
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.
-
-
-
Method Detail
-
build
public SubscriptionItemDeleteParams build()
Finalize and obtain parameter instance from this builder.
-
setClearUsage
public SubscriptionItemDeleteParams.Builder setClearUsage(java.lang.Boolean clearUsage)
Delete all usage for the given subscription item. Allowed only when the current plan'susage_type
ismetered
.
-
putExtraParam
public SubscriptionItemDeleteParams.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. SeeSubscriptionItemDeleteParams.extraParams
for the field documentation.
-
putAllExtraParam
public SubscriptionItemDeleteParams.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. SeeSubscriptionItemDeleteParams.extraParams
for the field documentation.
-
setProrationBehavior
public SubscriptionItemDeleteParams.Builder setProrationBehavior(SubscriptionItemDeleteParams.ProrationBehavior prorationBehavior)
Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resettingbilling_cycle_anchor=now
, or starting a trial), or if an item'squantity
changes. Valid values arecreate_prorations
,none
, oralways_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, passalways_invoice
.Prorations can be disabled by passing
none
.
-
setProrationDate
public SubscriptionItemDeleteParams.Builder setProrationDate(java.lang.Long prorationDate)
If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
-
-