Class CreditNote
- All Implemented Interfaces:
HasId,MetadataStore<CreditNote>,StripeObjectInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested 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 booleanstatic CreditNotecreate(CreditNoteCreateParams params) Issue a credit note to adjust the amount of a finalized invoice.static CreditNotecreate(CreditNoteCreateParams params, RequestOptions options) Issue a credit note to adjust the amount of a finalized invoice.static CreditNoteIssue a credit note to adjust the amount of a finalized invoice.static CreditNotecreate(Map<String, Object> params, RequestOptions options) Issue a credit note to adjust the amount of a finalized invoice.booleanThe integer amount in %s representing the total amount of the credit note, including tax.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.Get ID of expandablecustomerBalanceTransactionobject.Get expandedcustomerBalanceTransaction.Get expandedcustomer.The integer amount in %s representing the total amount of discount that was credited.The aggregate amounts calculated per discount for all line items.getId()Unique identifier for the object.Get ID of expandableinvoiceobject.Get expandedinvoice.getLines()Line items that make up the credit note.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.getMemo()Customer-facing text that appears on the credit note PDF.Set of key-value pairs that you can attach to an object.A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.String representing the object's type.Amount that was credited outside of Stripe.getPdf()The link to download the PDF of the credit note.Reason for issuing this credit note, one ofduplicate,fraudulent,order_change, orproduct_unsatisfactory.Get ID of expandablerefundobject.Get expandedrefund.Status of this credit note, one ofissuedorvoid.The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.The aggregate amounts calculated per tax rate for all line items.getTotal()The integer amount in %s representing the total amount of the credit note, including tax and all discount.The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.getType()Type of this credit note, one ofpre_paymentorpost_payment.The time that the credit note was voided.inthashCode()static CreditNoteCollectionlist(CreditNoteListParams params) Returns a list of credit notes.static CreditNoteCollectionlist(CreditNoteListParams params, RequestOptions options) Returns a list of credit notes.static CreditNoteCollectionReturns a list of credit notes.static CreditNoteCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of credit notes.static CreditNotepreview(CreditNotePreviewParams params) Get a preview of a credit note without creating it.static CreditNotepreview(CreditNotePreviewParams params, RequestOptions options) Get a preview of a credit note without creating it.static CreditNoteGet a preview of a credit note without creating it.static CreditNotepreview(Map<String, Object> params, RequestOptions options) Get a preview of a credit note without creating it.static CreditNoteRetrieves the credit note object with the given identifier.static CreditNoteretrieve(String id, RequestOptions options) Retrieves the credit note object with the given identifier.static CreditNoteretrieve(String id, CreditNoteRetrieveParams params, RequestOptions options) Retrieves the credit note object with the given identifier.static CreditNoteRetrieves the credit note object with the given identifier.voidThe integer amount in %s representing the total amount of the credit note, including tax.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidvoidsetCustomerBalanceTransactionObject(CustomerBalanceTransaction expandableObject) voidsetCustomerObject(Customer expandableObject) voidsetDiscountAmount(Long discountAmount) The integer amount in %s representing the total amount of discount that was credited.voidsetDiscountAmounts(List<CreditNote.DiscountAmount> discountAmounts) The aggregate amounts calculated per discount for all line items.voidUnique identifier for the object.voidsetInvoice(String id) voidsetInvoiceObject(Invoice expandableObject) voidLine items that make up the credit note.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidCustomer-facing text that appears on the credit note PDF.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.voidString representing the object's type.voidsetOutOfBandAmount(Long outOfBandAmount) Amount that was credited outside of Stripe.voidThe link to download the PDF of the credit note.voidReason for issuing this credit note, one ofduplicate,fraudulent,order_change, orproduct_unsatisfactory.voidvoidsetRefundObject(Refund expandableObject) voidStatus of this credit note, one ofissuedorvoid.voidsetSubtotal(Long subtotal) The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.voidsetSubtotalExcludingTax(Long subtotalExcludingTax) The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.voidsetTaxAmounts(List<CreditNote.TaxAmount> taxAmounts) The aggregate amounts calculated per tax rate for all line items.voidThe integer amount in %s representing the total amount of the credit note, including tax and all discount.voidsetTotalExcludingTax(Long totalExcludingTax) The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.voidType of this credit note, one ofpre_paymentorpost_payment.voidsetVoidedAt(Long voidedAt) The time that the credit note was voided.update(CreditNoteUpdateParams params) Updates an existing credit note.update(CreditNoteUpdateParams params, RequestOptions options) Updates an existing credit note.Updates an existing credit note.update(Map<String, Object> params, RequestOptions options) Updates an existing credit note.Marks a credit note as void.voidCreditNote(RequestOptions options) Marks a credit note as void.Marks a credit note as void.voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestOptions options) Marks a credit note as void.voidCreditNote(Map<String, Object> params) Marks a credit note as void.voidCreditNote(Map<String, Object> params, RequestOptions options) Marks a credit note as void.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
-
CreditNote
public CreditNote()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getCustomerBalanceTransaction
Get ID of expandablecustomerBalanceTransactionobject. -
setCustomerBalanceTransaction
-
getCustomerBalanceTransactionObject
Get expandedcustomerBalanceTransaction. -
setCustomerBalanceTransactionObject
-
getInvoice
Get ID of expandableinvoiceobject. -
setInvoice
-
getInvoiceObject
Get expandedinvoice. -
setInvoiceObject
-
getRefund
Get ID of expandablerefundobject. -
setRefund
-
getRefundObject
Get expandedrefund. -
setRefundObject
-
create
Issue a credit note to adjust the amount of a finalized invoice. For astatus=openinvoice, a credit note reduces itsamount_due. For astatus=paidinvoice, a credit note does not affect itsamount_due. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount) or link an existing refund (usingrefund). - Customer balance credit: credit the customer’s balance (using
credit_amount) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
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_amountorpost_payment_credit_notes_amountdepending on itsstatusat the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
public static CreditNote create(Map<String, Object> params, RequestOptions options) throws StripeExceptionIssue a credit note to adjust the amount of a finalized invoice. For astatus=openinvoice, a credit note reduces itsamount_due. For astatus=paidinvoice, a credit note does not affect itsamount_due. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount) or link an existing refund (usingrefund). - Customer balance credit: credit the customer’s balance (using
credit_amount) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
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_amountorpost_payment_credit_notes_amountdepending on itsstatusat the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
Issue a credit note to adjust the amount of a finalized invoice. For astatus=openinvoice, a credit note reduces itsamount_due. For astatus=paidinvoice, a credit note does not affect itsamount_due. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount) or link an existing refund (usingrefund). - Customer balance credit: credit the customer’s balance (using
credit_amount) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
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_amountorpost_payment_credit_notes_amountdepending on itsstatusat the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
create
public static CreditNote create(CreditNoteCreateParams params, RequestOptions options) throws StripeException Issue a credit note to adjust the amount of a finalized invoice. For astatus=openinvoice, a credit note reduces itsamount_due. For astatus=paidinvoice, a credit note does not affect itsamount_due. Instead, it can result in any combination of the following:- Refund: create a new refund (using
refund_amount) or link an existing refund (usingrefund). - Customer balance credit: credit the customer’s balance (using
credit_amount) which will be automatically applied to their next invoice when it’s finalized. - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe
(using
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_amountorpost_payment_credit_notes_amountdepending on itsstatusat the time of credit note creation.- Throws:
StripeException
- Refund: create a new refund (using
-
preview
Get a preview of a credit note without creating it.- Throws:
StripeException
-
preview
public static CreditNote preview(Map<String, Object> params, RequestOptions options) throws StripeExceptionGet a preview of a credit note without creating it.- Throws:
StripeException
-
preview
Get a preview of a credit note without creating it.- Throws:
StripeException
-
preview
public static CreditNote preview(CreditNotePreviewParams params, RequestOptions options) throws StripeException Get a preview of a credit note without creating it.- Throws:
StripeException
-
retrieve
Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
public static CreditNote retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the credit note object with the given identifier.- Throws:
StripeException
-
retrieve
public static CreditNote retrieve(String id, CreditNoteRetrieveParams params, RequestOptions options) throws StripeException Retrieves the credit note object with the given identifier.- Throws:
StripeException
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
public static CreditNoteCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of credit notes.- Throws:
StripeException
-
list
Returns a list of credit notes.- Throws:
StripeException
-
list
public static CreditNoteCollection list(CreditNoteListParams params, RequestOptions options) throws StripeException Returns a list of credit notes.- Throws:
StripeException
-
update
Updates an existing credit note.- Specified by:
updatein interfaceMetadataStore<CreditNote>- Throws:
StripeException
-
update
Updates an existing credit note.- Specified by:
updatein interfaceMetadataStore<CreditNote>- Throws:
StripeException
-
update
Updates an existing credit note.- Throws:
StripeException
-
update
public CreditNote update(CreditNoteUpdateParams params, RequestOptions options) throws StripeException Updates an existing credit note.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
public CreditNote voidCreditNote(Map<String, Object> params, RequestOptions options) throws StripeExceptionMarks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
voidCreditNote
public CreditNote voidCreditNote(CreditNoteVoidCreditNoteParams params, RequestOptions options) throws StripeException Marks a credit note as void. Learn more about voiding credit notes.- Throws:
StripeException
-
getAmount
The integer amount in %s representing the total amount of the credit note, including tax. -
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. -
getDiscountAmount
The integer amount in %s representing the total amount of discount that was credited. -
getDiscountAmounts
The aggregate amounts calculated per discount for all line items. -
getLines
Line items that make up the credit note. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getMemo
Customer-facing text that appears on the credit note PDF. -
getNumber
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
credit_note. -
getOutOfBandAmount
Amount that was credited outside of Stripe. -
getPdf
The link to download the PDF of the credit note. -
getReason
Reason for issuing this credit note, one ofduplicate,fraudulent,order_change, orproduct_unsatisfactory. -
getStatus
-
getSubtotal
The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. -
getSubtotalExcludingTax
The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. -
getTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
getTotal
The integer amount in %s representing the total amount of the credit note, including tax and all discount. -
getTotalExcludingTax
The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. -
getType
Type of this credit note, one ofpre_paymentorpost_payment. Apre_paymentcredit note means it was issued when the invoice was open. Apost_paymentcredit note means it was issued when the invoice was paid. -
getVoidedAt
The time that the credit note was voided. -
setAmount
The integer amount in %s representing the total amount of the credit note, including tax. -
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. -
setDiscountAmount
The integer amount in %s representing the total amount of discount that was credited. -
setDiscountAmounts
The aggregate amounts calculated per discount for all line items. -
setId
Unique identifier for the object. -
setLines
Line items that make up the credit note. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMemo
Customer-facing text that appears on the credit note PDF. -
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. -
setNumber
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
credit_note. -
setOutOfBandAmount
Amount that was credited outside of Stripe. -
setPdf
The link to download the PDF of the credit note. -
setReason
Reason for issuing this credit note, one ofduplicate,fraudulent,order_change, orproduct_unsatisfactory. -
setStatus
-
setSubtotal
The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. -
setSubtotalExcludingTax
The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. -
setTaxAmounts
The aggregate amounts calculated per tax rate for all line items. -
setTotal
The integer amount in %s representing the total amount of the credit note, including tax and all discount. -
setTotalExcludingTax
The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. -
setType
Type of this credit note, one ofpre_paymentorpost_payment. Apre_paymentcredit note means it was issued when the invoice was open. Apost_paymentcredit note means it was issued when the invoice was paid. -
setVoidedAt
The time that the credit note was voided. -
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<CreditNote>
-