NAME

Business::CPI::Role::Item - Role to represent a product in the cart

VERSION

version 0.913

DESCRIPTION

This class holds information about the products in a shopping cart.

ATTRIBUTES

id

MANDATORY - Unique identifier for this product in your application.

description

A longer description of the product, or just the name, if the gateway doesn't differentiate between name and description.

price

MANDATORY - The price (in the chosen currency; see "currency" in Business::CPI::Gateway::Base) of one item. This will be multiplied by the quantity.

quantity

How many of this product is being bought? Defaults to 1.

shipping

The shipping cost (in the chosen currency, same as in the price above) for this particular item.

shipping_additional

The cost of each additional quantity of this item. For example, if the quantity is 5, the "shipping" attribute is set to 1.50, and this attribute is set to 0.50, then the total shipping cost will be 1*1.50 + 4*0.50 = 3.50. Note that not all gateways implement this. In PayPal, for instance, it's called shipping2.

weight

The weight of this item. If you define the "shipping", this will probably be ignored by the gateway.

AUTHOR

André Walker <andre@andrewalker.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by André Walker.

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