Package com.stripe.model.billing
Class MeterEvent
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.billing.MeterEvent
- All Implemented Interfaces:
StripeActiveObject,StripeObjectInterface
Meter events represent actions that customers take in your system. You can use meter events to
bill a customer based on their usage. Meter events are associated with billing meters, which
define both the contents of the event’s payload and how to aggregate those events.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic MeterEventcreate(MeterEventCreateParams params) Creates a billing meter event.static MeterEventcreate(MeterEventCreateParams params, RequestOptions options) Creates a billing meter event.static MeterEventCreates a billing meter event.static MeterEventcreate(Map<String, Object> params, RequestOptions options) Creates a billing meter event.booleanTime at which the object was created.The name of the meter event.A unique identifier for the event.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.String representing the object's type.The payload of the event.The timestamp passed in when creating the event.inthashCode()voidsetCreated(Long created) Time at which the object was created.voidsetEventName(String eventName) The name of the meter event.voidsetIdentifier(String identifier) A unique identifier for the event.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidString representing the object's type.voidsetPayload(Map<String, String> payload) The payload of the event.voidsetTimestamp(Long timestamp) The timestamp passed in when creating the event.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, setResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
MeterEvent
public MeterEvent()
-
-
Method Details
-
create
Creates a billing meter event.- Throws:
StripeException
-
create
public static MeterEvent create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a billing meter event.- Throws:
StripeException
-
create
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
Time at which the object was created. Measured in seconds since the Unix epoch. -
getEventName
The name of the meter event. Corresponds with theevent_namefield on a meter. -
getIdentifier
A unique identifier for the event. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.meter_event. -
getPayload
The payload of the event. This contains the fields corresponding to a meter'scustomer_mapping.event_payload_key(default isstripe_customer_id) andvalue_settings.event_payload_key(default isvalue). Read more about the payload. -
getTimestamp
The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setEventName
The name of the meter event. Corresponds with theevent_namefield on a meter. -
setIdentifier
A unique identifier for the event. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.meter_event. -
setPayload
The payload of the event. This contains the fields corresponding to a meter'scustomer_mapping.event_payload_key(default isstripe_customer_id) andvalue_settings.event_payload_key(default isvalue). Read more about the payload. -
setTimestamp
The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. -
equals
-
canEqual
-
hashCode
public int hashCode()
-