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
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.
-
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_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static MeterEvent
create
(MeterEventCreateParams params) Creates a billing meter event.static MeterEvent
create
(MeterEventCreateParams params, RequestOptions options) Creates a billing meter event.static MeterEvent
Creates a billing meter event.static MeterEvent
create
(Map<String, Object> params, RequestOptions options) Creates a billing meter event.boolean
Time at which the object was created.The name of the meter event.A unique identifier for the event.Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.int
hashCode()
void
setCreated
(Long created) Time at which the object was created.void
setEventName
(String eventName) The name of the meter event.void
setIdentifier
(String identifier) A unique identifier for the event.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
String representing the object's type.void
setPayload
(Map<String, String> payload) The payload of the event.void
setTimestamp
(Long timestamp) The timestamp passed in when creating the event.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setResponseGetter, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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_name
field on a meter. -
getIdentifier
A unique identifier for the event. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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_name
field on a meter. -
setIdentifier
A unique identifier for the event. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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()
-