public class CreditNote extends ApiResource implements HasId, MetadataStore<CreditNote>
| Modifier and Type | Class and Description |
|---|---|
static class |
CreditNote.DiscountAmount |
static class |
CreditNote.TaxAmount |
ApiResource.RequestMethodCHARSET, GSONPRETTY_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,
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.Long |
getDiscountAmount()
The integer amount in %s representing the total amount of discount that was
credited.
|
java.util.List<CreditNote.DiscountAmount> |
getDiscountAmounts()
The aggregate amounts calculated per discount for all line items.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getInvoice()
Get ID of expandable
invoice object. |
Invoice |
getInvoiceObject()
Get expanded
invoice. |
CreditNoteLineItemCollection |
getLines()
Line items that make up the credit note.
|
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.Long |
getOutOfBandAmount()
Amount that was credited outside of Stripe.
|
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.Long |
getSubtotal()
The integer amount in %s representing the amount of the credit note, excluding
tax and invoice level discounts.
|
java.util.List<CreditNote.TaxAmount> |
getTaxAmounts()
The aggregate amounts calculated per tax rate for all line items.
|
java.lang.Long |
getTotal()
The integer amount in %s representing the total amount of the credit note,
including tax and all discount.
|
java.lang.String |
getType()
Type of this credit note, one of
pre_payment or post_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 |
preview(CreditNotePreviewParams params)
Get a preview of a credit note without creating it.
|
static CreditNote |
preview(CreditNotePreviewParams params,
RequestOptions options)
Get a preview of a credit note without creating it.
|
static CreditNote |
preview(java.util.Map<java.lang.String,java.lang.Object> params)
Get a preview of a credit note without creating it.
|
static CreditNote |
preview(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Get a preview of a credit note without creating it.
|
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,
in lowercase.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerBalanceTransaction(java.lang.String id) |
void |
setCustomerBalanceTransactionObject(CustomerBalanceTransaction expandableObject) |
void |
setCustomerObject(Customer expandableObject) |
void |
setDiscountAmount(java.lang.Long discountAmount)
The integer amount in %s representing the total amount of discount that was
credited.
|
void |
setDiscountAmounts(java.util.List<CreditNote.DiscountAmount> discountAmounts)
The aggregate amounts calculated per discount for all line items.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setInvoice(java.lang.String id) |
void |
setInvoiceObject(Invoice expandableObject) |
void |
setLines(CreditNoteLineItemCollection lines)
Line items that make up the credit note.
|
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 |
setOutOfBandAmount(java.lang.Long outOfBandAmount)
Amount that was credited outside of Stripe.
|
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 |
setSubtotal(java.lang.Long subtotal)
The integer amount in %s representing the amount of the credit note, excluding
tax and invoice level discounts.
|
void |
setTaxAmounts(java.util.List<CreditNote.TaxAmount> taxAmounts)
The aggregate amounts calculated per tax rate for all line items.
|
void |
setTotal(java.lang.Long total)
The integer amount in %s representing the total amount of the credit note,
including tax and all discount.
|
void |
setType(java.lang.String type)
Type of this credit note, one of
pre_payment or post_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, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic java.lang.String getCustomer()
customer object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer.public void setCustomerObject(Customer expandableObject)
public java.lang.String getCustomerBalanceTransaction()
customerBalanceTransaction object.public void setCustomerBalanceTransaction(java.lang.String id)
public CustomerBalanceTransaction getCustomerBalanceTransactionObject()
customerBalanceTransaction.public void setCustomerBalanceTransactionObject(CustomerBalanceTransaction expandableObject)
public java.lang.String getInvoice()
invoice object.public void setInvoice(java.lang.String id)
public Invoice getInvoiceObject()
invoice.public void setInvoiceObject(Invoice expandableObject)
public java.lang.String getRefund()
refund object.public void setRefund(java.lang.String id)
public Refund getRefundObject()
refund.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.
out_of_band_amount).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
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.
StripeExceptionpublic 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.
out_of_band_amount).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
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.
StripeExceptionpublic 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.
out_of_band_amount).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
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.
StripeExceptionpublic 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.
out_of_band_amount).
For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
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.
StripeExceptionpublic static CreditNote preview(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static CreditNote preview(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNote preview(CreditNotePreviewParams params) throws StripeException
StripeExceptionpublic static CreditNote preview(CreditNotePreviewParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNote retrieve(java.lang.String id) throws StripeException
StripeExceptionpublic static CreditNote retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNote retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNote retrieve(java.lang.String id, CreditNoteRetrieveParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNoteCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static CreditNoteCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static CreditNoteCollection list(CreditNoteListParams params) throws StripeException
StripeExceptionpublic static CreditNoteCollection list(CreditNoteListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic CreditNote update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<CreditNote>StripeExceptionpublic CreditNote update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<CreditNote>StripeExceptionpublic CreditNote update(CreditNoteUpdateParams params) throws StripeException
StripeExceptionpublic CreditNote update(CreditNoteUpdateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic CreditNote voidCreditNote() throws StripeException
StripeExceptionpublic CreditNote voidCreditNote(RequestOptions options) throws StripeException
StripeExceptionpublic CreditNote voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic CreditNote voidCreditNote(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params) throws StripeException
StripeExceptionpublic CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestOptions options) throws StripeException
StripeExceptionpublic java.lang.Long getAmount()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Long getDiscountAmount()
public java.util.List<CreditNote.DiscountAmount> getDiscountAmounts()
public CreditNoteLineItemCollection getLines()
public java.lang.Boolean getLivemode()
true if the object exists in live mode or the value false if the
object exists in test mode.public java.lang.String getMemo()
public java.lang.String getNumber()
public java.lang.String getObject()
Equal to credit_note.
public java.lang.Long getOutOfBandAmount()
public java.lang.String getPdf()
public java.lang.String getReason()
duplicate, fraudulent, order_change, or product_unsatisfactory.public java.lang.String getStatus()
public java.lang.Long getSubtotal()
public java.util.List<CreditNote.TaxAmount> getTaxAmounts()
public java.lang.Long getTotal()
public java.lang.String getType()
pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment
credit note means it was issued when the invoice was paid.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 setDiscountAmount(java.lang.Long discountAmount)
public void setDiscountAmounts(java.util.List<CreditNote.DiscountAmount> discountAmounts)
public void setId(java.lang.String id)
public void setLines(CreditNoteLineItemCollection lines)
public void setLivemode(java.lang.Boolean livemode)
true if the object exists in live mode or the value false if the
object exists in test mode.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)
Equal to credit_note.
public void setOutOfBandAmount(java.lang.Long outOfBandAmount)
public void setPdf(java.lang.String pdf)
public void setReason(java.lang.String reason)
duplicate, fraudulent, order_change, or product_unsatisfactory.public void setStatus(java.lang.String status)
public void setSubtotal(java.lang.Long subtotal)
public void setTaxAmounts(java.util.List<CreditNote.TaxAmount> taxAmounts)
public void setTotal(java.lang.Long total)
public void setType(java.lang.String type)
pre_payment or post_payment. A pre_payment credit note means it was issued when the invoice was open. A post_payment
credit note means it was issued when the invoice was paid.public void setVoidedAt(java.lang.Long voidedAt)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<CreditNote>