Package com.stripe.model
Class CustomerBalanceTransaction
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.CustomerBalanceTransaction
- All Implemented Interfaces:
HasId,MetadataStore<CustomerBalanceTransaction>,StripeObjectInterface
public class CustomerBalanceTransaction
extends ApiResource
implements HasId, MetadataStore<CustomerBalanceTransaction>
Each customer has a
balance
value, which denotes a debit or credit that's automatically applied to their next invoice upon
finalization. You may modify the value directly by using the update customer API, or by creating a
Customer Balance Transaction, which increments or decrements the customer's balance by
the specified amount.
Related guide: Customer Balance to learn more.
-
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, GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe amount of the transaction.Time at which the object was created.Get ID of expandablecreditNoteobject.Get expandedcreditNote.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.Get expandedcustomer.An arbitrary string attached to the object.The customer'sbalanceafter the transaction was applied.getId()Unique identifier for the object.Get ID of expandableinvoiceobject.Get expandedinvoice.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.String representing the object's type.getType()Transaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice.inthashCode()voidThe amount of the transaction.voidsetCreated(Long created) Time at which the object was created.voidsetCreditNote(String id) voidsetCreditNoteObject(CreditNote expandableObject) voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidsetDescription(String description) An arbitrary string attached to the object.voidsetEndingBalance(Long endingBalance) The customer'sbalanceafter the transaction was applied.voidUnique identifier for the object.voidsetInvoice(String id) voidsetInvoiceObject(Invoice expandableObject) 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.voidString representing the object's type.voidTransaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice.Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.update(CustomerBalanceTransactionUpdateParams params, RequestOptions options) Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.update(Map<String, Object> params, RequestOptions options) Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
CustomerBalanceTransaction
public CustomerBalanceTransaction()
-
-
Method Details
-
getCreditNote
Get ID of expandablecreditNoteobject. -
setCreditNote
-
getCreditNoteObject
Get expandedcreditNote. -
setCreditNoteObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getInvoice
Get ID of expandableinvoiceobject. -
setInvoice
-
getInvoiceObject
Get expandedinvoice. -
setInvoiceObject
-
update
Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.- Specified by:
updatein interfaceMetadataStore<CustomerBalanceTransaction>- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(Map<String, Object> params, RequestOptions options) throws StripeExceptionMost credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.- Specified by:
updatein interfaceMetadataStore<CustomerBalanceTransaction>- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(CustomerBalanceTransactionUpdateParams params) throws StripeException Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(CustomerBalanceTransactionUpdateParams params, RequestOptions options) throws StripeException Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.- Throws:
StripeException
-
getAmount
The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer'sbalance. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getEndingBalance
The customer'sbalanceafter the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. -
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
customer_balance_transaction. -
getType
Transaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice. See the Customer Balance page to learn more about transaction types.One of
adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,migration,unapplied_from_invoice, orunspent_receiver_credit. -
setAmount
The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer'sbalance. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setEndingBalance
The customer'sbalanceafter the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. -
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
customer_balance_transaction. -
setType
Transaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice. See the Customer Balance page to learn more about transaction types.One of
adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,migration,unapplied_from_invoice, orunspent_receiver_credit. -
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<CustomerBalanceTransaction>
-