Net::API::Stripe::Order::SKU - A Stripe SKU Object
my $sku = $stripe->sku({ active => $stripe->true, attributes => { size => 'Medium', gender => 'Unisex', }, currency => 'jpy', image => 'https://example.com/path/product.jpg', inventory => $inventory_object, metadata => { transaction_id => 123 }, package_dimensions => { # In inches height => 6, length => 20, # Ounce weight => 21 width => 12 }, price => 2000, product => $product_object, });
See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.
v0.100.0
Stores representations of stock keeping units (http://en.wikipedia.org/wiki/Stock_keeping_unit). SKUs describe specific product variations, taking into account any combination of: attributes, currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents the size: large, color: red version of that shirt.
Can also be used to manage inventory.
Creates a new Net::API::Stripe::Order::SKU object. It may also take an hash like arguments, that also are method of the same name.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
Whether the SKU is available for purchase.
A dictionary of attributes and values for the attributes defined by the product. If, for example, a product’s attributes are ["size", "gender"], a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}.
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
The URL of an image for this SKU, meant to be displayable to the customer.
This is a URI object.
Description of the SKU’s inventory.
This is a Net::API::Stripe::Order::SKU::Inventory object.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
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.
The dimensions of this SKU for shipping purposes.
This is a Net::API::Stripe::Order::SKU::PackageDimensions object.
The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
The ID of the product this SKU is associated with. The product must be currently active.
When expanded, this is a Net::API::Stripe::Product object.
Time at which the object was last updated. Measured in seconds since the Unix epoch.
{ "id": "sku_fake123456789", "object": "sku", "active": true, "attributes": { "size": "Medium", "gender": "Unisex" }, "created": 1571480453, "currency": "jpy", "image": null, "inventory": { "quantity": 50, "type": "finite", "value": null }, "livemode": false, "metadata": {}, "package_dimensions": null, "price": 1500, "product": "prod_fake123456789", "updated": 1571480453 }
Initial version
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/skus, https://stripe.com/docs/orders
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.