Class SubscriptionSchedule.Phase

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.SubscriptionSchedule.Phase
All Implemented Interfaces:
StripeObjectInterface
Enclosing class:
SubscriptionSchedule

public static class SubscriptionSchedule.Phase extends StripeObject
A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.
  • Constructor Details

    • Phase

      public Phase()
  • Method Details

    • getCoupon

      public String getCoupon()
      Get ID of expandable coupon object.
    • setCoupon

      public void setCoupon(String id)
    • getCouponObject

      public Coupon getCouponObject()
      Get expanded coupon.
    • setCouponObject

      public void setCouponObject(Coupon expandableObject)
    • getDefaultPaymentMethod

      public String getDefaultPaymentMethod()
      Get ID of expandable defaultPaymentMethod object.
    • setDefaultPaymentMethod

      public void setDefaultPaymentMethod(String id)
    • getDefaultPaymentMethodObject

      public PaymentMethod getDefaultPaymentMethodObject()
      Get expanded defaultPaymentMethod.
    • setDefaultPaymentMethodObject

      public void setDefaultPaymentMethodObject(PaymentMethod expandableObject)
    • getOnBehalfOf

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

      public void setOnBehalfOf(String id)
    • getOnBehalfOfObject

      public Account getOnBehalfOfObject()
      Get expanded onBehalfOf.
    • setOnBehalfOfObject

      public void setOnBehalfOfObject(Account expandableObject)
    • getAddInvoiceItems

      public List<SubscriptionSchedule.Phase.AddInvoiceItem> getAddInvoiceItems()
      A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
    • getApplicationFeePercent

      public BigDecimal getApplicationFeePercent()
      A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.
    • getAutomaticTax

      public SubscriptionSchedule.Phase.AutomaticTax getAutomaticTax()
    • getBillingCycleAnchor

      public String getBillingCycleAnchor()
      Possible values are phase_start or automatic. If phase_start then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If automatic then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.

      One of automatic, or phase_start.

    • getBillingThresholds

      public SubscriptionSchedule.Phase.BillingThresholds getBillingThresholds()
      Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
    • 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.

    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getDefaultTaxRates

      public List<TaxRate> getDefaultTaxRates()
      The default tax rates to apply to the subscription during this phase of the subscription schedule.
    • getDescription

      public String getDescription()
      Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
    • getDiscounts

      public List<SubscriptionSchedule.Phase.Discount> getDiscounts()
      The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
    • getEndDate

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

      public SubscriptionSchedule.Phase.InvoiceSettings getInvoiceSettings()
      The invoice settings applicable during this phase.
    • getItems

      Subscription items to configure the subscription to during this phase of the subscription schedule.
    • getMetadata

      public Map<String,String> getMetadata()
      Set of key-value pairs that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's metadata when the phase is entered. Updating the underlying subscription's metadata directly will not affect the current phase's metadata.
    • getProrationBehavior

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

      One of always_invoice, create_prorations, or none.

    • getStartDate

      public Long getStartDate()
      The start of this phase of the subscription schedule.
    • getTransferData

      public SubscriptionSchedule.Phase.TransferData getTransferData()
      The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
    • getTrialEnd

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

      public void setAddInvoiceItems(List<SubscriptionSchedule.Phase.AddInvoiceItem> addInvoiceItems)
      A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
    • setApplicationFeePercent

      public void setApplicationFeePercent(BigDecimal applicationFeePercent)
      A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.
    • setAutomaticTax

      public void setAutomaticTax(SubscriptionSchedule.Phase.AutomaticTax automaticTax)
    • setBillingCycleAnchor

      public void setBillingCycleAnchor(String billingCycleAnchor)
      Possible values are phase_start or automatic. If phase_start then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If automatic then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle documentation.

      One of automatic, or phase_start.

    • setBillingThresholds

      public void setBillingThresholds(SubscriptionSchedule.Phase.BillingThresholds billingThresholds)
      Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
    • 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.

    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setDefaultTaxRates

      public void setDefaultTaxRates(List<TaxRate> defaultTaxRates)
      The default tax rates to apply to the subscription during this phase of the subscription schedule.
    • setDescription

      public void setDescription(String description)
      Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
    • setDiscounts

      public void setDiscounts(List<SubscriptionSchedule.Phase.Discount> discounts)
      The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
    • setEndDate

      public void setEndDate(Long endDate)
      The end of this phase of the subscription schedule.
    • setInvoiceSettings

      public void setInvoiceSettings(SubscriptionSchedule.Phase.InvoiceSettings invoiceSettings)
      The invoice settings applicable during this phase.
    • setItems

      public void setItems(List<SubscriptionSchedule.Phase.Item> items)
      Subscription items to configure the subscription to during this phase of the subscription schedule.
    • setMetadata

      public void setMetadata(Map<String,String> metadata)
      Set of key-value pairs that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's metadata when the phase is entered. Updating the underlying subscription's metadata directly will not affect the current phase's metadata.
    • setProrationBehavior

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

      One of always_invoice, create_prorations, or none.

    • setStartDate

      public void setStartDate(Long startDate)
      The start of this phase of the subscription schedule.
    • setTransferData

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