Class SubscriptionItemUsageRecordCreateParams.Builder

java.lang.Object
com.stripe.param.SubscriptionItemUsageRecordCreateParams.Builder
Enclosing class:
SubscriptionItemUsageRecordCreateParams

public static class SubscriptionItemUsageRecordCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setAction

      Valid values are increment (default) or set. When using increment the specified quantity will be added to the usage at the specified timestamp. The set 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. See SubscriptionItemUsageRecordCreateParams.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. See SubscriptionItemUsageRecordCreateParams.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. See SubscriptionItemUsageRecordCreateParams.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. See SubscriptionItemUsageRecordCreateParams.extraParams for the field documentation.
    • setQuantity

      Required. The usage quantity for the specified timestamp.
    • setTimestamp

      The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided subscription_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

      public SubscriptionItemUsageRecordCreateParams.Builder setTimestamp(Long timestamp)
      The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided subscription_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.