NAME

Net::API::Stripe::Billing::CreditNote::LineItem - Stripe API Credit note Line Item Object

SYNOPSIS

my $line = $stripe->credit_note_line_item({
    amount => 10000,
    description => 'Product return credit note',
    livemode => $stripe->false,
    quantity => 2,
    type => 'custom_line_item',
});

VERSION

v0.101.0

DESCRIPTION

my $credit_line = $stripe->credit_note_line_item({
    amount => 2000,
    description => 'Credit note line text',
    discount_amount => 500,
    quantity => 2,
    type => 'invoice_line_item',
});

CONSTRUCTOR

new( %arg )

Creates a new Net::API::Stripe::Billing::CreditNote::LineItem object

METHODS

id string

Unique identifier for the object.

object string, value is "credit_note_line_item"

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

amount integer

The integer amount in JPY representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.

amount_excluding_tax integer

The integer amount in JPY representing the amount being credited for this line item, excluding all tax and discounts.

description string

Description of the item being credited.

discount_amount integer

The integer amount in JPY representing the discount being credited for this line item.

discount_amounts array of hash

The amount of discount calculated per discount for this line item

It has the following properties:

amount integer

The amount, in JPY, of the discount.

discount string

The discount that was applied to get this discount amount.

invoice_line_item string

ID of the invoice line item being credited

livemode boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

quantity integer

The number of units of product being credited.

tax_amounts array of objects

The amount of tax calculated per tax rate for this line item.

This is a dynamic class with the following properties:

amount integer

The amount, in JPY, of the tax.

inclusive boolean

Whether this tax amount is inclusive or exclusive.

tax_rate string expandable

The tax rate that was applied to get this tax amount.

When expanded, this is a Net::API::Stripe::Tax::Rate object.

tax_rates array of Net::API::Stripe::Tax::Rate objects

The tax rates which apply to the line item.

type string

The type of the credit note line item, one of custom_line_item or invoice_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice.

unit_amount integer

The cost of each unit of product being credited.

unit_amount_decimal decimal string

Same as unit_amount, but contains a decimal value with at most 12 decimal places.

unit_amount_excluding_tax decimal_string

The amount in JPY representing the unit amount being credited for this line item, excluding all tax and discounts.

API SAMPLE

{
  "id": "cnli_fake124567890",
  "object": "credit_note_line_item",
  "amount": 1000,
  "description": "My First Invoice Item (created for API docs)",
  "discount_amount": 0,
  "invoice_line_item": "il_fake124567890",
  "livemode": false,
  "quantity": 1,
  "tax_amounts": [],
  "tax_rates": [],
  "type": "invoice_line_item",
  "unit_amount": null,
  "unit_amount_decimal": null
}

HISTORY

v0.100.0

Initial version

STRIPE HISTORY

2019-12-03

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.

  • You can no longer use the prefix of the id to determine the source of the line item. Instead use the type field for this purpose.

  • For lines with type=invoiceitem, use the invoice_item field to reference or update the originating Invoice Item object.

  • The Invoice Line Item object on earlier API versions also have a unique_id field to be used for migrating internal references before upgrading to this version.

  • When setting a tax rate to individual line items, use the new id. Users on earlier API versions can pass in either a line item id or unique_id.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

https://stripe.com/docs/api/credit_notes/line_item

COPYRIGHT & LICENSE

Copyright (c) 2020-2020 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.