Package com.stripe.model
Class SubscriptionSchedule.Phase
java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.SubscriptionSchedule.Phase
- All Implemented Interfaces:
StripeObjectInterface
- Enclosing class:
- SubscriptionSchedule
A phase describes the plans, coupon, and trialing status of a subscription for a predefined
time period.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.static class
The discount end type.static class
Get expandedaccount
.static class
static class
The discount end type.static class
A phase item describes the price and quantity of a phase.static class
The Pause Collection settings specify how to pause collection for a subscription during a phase by modifying the behavior of the invoices that are generated during the paused period.static class
static class
Configures how the scheduled subscription behaves during the trial period. -
Field Summary
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.A non-negative decimal between 0 and 100, with at most two decimal places.Possible values arephase_start
orautomatic
.Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.Eithercharge_automatically
, orsend_invoice
.Get ID of expandablecoupon
object.Get expandedcoupon
.Three-letter ISO currency code, in lowercase.Get ID of expandabledefaultPaymentMethod
object.Get expandeddefaultPaymentMethod
.The default tax rates to apply to the subscription during this phase of the subscription schedule.Subscription description, meant to be displayable to the customer.The stackable discounts that will be applied to the subscription on this phase.The end of this phase of the subscription schedule.The invoice settings applicable during this phase.getItems()
Subscription items to configure the subscription to during this phase of the subscription schedule.Set of key-value pairs that you can attach to a phase.Get ID of expandableonBehalfOf
object.Get expandedonBehalfOf
.If specified, payment collection for this subscription will be paused.If the subscription schedule will prorate when transitioning to this phase.The start of this phase of the subscription schedule.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.Specify behavior of the trial when crossing schedule phase boundariesWhen the trial ends within the phase.Settings related to any trials on the subscription during this phase.int
hashCode()
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.void
setApplicationFeePercent
(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.void
setAutomaticTax
(SubscriptionSchedule.Phase.AutomaticTax automaticTax) void
setBillingCycleAnchor
(String billingCycleAnchor) Possible values arephase_start
orautomatic
.void
setBillingThresholds
(SubscriptionSchedule.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.void
setCollectionMethod
(String collectionMethod) Eithercharge_automatically
, orsend_invoice
.void
void
setCouponObject
(Coupon expandableObject) void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
void
setDefaultPaymentMethodObject
(PaymentMethod expandableObject) void
setDefaultTaxRates
(List<TaxRate> defaultTaxRates) The default tax rates to apply to the subscription during this phase of the subscription schedule.void
setDescription
(String description) Subscription description, meant to be displayable to the customer.void
setDiscounts
(List<SubscriptionSchedule.Phase.Discount> discounts) The stackable discounts that will be applied to the subscription on this phase.void
setEndDate
(Long endDate) The end of this phase of the subscription schedule.void
setInvoiceSettings
(SubscriptionSchedule.Phase.InvoiceSettings invoiceSettings) The invoice settings applicable during this phase.void
Subscription items to configure the subscription to during this phase of the subscription schedule.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to a phase.void
setOnBehalfOf
(String id) void
setOnBehalfOfObject
(Account expandableObject) void
setPauseCollection
(SubscriptionSchedule.Phase.PauseCollection pauseCollection) If specified, payment collection for this subscription will be paused.void
setProrationBehavior
(String prorationBehavior) If the subscription schedule will prorate when transitioning to this phase.void
setStartDate
(Long startDate) The start of this phase of the subscription schedule.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.void
setTrialContinuation
(String trialContinuation) Specify behavior of the trial when crossing schedule phase boundariesvoid
setTrialEnd
(Long trialEnd) When the trial ends within the phase.void
setTrialSettings
(SubscriptionSchedule.Phase.TrialSettings trialSettings) Settings related to any trials on the subscription during this phase.Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
Phase
public Phase()
-
-
Method Details
-
getCoupon
Get ID of expandablecoupon
object. -
setCoupon
-
getCouponObject
Get expandedcoupon
. -
setCouponObject
-
getDefaultPaymentMethod
Get ID of expandabledefaultPaymentMethod
object. -
setDefaultPaymentMethod
-
getDefaultPaymentMethodObject
Get expandeddefaultPaymentMethod
. -
setDefaultPaymentMethodObject
-
getOnBehalfOf
Get ID of expandableonBehalfOf
object. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf
. -
setOnBehalfOfObject
-
getAddInvoiceItems
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. -
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
-
getBillingCycleAnchor
Possible values arephase_start
orautomatic
. Ifphase_start
then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. Ifautomatic
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
, orphase_start
. -
getBillingThresholds
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. -
getCollectionMethod
Eithercharge_automatically
, orsend_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 asactive
.One of
charge_automatically
, orsend_invoice
. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDefaultTaxRates
The default tax rates to apply to the subscription during this phase of the subscription schedule. -
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
The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. -
getEndDate
The end of this phase of the subscription schedule. -
getInvoiceSettings
The invoice settings applicable during this phase. -
getItems
Subscription items to configure the subscription to during this phase of the subscription schedule. -
getMetadata
Set of key-value pairs that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription'smetadata
when the phase is entered. Updating the underlying subscription'smetadata
directly will not affect the current phase'smetadata
. -
getPauseCollection
If specified, payment collection for this subscription will be paused. -
getProrationBehavior
If the subscription schedule will prorate when transitioning to this phase. Possible values arecreate_prorations
andnone
.One of
always_invoice
,create_prorations
, ornone
. -
getStartDate
The start of this phase of the subscription schedule. -
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. -
getTrialContinuation
Specify behavior of the trial when crossing schedule phase boundariesOne of
continue
, ornone
. -
getTrialEnd
When the trial ends within the phase. -
getTrialSettings
Settings related to any trials on the subscription during this phase. -
setAddInvoiceItems
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. -
setApplicationFeePercent
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
-
setBillingCycleAnchor
Possible values arephase_start
orautomatic
. Ifphase_start
then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. Ifautomatic
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
, orphase_start
. -
setBillingThresholds
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. -
setCollectionMethod
Eithercharge_automatically
, orsend_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 asactive
.One of
charge_automatically
, orsend_invoice
. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDefaultTaxRates
The default tax rates to apply to the subscription during this phase of the subscription schedule. -
setDescription
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
The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. -
setEndDate
The end of this phase of the subscription schedule. -
setInvoiceSettings
The invoice settings applicable during this phase. -
setItems
Subscription items to configure the subscription to during this phase of the subscription schedule. -
setMetadata
Set of key-value pairs that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription'smetadata
when the phase is entered. Updating the underlying subscription'smetadata
directly will not affect the current phase'smetadata
. -
setPauseCollection
If specified, payment collection for this subscription will be paused. -
setProrationBehavior
If the subscription schedule will prorate when transitioning to this phase. Possible values arecreate_prorations
andnone
.One of
always_invoice
,create_prorations
, ornone
. -
setStartDate
The start of this phase of the subscription schedule. -
setTransferData
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. -
setTrialContinuation
Specify behavior of the trial when crossing schedule phase boundariesOne of
continue
, ornone
. -
setTrialEnd
When the trial ends within the phase. -
setTrialSettings
Settings related to any trials on the subscription during this phase. -
equals
-
canEqual
-
hashCode
public int hashCode()
-