Class MeterEvent

All Implemented Interfaces:
StripeActiveObject, StripeObjectInterface

public class MeterEvent extends ApiResource
A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
  • Constructor Details

    • MeterEvent

      public MeterEvent()
  • Method Details

    • create

      public static MeterEvent create(Map<String,Object> params) throws StripeException
      Creates a billing meter event.
      Throws:
      StripeException
    • create

      public static MeterEvent create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates a billing meter event.
      Throws:
      StripeException
    • create

      public static MeterEvent create(MeterEventCreateParams params) throws StripeException
      Creates a billing meter event.
      Throws:
      StripeException
    • create

      public static MeterEvent create(MeterEventCreateParams params, RequestOptions options) throws StripeException
      Creates a billing meter event.
      Throws:
      StripeException
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getEventName

      public String getEventName()
      The name of the meter event. Corresponds with the event_name field on a meter.
    • getIdentifier

      public String getIdentifier()
      A unique identifier for the event.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to billing.meter_event.

    • getPayload

      public Map<String,String> getPayload()
      The payload of the event. This contains the fields corresponding to a meter's customer_mapping.event_payload_key (default is stripe_customer_id) and value_settings.event_payload_key (default is value). Read more about the payload.
    • getTimestamp

      public Long getTimestamp()
      The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setEventName

      public void setEventName(String eventName)
      The name of the meter event. Corresponds with the event_name field on a meter.
    • setIdentifier

      public void setIdentifier(String identifier)
      A unique identifier for the event.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to billing.meter_event.

    • setPayload

      public void setPayload(Map<String,String> payload)
      The payload of the event. This contains the fields corresponding to a meter's customer_mapping.event_payload_key (default is stripe_customer_id) and value_settings.event_payload_key (default is value). Read more about the payload.
    • setTimestamp

      public void setTimestamp(Long timestamp)
      The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object