Class CreditNote

    • Constructor Detail

      • CreditNote

        public CreditNote()
    • Method Detail

      • getCustomer

        public java.lang.String getCustomer()
        Get ID of expandable customer object.
      • setCustomer

        public void setCustomer​(java.lang.String id)
      • getCustomerObject

        public Customer getCustomerObject()
        Get expanded customer.
      • setCustomerObject

        public void setCustomerObject​(Customer expandableObject)
      • getCustomerBalanceTransaction

        public java.lang.String getCustomerBalanceTransaction()
        Get ID of expandable customerBalanceTransaction object.
      • setCustomerBalanceTransaction

        public void setCustomerBalanceTransaction​(java.lang.String id)
      • getCustomerBalanceTransactionObject

        public CustomerBalanceTransaction getCustomerBalanceTransactionObject()
        Get expanded customerBalanceTransaction.
      • setCustomerBalanceTransactionObject

        public void setCustomerBalanceTransactionObject​(CustomerBalanceTransaction expandableObject)
      • getInvoice

        public java.lang.String getInvoice()
        Get ID of expandable invoice object.
      • setInvoice

        public void setInvoice​(java.lang.String id)
      • getInvoiceObject

        public Invoice getInvoiceObject()
        Get expanded invoice.
      • setInvoiceObject

        public void setInvoiceObject​(Invoice expandableObject)
      • getRefund

        public java.lang.String getRefund()
        Get ID of expandable refund object.
      • setRefund

        public void setRefund​(java.lang.String id)
      • getRefundObject

        public Refund getRefundObject()
        Get expanded refund.
      • setRefundObject

        public void setRefundObject​(Refund expandableObject)
      • create

        public static CreditNote create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                 throws StripeException
        Issue a credit note to adjust the amount of a finalized invoice. For a 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: create a new refund (using refund_amount) or link an existing refund (using refund).
        • 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_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

        Throws:
        StripeException
      • create

        public static CreditNote create​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                        RequestOptions options)
                                 throws StripeException
        Issue a credit note to adjust the amount of a finalized invoice. For a 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: create a new refund (using refund_amount) or link an existing refund (using refund).
        • 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_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

        Throws:
        StripeException
      • create

        public static CreditNote create​(CreditNoteCreateParams params)
                                 throws StripeException
        Issue a credit note to adjust the amount of a finalized invoice. For a 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: create a new refund (using refund_amount) or link an existing refund (using refund).
        • 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_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

        Throws:
        StripeException
      • create

        public static CreditNote create​(CreditNoteCreateParams params,
                                        RequestOptions options)
                                 throws StripeException
        Issue a credit note to adjust the amount of a finalized invoice. For a 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: create a new refund (using refund_amount) or link an existing refund (using refund).
        • 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_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

        Throws:
        StripeException
      • preview

        public static CreditNote preview​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                  throws StripeException
        Get a preview of a credit note without creating it.
        Throws:
        StripeException
      • getAmount

        public java.lang.Long getAmount()
        The integer amount in %s representing the total amount of the credit note, including tax.
      • getCreated

        public java.lang.Long getCreated()
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • getDiscountAmount

        public java.lang.Long getDiscountAmount()
        The integer amount in %s representing the total amount of discount that was credited.
      • getDiscountAmounts

        public java.util.List<CreditNote.DiscountAmount> getDiscountAmounts()
        The aggregate amounts calculated per discount for all line items.
      • getLivemode

        public 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.
      • getMemo

        public java.lang.String getMemo()
        Customer-facing text that appears on the credit note PDF.
      • getNumber

        public 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.
      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to credit_note.

      • getOutOfBandAmount

        public java.lang.Long getOutOfBandAmount()
        Amount that was credited outside of Stripe.
      • getPdf

        public java.lang.String getPdf()
        The link to download the PDF of the credit note.
      • getReason

        public java.lang.String getReason()
        Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory.
      • getStatus

        public java.lang.String getStatus()
        Status of this credit note, one of issued or void. Learn more about voiding credit notes.
      • getSubtotal

        public java.lang.Long getSubtotal()
        The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts.
      • getTaxAmounts

        public java.util.List<CreditNote.TaxAmount> getTaxAmounts()
        The aggregate amounts calculated per tax rate for all line items.
      • getTotal

        public java.lang.Long getTotal()
        The integer amount in %s representing the total amount of the credit note, including tax and all discount.
      • getType

        public java.lang.String getType()
        Type of this credit note, one of 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.
      • getVoidedAt

        public java.lang.Long getVoidedAt()
        The time that the credit note was voided.
      • setAmount

        public void setAmount​(java.lang.Long amount)
        The integer amount in %s representing the total amount of the credit note, including tax.
      • setCreated

        public void setCreated​(java.lang.Long created)
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • setDiscountAmount

        public void setDiscountAmount​(java.lang.Long discountAmount)
        The integer amount in %s representing the total amount of discount that was credited.
      • setDiscountAmounts

        public void setDiscountAmounts​(java.util.List<CreditNote.DiscountAmount> discountAmounts)
        The aggregate amounts calculated per discount for all line items.
      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • setLivemode

        public 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.
      • setMemo

        public void setMemo​(java.lang.String memo)
        Customer-facing text that appears on the credit note PDF.
      • 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.
      • setNumber

        public 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.
      • 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 credit_note.

      • setOutOfBandAmount

        public void setOutOfBandAmount​(java.lang.Long outOfBandAmount)
        Amount that was credited outside of Stripe.
      • setPdf

        public void setPdf​(java.lang.String pdf)
        The link to download the PDF of the credit note.
      • setReason

        public void setReason​(java.lang.String reason)
        Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory.
      • setStatus

        public void setStatus​(java.lang.String status)
        Status of this credit note, one of issued or void. Learn more about voiding credit notes.
      • setSubtotal

        public void setSubtotal​(java.lang.Long subtotal)
        The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts.
      • setTaxAmounts

        public void setTaxAmounts​(java.util.List<CreditNote.TaxAmount> taxAmounts)
        The aggregate amounts calculated per tax rate for all line items.
      • setTotal

        public void setTotal​(java.lang.Long total)
        The integer amount in %s representing the total amount of the credit note, including tax and all discount.
      • setType

        public void setType​(java.lang.String type)
        Type of this credit note, one of 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.
      • setVoidedAt

        public void setVoidedAt​(java.lang.Long voidedAt)
        The time that the credit note was voided.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • 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 interface MetadataStore<CreditNote>