Class SubscriptionItemDeleteParams.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setClearUsage

        public SubscriptionItemDeleteParams.Builder setClearUsage​(java.lang.Boolean clearUsage)
        Delete all usage for the given subscription item. Allowed only when the current plan's usage_type is metered.
      • 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. See SubscriptionItemDeleteParams.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, resetting 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.

      • 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.