Class MeterUsageRetrieveParams.Builder

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

public static class MeterUsageRetrieveParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public MeterUsageRetrieveParams build()
      Finalize and obtain parameter instance from this builder.
    • setCustomer

      public MeterUsageRetrieveParams.Builder setCustomer(String customer)
      Required. The customer id to fetch meter usage data for.
    • setEndTime

      public MeterUsageRetrieveParams.Builder setEndTime(Long endTime)
      Required. The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
    • addExpand

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

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

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

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

      Add an element to `meters` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See MeterUsageRetrieveParams.meters for the field documentation.
    • addAllMeter

      Add all elements to `meters` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See MeterUsageRetrieveParams.meters for the field documentation.
    • setStartTime

      public MeterUsageRetrieveParams.Builder setStartTime(Long startTime)
      Required. The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
    • setTimezone

      The timezone to use for the start and end times. Defaults to UTC if not specified.
    • setValueGroupingWindow

      public MeterUsageRetrieveParams.Builder setValueGroupingWindow(MeterUsageRetrieveParams.ValueGroupingWindow valueGroupingWindow)
      Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range.