Class Quote

    • Constructor Detail

      • Quote

        public Quote()
    • 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)
      • 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)
      • getOnBehalfOf

        public java.lang.String getOnBehalfOf()
        Get ID of expandable onBehalfOf object.
      • setOnBehalfOf

        public void setOnBehalfOf​(java.lang.String id)
      • getOnBehalfOfObject

        public Account getOnBehalfOfObject()
        Get expanded onBehalfOf.
      • setOnBehalfOfObject

        public void setOnBehalfOfObject​(Account expandableObject)
      • getSubscription

        public java.lang.String getSubscription()
        Get ID of expandable subscription object.
      • setSubscription

        public void setSubscription​(java.lang.String id)
      • getSubscriptionObject

        public Subscription getSubscriptionObject()
        Get expanded subscription.
      • setSubscriptionObject

        public void setSubscriptionObject​(Subscription expandableObject)
      • getSubscriptionSchedule

        public java.lang.String getSubscriptionSchedule()
        Get ID of expandable subscriptionSchedule object.
      • setSubscriptionSchedule

        public void setSubscriptionSchedule​(java.lang.String id)
      • getSubscriptionScheduleObject

        public SubscriptionSchedule getSubscriptionScheduleObject()
        Get expanded subscriptionSchedule.
      • setSubscriptionScheduleObject

        public void setSubscriptionScheduleObject​(SubscriptionSchedule expandableObject)
      • getDefaultTaxRates

        public java.util.List<java.lang.String> getDefaultTaxRates()
        Get IDs of expandable defaultTaxRates object list.
      • setDefaultTaxRates

        public void setDefaultTaxRates​(java.util.List<java.lang.String> ids)
      • getDefaultTaxRateObjects

        public java.util.List<TaxRate> getDefaultTaxRateObjects()
        Get expanded defaultTaxRates.
      • setDefaultTaxRateObjects

        public void setDefaultTaxRateObjects​(java.util.List<TaxRate> objs)
      • getDiscounts

        public java.util.List<java.lang.String> getDiscounts()
        Get IDs of expandable discounts object list.
      • setDiscounts

        public void setDiscounts​(java.util.List<java.lang.String> ids)
      • getDiscountObjects

        public java.util.List<Discount> getDiscountObjects()
        Get expanded discounts.
      • setDiscountObjects

        public void setDiscountObjects​(java.util.List<Discount> objs)
      • create

        public static Quote create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            throws StripeException
        A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
        Throws:
        StripeException
      • create

        public static Quote create​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                   RequestOptions options)
                            throws StripeException
        A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
        Throws:
        StripeException
      • finalizeQuote

        public Quote finalizeQuote​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            throws StripeException
        Finalizes the quote.
        Throws:
        StripeException
      • listLineItems

        public LineItemCollection listLineItems()
                                         throws StripeException
        When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        Throws:
        StripeException
      • listLineItems

        public LineItemCollection listLineItems​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                         throws StripeException
        When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        Throws:
        StripeException
      • listLineItems

        public LineItemCollection listLineItems​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                                RequestOptions options)
                                         throws StripeException
        When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        Throws:
        StripeException
      • listComputedUpfrontLineItems

        public LineItemCollection listComputedUpfrontLineItems​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                                        throws StripeException
        When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
        Throws:
        StripeException
      • listComputedUpfrontLineItems

        public LineItemCollection listComputedUpfrontLineItems​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                                               RequestOptions options)
                                                        throws StripeException
        When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
        Throws:
        StripeException
      • pdf

        public java.io.InputStream pdf​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                throws StripeException
        Download the PDF for a finalized quote.
        Throws:
        StripeException
      • getAmountSubtotal

        public java.lang.Long getAmountSubtotal()
        Total before any discounts or taxes are applied.
      • getAmountTotal

        public java.lang.Long getAmountTotal()
        Total after discounts and taxes are applied.
      • getApplicationFeeAmount

        public java.lang.Long getApplicationFeeAmount()
        The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
      • getApplicationFeePercent

        public java.math.BigDecimal getApplicationFeePercent()
        A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
      • getCollectionMethod

        public java.lang.String getCollectionMethod()
        Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to charge_automatically.

        One of charge_automatically, or send_invoice.

      • getCreated

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

        public java.lang.String getDescription()
        A description that will be displayed on the quote PDF.
      • getExpiresAt

        public java.lang.Long getExpiresAt()
        The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
      • getFooter

        public java.lang.String getFooter()
        A footer that will be displayed on the quote PDF.
      • getHeader

        public java.lang.String getHeader()
        A header that will be displayed on the quote PDF.
      • getInvoiceSettings

        public Quote.InvoiceSettings getInvoiceSettings()
        All invoices will be billed using the specified settings.
      • getLineItems

        public LineItemCollection getLineItems()
        A list of items the customer is being quoted for.
      • 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.
      • getNumber

        public java.lang.String getNumber()
        A unique number that identifies this particular quote. This number is assigned once the quote is finalized.
      • getObject

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

        Equal to quote.

      • getStatus

        public java.lang.String getStatus()
        The status of the quote.

        One of accepted, canceled, draft, or open.

      • getTransferData

        public Quote.TransferData getTransferData()
        The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
      • setAmountSubtotal

        public void setAmountSubtotal​(java.lang.Long amountSubtotal)
        Total before any discounts or taxes are applied.
      • setAmountTotal

        public void setAmountTotal​(java.lang.Long amountTotal)
        Total after discounts and taxes are applied.
      • setApplicationFeeAmount

        public void setApplicationFeeAmount​(java.lang.Long applicationFeeAmount)
        The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
      • setApplicationFeePercent

        public void setApplicationFeePercent​(java.math.BigDecimal applicationFeePercent)
        A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
      • setCollectionMethod

        public void setCollectionMethod​(java.lang.String collectionMethod)
        Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to charge_automatically.

        One of charge_automatically, or send_invoice.

      • setCreated

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

        public void setDescription​(java.lang.String description)
        A description that will be displayed on the quote PDF.
      • setExpiresAt

        public void setExpiresAt​(java.lang.Long expiresAt)
        The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
      • setFooter

        public void setFooter​(java.lang.String footer)
        A footer that will be displayed on the quote PDF.
      • setHeader

        public void setHeader​(java.lang.String header)
        A header that will be displayed on the quote PDF.
      • setId

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

        public void setInvoiceSettings​(Quote.InvoiceSettings invoiceSettings)
        All invoices will be billed using the specified settings.
      • setLineItems

        public void setLineItems​(LineItemCollection lineItems)
        A list of items the customer is being quoted for.
      • 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.
      • 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 quote. This number is assigned once the quote is finalized.
      • 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 quote.

      • setStatus

        public void setStatus​(java.lang.String status)
        The status of the quote.

        One of accepted, canceled, draft, or open.

      • setTransferData

        public void setTransferData​(Quote.TransferData transferData)
        The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
      • 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<Quote>