Package com.stripe.model
Class UsageRecord
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.UsageRecord
-
- All Implemented Interfaces:
HasId
public class UsageRecord extends ApiResource implements HasId
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod, ApiResource.RequestType
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description UsageRecord()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static UsageRecord
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Create a new usage record associated with a subscription item.boolean
equals(java.lang.Object o)
java.lang.String
getId()
java.lang.Boolean
getLivemode()
java.lang.String
getObject()
java.lang.Long
getQuantity()
java.lang.String
getSubscriptionItem()
java.lang.Long
getTimestamp()
int
hashCode()
void
setId(java.lang.String id)
void
setLivemode(java.lang.Boolean livemode)
void
setObject(java.lang.String object)
void
setQuantity(java.lang.Long quantity)
void
setSubscriptionItem(java.lang.String subscriptionItem)
void
setTimestamp(java.lang.Long timestamp)
-
Methods inherited from class com.stripe.net.ApiResource
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
create
public static UsageRecord create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Create a new usage record associated with a subscription item.- Parameters:
params
- The quantity, the timestamp and the conflict behaviour (action)options
- Request options- Returns:
- The created usage record
- Throws:
StripeException
-
getObject
public java.lang.String getObject()
-
getLivemode
public java.lang.Boolean getLivemode()
-
getQuantity
public java.lang.Long getQuantity()
-
getSubscriptionItem
public java.lang.String getSubscriptionItem()
-
getTimestamp
public java.lang.Long getTimestamp()
-
setId
public void setId(java.lang.String id)
-
setObject
public void setObject(java.lang.String object)
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
-
setQuantity
public void setQuantity(java.lang.Long quantity)
-
setSubscriptionItem
public void setSubscriptionItem(java.lang.String subscriptionItem)
-
setTimestamp
public void setTimestamp(java.lang.Long timestamp)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-