NAME

Handel::Order::Item - Module representing an indivudal order line item

SYNOPSIS

my $order = Handel::Order->new({
    id => '12345678-9098-7654-322-345678909876'
});

my $iterator = $order->items;
while (my $item = $iterator->next) {
    print $item->sku;
    print $item->price;
    print $item->total;
};

CONSTRUCTOR

new

You can create a new Handel::Order::Item object by calling the new method:

my $item = Handel::Order::Item->new({
    sku => '1234',
    price => 1.23,
    quantity => 1,
    total => 1.23
});

$item->quantity(2);

print $item->total;

This is a lazy operation. No actual item record is created until the item object is passed into the add method of a Handel::Order object.

METHOS

description

Gets/sets the item description

id

Gets/sets the item id

price

Gets/sets the item price

quantity

Gets/sets the item quantity

sku

Gets/sets the item sku

total

Gets/sets the item total

AUTHOR

Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com
http://today.icantfocus.com/blog/