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>
-
-
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
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description CustomerBalanceTransaction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.LonggetAmount()The amount of the transaction.java.lang.LonggetCreated()Time at which the object was created.java.lang.StringgetCreditNote()Get ID of expandablecreditNoteobject.CreditNotegetCreditNoteObject()Get expandedcreditNote.java.lang.StringgetCurrency()Three-letter ISO currency code, in lowercase.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.CustomergetCustomerObject()Get expandedcustomer.java.lang.StringgetDescription()An arbitrary string attached to the object.java.lang.LonggetEndingBalance()The customer'sbalanceafter the transaction was applied.java.lang.StringgetId()Unique identifier for the object.java.lang.StringgetInvoice()Get ID of expandableinvoiceobject.InvoicegetInvoiceObject()Get expandedinvoice.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.java.util.Map<java.lang.String,java.lang.String>getMetadata()Set of key-value pairs that you can attach to an object.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetType()Transaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice.inthashCode()voidsetAmount(java.lang.Long amount)The amount of the transaction.voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetCreditNote(java.lang.String id)voidsetCreditNoteObject(CreditNote expandableObject)voidsetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.voidsetCustomer(java.lang.String id)voidsetCustomerObject(Customer expandableObject)voidsetDescription(java.lang.String description)An arbitrary string attached to the object.voidsetEndingBalance(java.lang.Long endingBalance)The customer'sbalanceafter the transaction was applied.voidsetId(java.lang.String id)Unique identifier for the object.voidsetInvoice(java.lang.String id)voidsetInvoiceObject(Invoice expandableObject)voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetObject(java.lang.String object)String representing the object's type.voidsetType(java.lang.String type)Transaction type:adjustment,applied_to_invoice,credit_note,initial,invoice_too_large,invoice_too_small,unspent_receiver_credit, orunapplied_from_invoice.CustomerBalanceTransactionupdate(CustomerBalanceTransactionUpdateParams params)Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.CustomerBalanceTransactionupdate(CustomerBalanceTransactionUpdateParams params, RequestOptions options)Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.CustomerBalanceTransactionupdate(java.util.Map<java.lang.String,java.lang.Object> params)Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.CustomerBalanceTransactionupdate(java.util.Map<java.lang.String,java.lang.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, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getCreditNote
public java.lang.String getCreditNote()
Get ID of expandablecreditNoteobject.
-
setCreditNote
public void setCreditNote(java.lang.String id)
-
getCreditNoteObject
public CreditNote getCreditNoteObject()
Get expandedcreditNote.
-
setCreditNoteObject
public void setCreditNoteObject(CreditNote expandableObject)
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomerobject.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getInvoice
public java.lang.String getInvoice()
Get ID of expandableinvoiceobject.
-
setInvoice
public void setInvoice(java.lang.String id)
-
getInvoiceObject
public Invoice getInvoiceObject()
Get expandedinvoice.
-
setInvoiceObject
public void setInvoiceObject(Invoice expandableObject)
-
update
public CustomerBalanceTransaction update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Most credit balance transaction fields are immutable, but you may update itsdescriptionandmetadata.- Specified by:
updatein interfaceMetadataStore<CustomerBalanceTransaction>- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Most 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
public java.lang.Long 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
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getCurrency
public java.lang.String getCurrency()
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
getDescription
public java.lang.String getDescription()
An arbitrary string attached to the object. Often useful for displaying to users.
-
getEndingBalance
public java.lang.Long 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
public java.lang.Boolean getLivemode()
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
customer_balance_transaction.
-
getType
public java.lang.String 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
public void setAmount(java.lang.Long amount)
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
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setCurrency
public void setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
setDescription
public void setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users.
-
setEndingBalance
public void setEndingBalance(java.lang.Long endingBalance)
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
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
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
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
customer_balance_transaction.
-
setType
public void setType(java.lang.String type)
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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> 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>
-
-