Class MeterEventCreateParams.Builder

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

public static class MeterEventCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public MeterEventCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setEventName

      public MeterEventCreateParams.Builder setEventName(String eventName)
      Required. The name of the meter event. Corresponds with the event_name field on a meter.
    • addExpand

      public MeterEventCreateParams.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 MeterEventCreateParams.expand for the field documentation.
    • addAllExpand

      public MeterEventCreateParams.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 MeterEventCreateParams.expand for the field documentation.
    • putExtraParam

      public MeterEventCreateParams.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 MeterEventCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public MeterEventCreateParams.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 MeterEventCreateParams.extraParams for the field documentation.
    • setIdentifier

      public MeterEventCreateParams.Builder setIdentifier(String identifier)
      A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
    • putPayload

      public MeterEventCreateParams.Builder putPayload(String key, String value)
      Add a key/value pair to `payload` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See MeterEventCreateParams.payload for the field documentation.
    • putAllPayload

      public MeterEventCreateParams.Builder putAllPayload(Map<String,String> map)
      Add all map key/value pairs to `payload` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See MeterEventCreateParams.payload for the field documentation.
    • setTimestamp

      public MeterEventCreateParams.Builder setTimestamp(Long timestamp)
      The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.