Net::API::Stripe::Billing::Invoice::LineItem - A Stripe Invoice Line Item Object
my $line_item = $stripe->invoice_line_item({ amount => 2000, currency => 'jpy', description 'Professional service work', discountable => 0, metadata => { transaction_id => 1212, customer_id => 987 }, plan => $plan_object, proration => 0, quantity => 7, subscription => 'sub_fake123456789', type => 'subscription', });
v0.100.0
This is a Stripe Net::API::Stripe::Billing::Invoice::LineItem object as documented here: https://stripe.com/docs/api/invoices/line_item
Creates a new Net::API::Stripe::Billing::Invoice::LineItem object.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
The amount, in its smallest representation, such as cents. For example, $9 would be 900, and ¥1000 (Japanese Yen) would be 1000.
The integer amount representing the amount for this line item, excluding all tax and discounts.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
An arbitrary string attached to the object. Often useful for displaying to users.
The amount of discount calculated per discount for this line item.
Properties are:
The amount of the discount.
The discount that was applied to get this discount amount.
When expanded, this is a Net::API::Stripe::Billing::Discount object.
If true, discounts will apply to this line item. Always false for prorations.
The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
expand[]=discounts
When expanded this is an Net::API::Stripe::Billing::Discount object.
The ID of the invoice item associated with this line item if any.
Whether this is a test line 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. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created.
The timespan covered by this invoice item.
This is a Net::API::Stripe::Billing::Invoice::Period object.
The plan of the subscription, if the line item is a subscription or a proration.
This is a Net::API::Stripe::Billing::Plan object.
The price of the line item.
This is a Net::API::Stripe::Price object.
Whether this is a proration.
Additional details for proration line items
credited_items hash
For a credit proration line_item, the original debit line_items to which the credit proration applies.
invoice string
invoice
Invoice containing the credited invoice line items
invoice_line_items array containing strings
invoice_line_items
Credited invoice line items
The quantity of the subscription, if the line item is a subscription or a proration.
The subscription that the invoice item pertains to, if any.
The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
The amount of tax calculated per tax rate for this line item
This is an array of Net::API::Stripe::Billing::Invoice::TaxAmount objects.
The tax rates which apply to the line item.
This is an array of Net::API::Stripe::Tax::Rate objects.
A string identifying the type of the source of this line item, either an invoiceitem or a subscription.
For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.
The amount in the currency smallest representation, such as cents representing the unit amount for this line item, excluding all tax and discounts. Example 900 for $9 or 1000 for ¥1000 (Japanese Yen).
$9
{ "id": "ii_fake123456789", "object": "line_item", "amount": -2000, "currency": "jpy", "description": "Unused time on Provider, Inc entrepreneur monthly membership after 02 Mar 2019", "discountable": false, "invoice_item": "ii_fake123456789", "livemode": false, "metadata": {}, "period": { "end": 1554171359, "start": 1551493020 }, "plan": { "id": "entrepreneur-monthly-jpy", "object": "plan", "active": true, "aggregate_usage": null, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1541833424, "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" }, "proration": true, "quantity": 1, "subscription": "sub_fake123456789", "subscription_item": "si_fake123456789", "tax_amounts": [], "tax_rates": [], "type": "invoiceitem" }
Initial version
The id field of all invoice line items have changed and are now prefixed with il_. The new id has consistent prefixes across all line items, is globally unique, and can be used for pagination.
The following methods have been aded by Stripe:
"amount_excluding_tax"
"proration_details"
"unit_amount_excluding_tax"
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/invoices/line_item
Copyright (c) 2019-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.