Net::API::Stripe::Billing::Subscription::Item - A Stripe Subscription Item Object
my $item = $stripe->subscription_item({ clear_usage => 1, metadata => { transaction_id => 1212, customer_id => 123 }, quantity => 1, subscription => 'sub_fake123456789', });
v0.1.1
Subscription items allow you to create customer subscriptions with more than one plan, making it easy to represent complex billing relationships.
Creates a new Net::API::Stripe::Billing::Subscription::Item object.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
This is a Net::API::Stripe::Billing::Thresholds object.
Usage threshold that triggers the subscription to create an invoice
Delete all usage for a given subscription item. Allowed only when deleted is set to true and the current plan’s usage_type is metered.
This is used in making upcoming invoice items api calls as described here: https://stripe.com/docs/api/invoices/upcoming_invoice_lines
Time at which the object was created. Measured in seconds since the Unix epoch.
A flag that, if set to true, will delete the specified item.
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.
Hash describing the plan the customer is subscribed to.
This is a Net::API::Stripe::Billing::Plan object.
The price the customer is subscribed to.
This is a Net::API::Stripe::Price object.
The quantity of the plan to which the customer should be subscribed.
The subscription this subscription_item belongs to.
The tax rates which apply to this subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.
This is an array of Net::API::Stripe::Tax::Rate objects.
{ "id": "si_fake123456789", "object": "subscription_item", "billing_thresholds": null, "created": 1571397912, "metadata": {}, "plan": { "id": "expert-monthly-jpy", "object": "plan", "active": true, "aggregate_usage": null, "amount": 8000, "amount_decimal": "8000", "billing_scheme": "per_unit", "created": 1507273129, "currency": "jpy", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_fake123456789", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "quantity": 1, "subscription": "sub_fake123456789", "tax_rates": [] }
Initial version
Added the methods clear_usage and deleted used in making upcoming invoice item api calls as explained here https://stripe.com/docs/api/invoices/upcoming_invoice_lines
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/subscription_items
Copyright (c) 2020-2020 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
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.