Class QuotePhase

All Implemented Interfaces:
HasId, StripeObjectInterface

public class QuotePhase extends ApiResource implements HasId
A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
  • Constructor Details

    • QuotePhase

      public QuotePhase()
  • Method Details

    • getDefaultTaxRates

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

      public void setDefaultTaxRates(List<String> ids)
    • getDefaultTaxRateObjects

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

      public void setDefaultTaxRateObjects(List<TaxRate> objs)
    • getDiscounts

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

      public void setDiscounts(List<String> ids)
    • getDiscountObjects

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

      public void setDiscountObjects(List<Discount> objs)
    • listLineItems

      public LineItemCollection listLineItems() throws StripeException
      When retrieving a quote phase, 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(Map<String,Object> params) throws StripeException
      When retrieving a quote phase, 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(Map<String,Object> params, RequestOptions options) throws StripeException
      When retrieving a quote phase, 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

      When retrieving a quote phase, 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(QuotePhaseListLineItemsParams params, RequestOptions options) throws StripeException
      When retrieving a quote phase, 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
    • retrieve

      public static QuotePhase retrieve(String quotePhase) throws StripeException
      Retrieves the quote phase with the given ID.
      Throws:
      StripeException
    • retrieve

      public static QuotePhase retrieve(String quotePhase, RequestOptions options) throws StripeException
      Retrieves the quote phase with the given ID.
      Throws:
      StripeException
    • retrieve

      public static QuotePhase retrieve(String quotePhase, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the quote phase with the given ID.
      Throws:
      StripeException
    • retrieve

      public static QuotePhase retrieve(String quotePhase, QuotePhaseRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the quote phase with the given ID.
      Throws:
      StripeException
    • getAmountSubtotal

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

      public Long getAmountTotal()
      Total after discounts and taxes are applied.
    • getBillingCycleAnchor

      public String getBillingCycleAnchor()
      If set to reset, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.

      Equal to reset.

    • getCollectionMethod

      public String getCollectionMethod()
      Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.

      One of charge_automatically, or send_invoice.

    • getEndDate

      public Long getEndDate()
      The end of this phase of the quote.
    • getInvoiceSettings

      public QuotePhase.InvoiceSettings getInvoiceSettings()
      The invoice settings applicable during this phase.
    • getIterations

      public Long getIterations()
      Integer representing the multiplier applied to the price interval. For example, iterations=2 applied to a price with interval=month and interval_count=3 results in a phase of duration 2 * 3 months = 6 months.
    • getLineItems

      public LineItemCollection getLineItems()
      A list of items the customer is being quoted for.
    • getObject

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

      Equal to quote_phase.

    • getProrationBehavior

      public String getProrationBehavior()
      If the quote will prorate when transitioning to this phase. Possible values are create_prorations and none.

      One of always_invoice, create_prorations, or none.

    • getTotalDetails

      public QuotePhase.TotalDetails getTotalDetails()
    • getTrial

      public Boolean getTrial()
      If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
    • getTrialEnd

      public Long getTrialEnd()
      When the trial ends within the phase.
    • setAmountSubtotal

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

      public void setAmountTotal(Long amountTotal)
      Total after discounts and taxes are applied.
    • setBillingCycleAnchor

      public void setBillingCycleAnchor(String billingCycleAnchor)
      If set to reset, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.

      Equal to reset.

    • setCollectionMethod

      public void setCollectionMethod(String collectionMethod)
      Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.

      One of charge_automatically, or send_invoice.

    • setEndDate

      public void setEndDate(Long endDate)
      The end of this phase of the quote.
    • setId

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

      public void setInvoiceSettings(QuotePhase.InvoiceSettings invoiceSettings)
      The invoice settings applicable during this phase.
    • setIterations

      public void setIterations(Long iterations)
      Integer representing the multiplier applied to the price interval. For example, iterations=2 applied to a price with interval=month and interval_count=3 results in a phase of duration 2 * 3 months = 6 months.
    • setLineItems

      public void setLineItems(LineItemCollection lineItems)
      A list of items the customer is being quoted for.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to quote_phase.

    • setProrationBehavior

      public void setProrationBehavior(String prorationBehavior)
      If the quote will prorate when transitioning to this phase. Possible values are create_prorations and none.

      One of always_invoice, create_prorations, or none.

    • setTotalDetails

      public void setTotalDetails(QuotePhase.TotalDetails totalDetails)
    • setTrial

      public void setTrial(Boolean trial)
      If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
    • setTrialEnd

      public void setTrialEnd(Long trialEnd)
      When the trial ends within the phase.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId