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 boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.Long
getAmount()
The amount of the transaction.java.lang.Long
getCreated()
Time at which the object was created.java.lang.String
getCreditNote()
Get ID of expandablecreditNote
object.CreditNote
getCreditNoteObject()
Get expandedcreditNote
.java.lang.String
getCurrency()
Three-letter ISO currency code, in lowercase.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.String
getDescription()
An arbitrary string attached to the object.java.lang.Long
getEndingBalance()
The customer'sbalance
after the transaction was applied.java.lang.String
getId()
Unique identifier for the object.java.lang.String
getInvoice()
Get ID of expandableinvoice
object.Invoice
getInvoiceObject()
Get expandedinvoice
.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.String
getObject()
String representing the object's type.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
.int
hashCode()
void
setAmount(java.lang.Long amount)
The amount of the transaction.void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCreditNote(java.lang.String id)
void
setCreditNoteObject(CreditNote expandableObject)
void
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.void
setCustomer(java.lang.String id)
void
setCustomerObject(Customer expandableObject)
void
setDescription(java.lang.String description)
An arbitrary string attached to the object.void
setEndingBalance(java.lang.Long endingBalance)
The customer'sbalance
after the transaction was applied.void
setId(java.lang.String id)
Unique identifier for the object.void
setInvoice(java.lang.String id)
void
setInvoiceObject(Invoice expandableObject)
void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setObject(java.lang.String object)
String representing the object's type.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
.CustomerBalanceTransaction
update(CustomerBalanceTransactionUpdateParams params)
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.CustomerBalanceTransaction
update(CustomerBalanceTransactionUpdateParams params, RequestOptions options)
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.CustomerBalanceTransaction
update(java.util.Map<java.lang.String,java.lang.Object> params)
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.CustomerBalanceTransaction
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.-
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, 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 expandablecreditNote
object.
-
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 expandablecustomer
object.
-
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 expandableinvoice
object.
-
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 itsdescription
andmetadata
.- Specified by:
update
in 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 itsdescription
andmetadata
.- Specified by:
update
in interfaceMetadataStore<CustomerBalanceTransaction>
- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(CustomerBalanceTransactionUpdateParams params) throws StripeException
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.- Throws:
StripeException
-
update
public CustomerBalanceTransaction update(CustomerBalanceTransactionUpdateParams params, RequestOptions options) throws StripeException
Most credit balance transaction fields are immutable, but you may update itsdescription
andmetadata
.- 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'sbalance
after 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 valuetrue
if the object exists in live mode or the valuefalse
if 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'sbalance
after 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 valuetrue
if the object exists in live mode or the valuefalse
if 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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
getMetadata
in interfaceMetadataStore<CustomerBalanceTransaction>
-
-