View Source ExOAPI.Stripe.Schemas.SubscriptionSchedulePhaseConfiguration (exoapi_stripe v0.1.4)

description: A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.

::add_invoice_items :: ExOAPI.Stripe.Schemas.SubscriptionScheduleAddInvoiceItem

:application_fee_percent :: :number

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 during this phase of the schedule.

:automatic_tax :: ExOAPI.Stripe.Schemas.SchedulesPhaseAutomaticTax

:billing_cycle_anchor :: :string

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.

:billing_thresholds :: ExOAPI.Stripe.Schemas.SubscriptionBillingThresholds

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period

:collection_method :: :string

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.

:coupon :: ExOAPI.Stripe.Schemas.DeletedCoupon | ExOAPI.Stripe.Schemas.Coupon | :string

ID of the coupon to use during this phase of the subscription schedule.

:default_payment_method :: ExOAPI.Stripe.Schemas.PaymentMethod | :string

ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.

::default_tax_rates :: ExOAPI.Stripe.Schemas.TaxRate

:end_date :: :integer

The end of this phase of the subscription schedule.

:invoice_settings :: ExOAPI.Stripe.Schemas.InvoiceSettingSubscriptionScheduleSetting

The invoice settings applicable during this phase.

::items :: ExOAPI.Stripe.Schemas.SubscriptionScheduleConfigurationItem

:proration_behavior :: :string

If the subscription schedule will prorate when transitioning to this phase. Possible values are create_prorations and none.

:start_date :: :integer

The start of this phase of the subscription schedule.

:transfer_data :: ExOAPI.Stripe.Schemas.SubscriptionTransferData

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.

:trial_end :: :integer

When the trial ends within the phase.

Link to this section Summary

Link to this section Types

@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.SubscriptionSchedulePhaseConfiguration{
  add_invoice_items: [
    ExOAPI.Stripe.Schemas.SubscriptionScheduleAddInvoiceItem.t()
  ],
  application_fee_percent: float() | nil,
  automatic_tax: ExOAPI.Stripe.Schemas.SchedulesPhaseAutomaticTax.t() | nil,
  billing_cycle_anchor: (:phase_start | :automatic) | nil,
  billing_thresholds: ExOAPI.EctoTypes.AnyOf.t() | nil,
  collection_method: (:send_invoice | :charge_automatically) | nil,
  coupon: ExOAPI.EctoTypes.AnyOf.t() | nil,
  default_payment_method: ExOAPI.EctoTypes.AnyOf.t() | nil,
  default_tax_rates: [ExOAPI.Stripe.Schemas.TaxRate.t()],
  end_date: integer() | nil,
  invoice_settings: ExOAPI.EctoTypes.AnyOf.t() | nil,
  items: [ExOAPI.Stripe.Schemas.SubscriptionScheduleConfigurationItem.t()],
  proration_behavior: (:none | :create_prorations | :always_invoice) | nil,
  start_date: integer() | nil,
  transfer_data: ExOAPI.EctoTypes.AnyOf.t() | nil,
  trial_end: integer() | nil
}

Link to this section Functions

Link to this function

changeset(struct \\ %__MODULE__{}, params)

View Source
@spec changeset(t(), params()) :: Ecto.Changeset.t()