NAME
Net::API::Stripe::Checkout::Item - A Stripe Checkout Item
SYNOPSIS
my $item = $stripe->session->display_items([
{
amount => 2000,
currency => 'jpy',
description => 'Some item',
name => 'Session item',
plan => $plan_object,
quantity => 1,
type => 'plan',
}]);
VERSION
v0.200.0
DESCRIPTION
The line items, plans, or SKUs purchased by the customer.
This is part of the Net::API::Stripe::Checkout::Session object an called from the method display_items
It inherits from Net::API::Stripe::List::Item
CONSTRUCTOR
new
Creates a new Net::API::Stripe::Checkout::Item object. It may also take an hash like arguments, that also are method of the same name.
METHODS
amount integer
Amount for the display item.
currency currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
custom hash
- description string
-
The description of the line item.
- images array containing strings
-
The images of the line item.
- name string
-
The name of the line item.
description string
The description for the line item. This is used in session checkout line_items.
images string
A list of images representing this line item. This is used in session checkout line_items.
name string
The name for the line item. This is used in session checkout line_items.
plan hash, plan object
This is a Net::API::Stripe::Billing::Plan object.
quantity integer
Quantity of the display item being purchased.
sku hash, sku object
This is a Net::API::Stripe::Order::SKU object.
type string
The type of display item. One of custom, plan or sku
API SAMPLE
{
"id": "ppage_fake123456789",
"object": "checkout.session",
"billing_address_collection": null,
"cancel_url": "https://example.com/cancel",
"client_reference_id": null,
"customer": null,
"customer_email": null,
"display_items": [
{
"amount": 1500,
"currency": "usd",
"custom": {
"description": "Comfortable cotton t-shirt",
"images": null,
"name": "T-shirt"
},
"quantity": 2,
"type": "custom"
}
],
"livemode": false,
"locale": null,
"mode": null,
"payment_intent": "pi_fake123456789",
"payment_method_types": [
"card"
],
"setup_intent": null,
"submit_type": null,
"subscription": null,
"success_url": "https://example.com/success",
"line_items": [
{
"name": "T-shirt",
"description": "Comfortable cotton t-shirt",
"amount": 1500,
"currency": "jpy",
"quantity": 2
}
]
}
HISTORY
v0.1
Initial version
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Stripe API documentation:
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.