Class MeterCreateParams.Builder

java.lang.Object
com.stripe.param.billing.MeterCreateParams.Builder
Enclosing class:
MeterCreateParams

public static class MeterCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public MeterCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setCustomerMapping

      public MeterCreateParams.Builder setCustomerMapping(MeterCreateParams.CustomerMapping customerMapping)
      Fields that specify how to map a meter event to a customer.
    • setDefaultAggregation

      public MeterCreateParams.Builder setDefaultAggregation(MeterCreateParams.DefaultAggregation defaultAggregation)
      Required. The default settings to aggregate a meter's events with.
    • setDisplayName

      public MeterCreateParams.Builder setDisplayName(String displayName)
      Required. The meter's name.
    • setEventName

      public MeterCreateParams.Builder setEventName(String eventName)
      Required. The name of the meter event to record usage for. Corresponds with the event_name field on meter events.
    • setEventTimeWindow

      public MeterCreateParams.Builder setEventTimeWindow(MeterCreateParams.EventTimeWindow eventTimeWindow)
      The time window to pre-aggregate meter events for, if any.
    • addExpand

      public MeterCreateParams.Builder addExpand(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. See MeterCreateParams.expand for the field documentation.
    • addAllExpand

      public MeterCreateParams.Builder addAllExpand(List<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. See MeterCreateParams.expand for the field documentation.
    • putExtraParam

      public MeterCreateParams.Builder putExtraParam(String key, 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. See MeterCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public MeterCreateParams.Builder putAllExtraParam(Map<String,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 MeterCreateParams.extraParams for the field documentation.
    • setValueSettings

      public MeterCreateParams.Builder setValueSettings(MeterCreateParams.ValueSettings valueSettings)
      Fields that specify how to calculate a meter event's value.