Package com.stripe.model.billing
Class CreditGrant
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.billing.CreditGrant
- All Implemented Interfaces:
HasId,MetadataStore<CreditGrant>,StripeActiveObject,StripeObjectInterface
A credit grant is an API resource that documents the allocation of some billing credits to a
customer.
Related guide: Billing credits
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about Amount, please refer to the API Reference.static classFor more details about ApplicabilityConfig, please refer to the API Reference.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 CreditGrantcreate(CreditGrantCreateParams params) Creates a credit grant.static CreditGrantcreate(CreditGrantCreateParams params, RequestOptions options) Creates a credit grant.static CreditGrantCreates a credit grant.static CreditGrantcreate(Map<String, Object> params, RequestOptions options) Creates a credit grant.booleanexpire()Expires a credit grant.expire(RequestOptions options) Expires a credit grant.expire(CreditGrantExpireParams params) Expires a credit grant.expire(CreditGrantExpireParams params, RequestOptions options) Expires a credit grant.Expires a credit grant.expire(Map<String, Object> params, RequestOptions options) Expires a credit grant.The category of this credit grant.Time at which the object was created.Get ID of expandablecustomerobject.ID of the account receiving the billing credits.Get expandedcustomer.The time when the billing credits become effective-when they're eligible for use.The time when the billing credits expire.getId()Unique identifier for the object.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.getName()A descriptive name shown in dashboard.String representing the object's type.The priority for applying this credit grant.Get ID of expandabletestClockobject.Get expandedtestClock.Time at which the object was last updated.The time when this credit grant was voided.inthashCode()static CreditGrantCollectionlist(CreditGrantListParams params) Retrieve a list of credit grants.static CreditGrantCollectionlist(CreditGrantListParams params, RequestOptions options) Retrieve a list of credit grants.static CreditGrantCollectionRetrieve a list of credit grants.static CreditGrantCollectionlist(Map<String, Object> params, RequestOptions options) Retrieve a list of credit grants.static CreditGrantRetrieves a credit grant.static CreditGrantretrieve(String id, RequestOptions options) Retrieves a credit grant.static CreditGrantretrieve(String id, CreditGrantRetrieveParams params, RequestOptions options) Retrieves a credit grant.static CreditGrantRetrieves a credit grant.voidsetAmount(CreditGrant.Amount amount) voidsetApplicabilityConfig(CreditGrant.ApplicabilityConfig applicabilityConfig) voidsetCategory(String category) The category of this credit grant.voidsetCreated(Long created) Time at which the object was created.voidsetCustomer(String id) voidsetCustomerAccount(String customerAccount) ID of the account receiving the billing credits.voidsetCustomerObject(Customer expandableObject) voidsetEffectiveAt(Long effectiveAt) The time when the billing credits become effective-when they're eligible for use.voidsetExpiresAt(Long expiresAt) The time when the billing credits expire.voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidA descriptive name shown in dashboard.voidString representing the object's type.voidsetPriority(Long priority) The priority for applying this credit grant.voidsetResponseGetter(StripeResponseGetter responseGetter) Unique identifier for the object.voidsetTestClock(String id) voidsetTestClockObject(TestClock expandableObject) voidsetUpdated(Long updated) Time at which the object was last updated.voidsetVoidedAt(Long voidedAt) The time when this credit grant was voided.update(CreditGrantUpdateParams params) Updates a credit grant.update(CreditGrantUpdateParams params, RequestOptions options) Updates a credit grant.Updates a credit grant.update(Map<String, Object> params, RequestOptions options) Updates a credit grant.Voids a credit grant.voidGrant(RequestOptions options) Voids a credit grant.voidGrant(CreditGrantVoidGrantParams params) Voids a credit grant.voidGrant(CreditGrantVoidGrantParams params, RequestOptions options) Voids a credit grant.Voids a credit grant.voidGrant(Map<String, Object> params, RequestOptions options) Voids a credit grant.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, 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
-
CreditGrant
public CreditGrant()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getTestClock
Get ID of expandabletestClockobject. -
setTestClock
-
getTestClockObject
Get expandedtestClock. -
setTestClockObject
-
create
Creates a credit grant.- Throws:
StripeException
-
create
public static CreditGrant create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a credit grant.- Throws:
StripeException
-
create
Creates a credit grant.- Throws:
StripeException
-
create
public static CreditGrant create(CreditGrantCreateParams params, RequestOptions options) throws StripeException Creates a credit grant.- Throws:
StripeException
-
expire
Expires a credit grant.- Throws:
StripeException
-
expire
Expires a credit grant.- Throws:
StripeException
-
expire
Expires a credit grant.- Throws:
StripeException
-
expire
Expires a credit grant.- Throws:
StripeException
-
expire
Expires a credit grant.- Throws:
StripeException
-
expire
public CreditGrant expire(CreditGrantExpireParams params, RequestOptions options) throws StripeException Expires a credit grant.- Throws:
StripeException
-
list
Retrieve a list of credit grants.- Throws:
StripeException
-
list
public static CreditGrantCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieve a list of credit grants.- Throws:
StripeException
-
list
Retrieve a list of credit grants.- Throws:
StripeException
-
list
public static CreditGrantCollection list(CreditGrantListParams params, RequestOptions options) throws StripeException Retrieve a list of credit grants.- Throws:
StripeException
-
retrieve
Retrieves a credit grant.- Throws:
StripeException
-
retrieve
Retrieves a credit grant.- Throws:
StripeException
-
retrieve
public static CreditGrant retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a credit grant.- Throws:
StripeException
-
retrieve
public static CreditGrant retrieve(String id, CreditGrantRetrieveParams params, RequestOptions options) throws StripeException Retrieves a credit grant.- Throws:
StripeException
-
update
Updates a credit grant.- Specified by:
updatein interfaceMetadataStore<CreditGrant>- Throws:
StripeException
-
update
Updates a credit grant.- Specified by:
updatein interfaceMetadataStore<CreditGrant>- Throws:
StripeException
-
update
Updates a credit grant.- Throws:
StripeException
-
update
public CreditGrant update(CreditGrantUpdateParams params, RequestOptions options) throws StripeException Updates a credit grant.- Throws:
StripeException
-
voidGrant
Voids a credit grant.- Throws:
StripeException
-
voidGrant
Voids a credit grant.- Throws:
StripeException
-
voidGrant
Voids a credit grant.- Throws:
StripeException
-
voidGrant
public CreditGrant voidGrant(Map<String, Object> params, RequestOptions options) throws StripeExceptionVoids a credit grant.- Throws:
StripeException
-
voidGrant
Voids a credit grant.- Throws:
StripeException
-
voidGrant
public CreditGrant voidGrant(CreditGrantVoidGrantParams params, RequestOptions options) throws StripeException Voids a credit grant.- Throws:
StripeException
-
setResponseGetter
Unique identifier for the object.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getAmount
-
getApplicabilityConfig
-
getCategory
The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.One of
paid, orpromotional. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCustomerAccount
ID of the account receiving the billing credits. -
getEffectiveAt
The time when the billing credits become effective-when they're eligible for use. -
getExpiresAt
The time when the billing credits expire. If not present, the billing credits don't expire. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getName
A descriptive name shown in dashboard. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.credit_grant. -
getPriority
The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. -
getUpdated
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
getVoidedAt
The time when this credit grant was voided. If not present, the credit grant hasn't been voided. -
setAmount
-
setApplicabilityConfig
-
setCategory
The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.One of
paid, orpromotional. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCustomerAccount
ID of the account receiving the billing credits. -
setEffectiveAt
The time when the billing credits become effective-when they're eligible for use. -
setExpiresAt
The time when the billing credits expire. If not present, the billing credits don't expire. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setName
A descriptive name shown in dashboard. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.credit_grant. -
setPriority
The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. -
setUpdated
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
setVoidedAt
The time when this credit grant was voided. If not present, the credit grant hasn't been voided. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadatain interfaceMetadataStore<CreditGrant>
-