Class CreditNotePreviewParams.Builder

java.lang.Object
com.stripe.param.CreditNotePreviewParams.Builder
Enclosing class:
CreditNotePreviewParams

public static class CreditNotePreviewParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public CreditNotePreviewParams build()
      Finalize and obtain parameter instance from this builder.
    • setAmount

      public CreditNotePreviewParams.Builder setAmount(Long amount)
      The integer amount in cents (or local equivalent) representing the total amount of the credit note.
    • setCreditAmount

      public CreditNotePreviewParams.Builder setCreditAmount(Long creditAmount)
      The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
    • setEffectiveAt

      public CreditNotePreviewParams.Builder setEffectiveAt(Long effectiveAt)
      The date when this credit note is in effect. Same as created unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
    • setEmailType

      Type of email to send to the customer, one of credit_note or none and the default is credit_note.
    • addExpand

      public CreditNotePreviewParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditNotePreviewParams.expand for the field documentation.
    • addAllExpand

      public CreditNotePreviewParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditNotePreviewParams.expand for the field documentation.
    • putExtraParam

      public CreditNotePreviewParams.Builder putExtraParam(String key, Object value)
      Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditNotePreviewParams.extraParams for the field documentation.
    • putAllExtraParam

      public CreditNotePreviewParams.Builder putAllExtraParam(Map<String,Object> map)
      Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditNotePreviewParams.extraParams for the field documentation.
    • setInvoice

      public CreditNotePreviewParams.Builder setInvoice(String invoice)
      Required. ID of the invoice.
    • addLine

      Add an element to `lines` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditNotePreviewParams.lines for the field documentation.
    • addAllLine

      Add all elements to `lines` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CreditNotePreviewParams.lines for the field documentation.
    • setMemo

      public CreditNotePreviewParams.Builder setMemo(String memo)
      The credit note's memo appears on the credit note PDF.
    • putMetadata

      public CreditNotePreviewParams.Builder putMetadata(String key, String value)
      Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditNotePreviewParams.metadata for the field documentation.
    • putAllMetadata

      public CreditNotePreviewParams.Builder putAllMetadata(Map<String,String> map)
      Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CreditNotePreviewParams.metadata for the field documentation.
    • setOutOfBandAmount

      public CreditNotePreviewParams.Builder setOutOfBandAmount(Long outOfBandAmount)
      The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
    • setReason

      Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory.
    • setRefund

      public CreditNotePreviewParams.Builder setRefund(String refund)
      ID of an existing refund to link this credit note to.
    • setRefundAmount

      public CreditNotePreviewParams.Builder setRefundAmount(Long refundAmount)
      The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
    • setShippingCost

      When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.