NAME

Net::API::Stripe::List::Item - A Stripe Payment Link Item

SYNOPSIS

my $item = $stripe->payment_link->line_items([
{
    object => 'list',
    data =>
    {
        amount_subtotal => 2000,
        amount_total => 2200,
        currency => 'jpy',
        description => 'Some item',
        discounts => 0,
        price =>
            {
            id => $price_id,
            object => 'price',
            active => $stripe->true,
            billing_scheme => 'per_unit',
            created => $timestamp,
            currency => 'JPY',
            livemode => $stripe->true,
            lookup_key => $key,
            metadata => { customer => 123 },
            nickname => $nickname,
            product => $product_id,
            recurring => 
                {
                aggregate_usage => 'sum',
                interval => 'month',
                interval_count => 'month',
                usage_type => 'licensed',
                },
            },
            tax_behavior => 'recurring',
            tiers => 
                {
                flat_amount => 10000,
                flat_amount_decimal => 10000,
                unit_amount => 1000,
                unit_amount_decimal => 1000,
                up_to => $value,
                },
            tiers_mode => 'graduated',
            transform_quantity => 
                {
                divide_by => $value,
                round => 'up',
                },
            type => 'recurring',
            unit_amount => 10000,
            unit_amount_decimal => 500,
        },
        quantity => 2,
        taxes =>
            {
            amount => 200,
            rate => $rate_id,
            },
    },
    has_more => $stripe->true,
    url => 'https://buy.stripe.com/test_1234567890qwertyuiop',
}]);

VERSION

v0.2.0

DESCRIPTION

The line items representing what is being sold.

This field is not included by default. To include it in the response, expand the line_items field.

This is used by:

Net::API::Stripe::Order::Item

CONSTRUCTOR

new

Creates a new Net::API::Stripe::List::Item object. It may also take an hash like arguments, that also are method of the same name.

METHODS

id string

Unique identifier for the object.

object string, value is "item"

String representing the object’s type. Objects of the same type share the same value.

amount integer

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item.

amount_discount integer

amount_subtotal integer

Total before any discounts or taxes are applied.

amount_tax integer

amount_total integer

Total after discounts and taxes.

currency currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

description string

An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.

discounts array of hashes expandable

The discounts applied to the line item.

This field is not included by default. To include it in the response, expand the discounts field.

amount integer

The amount discounted.

discount hash, discount object

The discount applied.

price hash

The price used to generate the line item.

quantity positive integer or zero

The quantity of products being purchased.

taxes array of hashes expandable

The taxes applied to the line item.

This field is not included by default. To include it in the response, expand the taxes field.

amount integer

Amount of tax applied for this rate.

rate hash

The tax rate id or hash applied.

type string

The type of line item.

API SAMPLE

{
  "id": "li_1234567890qwertyuiop",
  "object": "item",
  "amount_subtotal": 0,
  "amount_total": 0,
  "currency": "jpy",
  "description": "テスト5円",
  "price": {
    "id": "price_1234567890qwertyuiop",
    "object": "price",
    "active": true,
    "billing_scheme": "per_unit",
    "created": 1634704866,
    "currency": "jpy",
    "livemode": false,
    "lookup_key": null,
    "metadata": {},
    "nickname": null,
    "product": "prod_1234567890qwertyuiop",
    "recurring": null,
    "tax_behavior": "unspecified",
    "tiers_mode": null,
    "transform_quantity": null,
    "type": "one_time",
    "unit_amount": 5,
    "unit_amount_decimal": "5"
  },
  "quantity": 1
}

{
    "id": "il_1234567890qwertyuiop",
    "object": "line_item",
    "amount": 5,
    "currency": "jpy",
    "description": "My First Invoice Item (created for API docs)",
    "discount_amounts": [],
    "discountable": true,
    "discounts": [],
    "invoice_item": "ii_1234567890qwertyuiop",
    "livemode": false,
    "metadata": {},
    "period": {
      "end": 1643371794,
      "start": 1643371794
    },
    "price": {
      "id": "price_1234567890qwertyuiop",
      "object": "price",
      "active": true,
      "billing_scheme": "per_unit",
      "created": 1634704866,
      "currency": "jpy",
      "livemode": false,
      "lookup_key": null,
      "metadata": {},
      "nickname": null,
      "product": "prod_1234567890qwertyuiop",
      "recurring": null,
      "tax_behavior": "unspecified",
      "tiers_mode": null,
      "transform_quantity": null,
      "type": "one_time",
      "unit_amount": 5,
      "unit_amount_decimal": "5"
    },
    "proration": false,
    "quantity": 1,
    "subscription": null,
    "tax_amounts": [],
    "tax_rates": [],
    "type": "invoiceitem"
}

HISTORY

v0.1.0

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api

Invoice line item

COPYRIGHT & LICENSE

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.