public class CreditNote extends ApiResource implements HasId, MetadataStore<CreditNote>
ApiResource.RequestMethod, ApiResource.RequestType
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
CreditNote() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static CreditNote |
create(CreditNoteCreateParams params)
Issue a credit note to adjust the amount of a finalized invoice.
|
static CreditNote |
create(CreditNoteCreateParams params,
RequestOptions options)
Issue a credit note to adjust the amount of a finalized invoice.
|
static CreditNote |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Issue a credit note to adjust the amount of a finalized invoice.
|
static CreditNote |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Issue a credit note to adjust the amount of a finalized invoice.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAmount()
The integer amount in **%s** representing the total amount of the credit note, including tax.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase.
|
java.lang.String |
getCustomer()
Get id of expandable `customer` object.
|
java.lang.String |
getCustomerBalanceTransaction()
Get id of expandable `customerBalanceTransaction` object.
|
CustomerBalanceTransaction |
getCustomerBalanceTransactionObject()
Get expanded `customerBalanceTransaction`.
|
Customer |
getCustomerObject()
Get expanded `customer`.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getInvoice()
Get id of expandable `invoice` object.
|
Invoice |
getInvoiceObject()
Get expanded `invoice`.
|
java.lang.Boolean |
getLivemode()
Has the value `true` if the object exists in live mode or the value `false` if the object
exists in test mode.
|
java.lang.String |
getMemo()
Customer-facing text that appears on the credit note PDF.
|
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 |
getNumber()
A unique number that identifies this particular credit note and appears on the PDF of the
credit note and its associated invoice.
|
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getPdf()
The link to download the PDF of the credit note.
|
java.lang.String |
getReason()
Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or
`product_unsatisfactory`.
|
java.lang.String |
getRefund()
Get id of expandable `refund` object.
|
Refund |
getRefundObject()
Get expanded `refund`.
|
java.lang.String |
getStatus()
Status of this credit note, one of `issued` or `void`.
|
java.lang.String |
getType()
Type of this credit note, one of `post_payment` or `pre_payment`.
|
java.lang.Long |
getVoidedAt()
The time that the credit note was voided.
|
int |
hashCode() |
static CreditNoteCollection |
list(CreditNoteListParams params)
Returns a list of credit notes.
|
static CreditNoteCollection |
list(CreditNoteListParams params,
RequestOptions options)
Returns a list of credit notes.
|
static CreditNoteCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of credit notes.
|
static CreditNoteCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of credit notes.
|
static CreditNote |
retrieve(java.lang.String id)
Retrieves the credit note object with the given identifier.
|
static CreditNote |
retrieve(java.lang.String id,
CreditNoteRetrieveParams params,
RequestOptions options)
Retrieves the credit note object with the given identifier.
|
static CreditNote |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the credit note object with the given identifier.
|
static CreditNote |
retrieve(java.lang.String id,
RequestOptions options)
Retrieves the credit note object with the given identifier.
|
void |
setAmount(java.lang.Long amount)
The integer amount in **%s** representing the total amount of the credit note, including tax.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerBalanceTransaction(java.lang.String id) |
void |
setCustomerBalanceTransactionObject(CustomerBalanceTransaction expandableObject) |
void |
setCustomerObject(Customer expandableObject) |
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 value `true` if the object exists in live mode or the value `false` if the object
exists in test mode.
|
void |
setMemo(java.lang.String memo)
Customer-facing text that appears on the credit note PDF.
|
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 |
setNumber(java.lang.String number)
A unique number that identifies this particular credit note and appears on the PDF of the
credit note and its associated invoice.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPdf(java.lang.String pdf)
The link to download the PDF of the credit note.
|
void |
setReason(java.lang.String reason)
Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or
`product_unsatisfactory`.
|
void |
setRefund(java.lang.String id) |
void |
setRefundObject(Refund expandableObject) |
void |
setStatus(java.lang.String status)
Status of this credit note, one of `issued` or `void`.
|
void |
setType(java.lang.String type)
Type of this credit note, one of `post_payment` or `pre_payment`.
|
void |
setVoidedAt(java.lang.Long voidedAt)
The time that the credit note was voided.
|
CreditNote |
update(CreditNoteUpdateParams params)
Updates an existing credit note.
|
CreditNote |
update(CreditNoteUpdateParams params,
RequestOptions options)
Updates an existing credit note.
|
CreditNote |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates an existing credit note.
|
CreditNote |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates an existing credit note.
|
CreditNote |
voidCreditNote()
Marks a credit note as void.
|
CreditNote |
voidCreditNote(CreditNoteVoidCreditNoteParams params)
Marks a credit note as void.
|
CreditNote |
voidCreditNote(CreditNoteVoidCreditNoteParams params,
RequestOptions options)
Marks a credit note as void.
|
CreditNote |
voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params)
Marks a credit note as void.
|
CreditNote |
voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Marks a credit note as void.
|
CreditNote |
voidCreditNote(RequestOptions options)
Marks a credit note as void.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCustomer()
public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
public void setCustomerObject(Customer expandableObject)
public java.lang.String getCustomerBalanceTransaction()
public void setCustomerBalanceTransaction(java.lang.String id)
public CustomerBalanceTransaction getCustomerBalanceTransactionObject()
public void setCustomerBalanceTransactionObject(CustomerBalanceTransaction expandableObject)
public java.lang.String getInvoice()
public void setInvoice(java.lang.String id)
public Invoice getInvoiceObject()
public void setInvoiceObject(Invoice expandableObject)
public java.lang.String getRefund()
public void setRefund(java.lang.String id)
public Refund getRefundObject()
public void setRefundObject(Refund expandableObject)
public static CreditNote create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
status=open
invoice, a credit note reduces its amount_due
. For a status=paid
invoice, a credit note does not affect its amount_due
. Instead, it can result in
any combination of the following:
refund_amount
) or link an existing refund
(using refund
).
credit_amount
)
which will be automatically applied to their next invoice when it’s finalized.
amount - refund_amount - credit_amount
is represented as an “outside of Stripe”
credit.
You may issue multiple credit notes for an invoice. Each credit note will increment the
invoice’s pre_payment_credit_notes_amount
or
post_payment_credit_notes_amount
depending on its status
at the time of
credit note creation.
StripeException
public static CreditNote create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
status=open
invoice, a credit note reduces its amount_due
. For a status=paid
invoice, a credit note does not affect its amount_due
. Instead, it can result in
any combination of the following:
refund_amount
) or link an existing refund
(using refund
).
credit_amount
)
which will be automatically applied to their next invoice when it’s finalized.
amount - refund_amount - credit_amount
is represented as an “outside of Stripe”
credit.
You may issue multiple credit notes for an invoice. Each credit note will increment the
invoice’s pre_payment_credit_notes_amount
or
post_payment_credit_notes_amount
depending on its status
at the time of
credit note creation.
StripeException
public static CreditNote create(CreditNoteCreateParams params) throws StripeException
status=open
invoice, a credit note reduces its amount_due
. For a status=paid
invoice, a credit note does not affect its amount_due
. Instead, it can result in
any combination of the following:
refund_amount
) or link an existing refund
(using refund
).
credit_amount
)
which will be automatically applied to their next invoice when it’s finalized.
amount - refund_amount - credit_amount
is represented as an “outside of Stripe”
credit.
You may issue multiple credit notes for an invoice. Each credit note will increment the
invoice’s pre_payment_credit_notes_amount
or
post_payment_credit_notes_amount
depending on its status
at the time of
credit note creation.
StripeException
public static CreditNote create(CreditNoteCreateParams params, RequestOptions options) throws StripeException
status=open
invoice, a credit note reduces its amount_due
. For a status=paid
invoice, a credit note does not affect its amount_due
. Instead, it can result in
any combination of the following:
refund_amount
) or link an existing refund
(using refund
).
credit_amount
)
which will be automatically applied to their next invoice when it’s finalized.
amount - refund_amount - credit_amount
is represented as an “outside of Stripe”
credit.
You may issue multiple credit notes for an invoice. Each credit note will increment the
invoice’s pre_payment_credit_notes_amount
or
post_payment_credit_notes_amount
depending on its status
at the time of
credit note creation.
StripeException
public static CreditNote retrieve(java.lang.String id) throws StripeException
StripeException
public static CreditNote retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeException
public static CreditNote retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static CreditNote retrieve(java.lang.String id, CreditNoteRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public static CreditNoteCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static CreditNoteCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static CreditNoteCollection list(CreditNoteListParams params) throws StripeException
StripeException
public static CreditNoteCollection list(CreditNoteListParams params, RequestOptions options) throws StripeException
StripeException
public CreditNote update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<CreditNote>
StripeException
public CreditNote update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<CreditNote>
StripeException
public CreditNote update(CreditNoteUpdateParams params) throws StripeException
StripeException
public CreditNote update(CreditNoteUpdateParams params, RequestOptions options) throws StripeException
StripeException
public CreditNote voidCreditNote() throws StripeException
StripeException
public CreditNote voidCreditNote(RequestOptions options) throws StripeException
StripeException
public CreditNote voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public CreditNote voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params) throws StripeException
StripeException
public CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestOptions options) throws StripeException
StripeException
public java.lang.Long getAmount()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getLivemode()
public java.lang.String getMemo()
public java.lang.String getNumber()
public java.lang.String getObject()
public java.lang.String getPdf()
public java.lang.String getReason()
public java.lang.String getStatus()
public java.lang.String getType()
public java.lang.Long getVoidedAt()
public void setAmount(java.lang.Long amount)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setId(java.lang.String id)
public void setLivemode(java.lang.Boolean livemode)
public void setMemo(java.lang.String memo)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setNumber(java.lang.String number)
public void setObject(java.lang.String object)
public void setPdf(java.lang.String pdf)
public void setReason(java.lang.String reason)
public void setStatus(java.lang.String status)
public void setType(java.lang.String type)
public void setVoidedAt(java.lang.Long voidedAt)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<CreditNote>