NAME
Net::API::Stripe::Billing::Invoice::Item - A Stripe Invoice Item Object
SYNOPSIS
VERSION
0.1
DESCRIPTION
Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.
CONSTRUCTOR
- new( %ARG )
-
Creates a new
Net::API::Stripe
objects. It may also take an hash like arguments, that also are method of the same name.- verbose
-
Toggles verbose mode on/off
- debug
-
Toggles debug mode on/off
METHODS
- id string
-
Unique identifier for the object.
- object string, value is "invoiceitem"
-
String representing the object’s type. Objects of the same type share the same value.
- amount integer
-
Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity.
- currency currency
-
Three-letter ISO currency code, in lowercase. Must be a supported currency (https://stripe.com/docs/currencies).
- customer string (expandable)
-
The ID of the customer who will be billed when this invoice item is billed. When expanded, this is a
Net::API::Stripe::Customer
object. - date timestamp
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- description string
-
An arbitrary string attached to the object. Often useful for displaying to users.
- discountable boolean
-
If true, discounts will apply to this invoice item. Always false for prorations.
- invoice string (expandable)
-
The ID of the invoice this invoice item belongs to. When expanded, this is a
Net::API::Stripe::Billing::Invoice
object. - livemode boolean
-
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- metadata hash
-
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.
- period hash
-
The period associated with with this invoice item.
This is a
Net::API::Stripe::Billing::Invoice::Period
object. - plan hash, plan object
-
If the invoice item is a proration, the plan of the subscription that the proration was computed for.
This is a
Net::API::Stripe::Billing::Plan
object. - proration boolean
-
Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
- quantity integer
-
Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
- subscription string (expandable)
-
The subscription that this invoice item has been created for, if any. When expanded, this is a
Net::API::Stripe::Billing::Subscription
object. - subscription_item string
-
The subscription item that this invoice item has been created for, if any.
- tax_rates array of hashes
-
The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.
This is an array of
Net::API::Stripe::Tax::Rate
objects. - unified_proration boolean
-
For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.
- unit_amount integer
-
Unit Amount (in the currency specified) of the invoice item.
- unit_amount_decimal decimal string
-
Same as unit_amount, but contains a decimal value with at most 12 decimal places.
API SAMPLE
{
"id": "ii_1E9NPMCeyNCl6fY2kwMZb4TN",
"object": "invoiceitem",
"amount": 8000,
"currency": "jpy",
"customer": "cus_G0vQn57xCoD5rG",
"date": 1551493020,
"description": "Unused time on Angels, Inc entrepreneur monthly membership after 02 Mar 2019",
"discountable": false,
"invoice": "in_1EKcARCeyNCl6fY2BaXPdnwG",
"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_DwjzQmlOcoMCqN",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"proration": true,
"quantity": 1,
"subscription": "sub_EccdFNq60pUMDL",
"subscription_item": "si_Eccd4op26fXydB",
"tax_rates": [],
"unit_amount": 8000,
"unit_amount_decimal": "8000"
}
HISTORY
v0.1
Initial version
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Stripe API documentation:
https://stripe.com/docs/api/invoiceitems, https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items
COPYRIGHT & LICENSE
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:
- Around line 105:
You forgot a '=back' before '=head1'