Net::API::Stripe::Billing::Subscription::Schedule - A Stripe Subscription Schedule Object
0.1
A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
Creates a new Net::API::Stripe objects. It may also take an hash like arguments, that also are method of the same name.
Net::API::Stripe
Toggles verbose mode on/off
Toggles debug mode on/off
Unique identifier for the object.
subscription_schedule
String representing the object’s type. Objects of the same type share the same value.
Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
Time at which the object was created. Measured in seconds since the Unix epoch.
Object representing the start and end dates for the current phase of the subscription schedule, if it is active.
ID of the customer who owns the subscription schedule. When expanded, this is a Net::API::Stripe::Customer object.
Net::API::Stripe::Customer
Object representing the subscription schedule’s default settings.
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
This is a Net::API::Stripe::Billing::Thresholds object.
Net::API::Stripe::Billing::Thresholds
Monetary threshold that triggers the subscription to create an invoice
Indicates if the billing_cycle_anchor should be reset when a threshold is reached. If true, billing_cycle_anchor will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be true if the subscription contains items with plans that have aggregate_usage=last_ever.
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.
ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer’s invoice settings. When expanded, this is a Net::API::Stripe::Payment::Method object.
Net::API::Stripe::Payment::Method
The subscription schedule’s default invoice settings.
Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be null for subscription schedules where billing=charge_automatically.
Behavior of the subscription schedule and underlying subscription when it ends.
Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription’s plan(s), set to auto-renew using the subscription’s interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, Stripe recommends making two separate API calls.
This is used only when creating a subscription schedule.
If the subscription schedule is active, indicates whether or not to generate a final invoice that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to true.
This is used only when cancelling a subscription schedule.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
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.
Configuration for the subscription schedule’s phases.
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.
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
ID of the coupon to use during this phase of the subscription schedule. When expanded, this is a Net::API::Stripe::Billing::Coupon object.
Net::API::Stripe::Billing::Coupon
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.
When expanded, this is a Net::API::Stripe::Payment::Method object.
Net::API::Stripe::Tax::Rate
The end of this phase of the subscription schedule.
Integer representing the multiplier applied to the plan interval. For example, iterations=2 applied to a plan with interval=month and interval_count=3 results in a phase of duration 2 * 3 months = 6 months. If set, end_date must not be set.
This option is only used in making calls to create or update a subscription schedule.
Plans to subscribe during this phase of the subscription schedule.
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
Usage threshold that triggers the subscription to create an invoice
ID of the plan to which the customer should be subscribed. When expanded, this is a Net::API::Stripe::Billing::Plan object.
Net::API::Stripe::Billing::Plan
Quantity of the plan to which the customer should be subscribed.
Net::APi::Stripe::Tax::Rate
The tax rates which apply to this phase_item. When set, the default_tax_rates on the phase do not apply to this phase_item.
The start of this phase of the subscription schedule.
When the trial ends within the phase.
Keep any cancellation on the subscription that the schedule has set.
This is used only when cancelling subscription schedule.
This is used only when making a Stripe api call to release a subscription schedule.
This is only used when making update or cancel.
When doing an update and if the update changes the current phase, indicates if the changes should be prorated. Defaults to true.
When cancelling the subscription schedule, if the subscription schedule is active, this indicates if the cancellation should be prorated. Defaults to true.
Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
ID of the subscription once managed by the subscription schedule (if it is released).
When the subscription schedule starts. We recommend using now so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. When you backdate, the billing_cycle_anchor of the subscription is equivalent to the start_date.
The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide.
ID of the subscription managed by the subscription schedule. When expanded, this is a Net::API::Stripe::Billing::Subscription object.
Net::API::Stripe::Billing::Subscription
{ "id": "sub_sched_q0liaqLZs27slD", "object": "subscription_schedule", "canceled_at": null, "completed_at": null, "created": 1577193148, "current_phase": null, "customer": "cus_G7ucGt79A501bC", "default_settings": { "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null }, "end_behavior": "cancel", "livemode": false, "metadata": {}, "phases": [ { "application_fee_percent": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1572481590, "invoice_settings": null, "plans": [ { "billing_thresholds": null, "plan": "gold", "quantity": 1, "tax_rates": [] } ], "start_date": 1541031990, "tax_percent": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "not_started", "subscription": null }
Initial version
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api, https://stripe.com/docs/api/subscription_schedules/object, https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing
Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Net::API::Stripe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::Stripe
CPAN shell
perl -MCPAN -e shell install Net::API::Stripe
For more information on module installation, please visit the detailed CPAN module installation guide.