ZenMagick 0.9.6


org.zenmagick.model.order.ZMOrderItem

Class ZMOrderItem

ZMObject
|
+--ZMOrderItem

public class ZMOrderItem
extends ZMObject

A single order item

Author:
DerManoMann
Version:
$Id: ZMOrderItem.php 2121 2009-03-31 01:56:56Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMOrderItem()

Create new instance.

Method Summary
void

addAttribute(ZMAttribute attribute)

Add an item attribute.

array

getAttributes()

Get the item attributes.

float

getCalculatedPrice()

Get the calculated price.

int

getId()

Get the order item id.

string

getModel()

Get the model.

string

getName()

Get the item name.

ZMProduct

getProduct()

Get the product this item is associated to.

int

getProductId()

Get the order item product id.

int

getQty()

Get the quantity.

float

getTaxRate()

Get the tax rate.

boolean

hasAttributes()

Checks if the item has associated attributes.

void

setAttributes(array attributes)

Set item attributes.

void

setCalculatedPrice(float price)

Set the calculated price.

void

setId(int id)

Set the order item id.

void

setModel(string model)

Set the model.

void

setName(string name)

Set the item name.

void

setProductId(int productId)

Set the order item product id.

void

setQty(int qty)

Set the quantity.

void

setTaxRate(float taxRate)

Set the tax rate.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMOrderItem

public ZMOrderItem()

Create new instance. /


Method Detail

addAttribute

public void addAttribute(ZMAttribute attribute)

Add an item attribute.

Parameters:
attribute - A ZMAttribute.

getAttributes

public array getAttributes()

Get the item attributes.

Returns:
A list of ZMAttribute instances.

getCalculatedPrice

public float getCalculatedPrice()

Get the calculated price.

Returns:
The calculated price.

getId

public int getId()

Get the order item id.

Returns:
The order item id.

getModel

public string getModel()

Get the model.

Returns:
The item model.

getName

public string getName()

Get the item name.

Returns:
The item name.

getProduct

public ZMProduct getProduct()

Get the product this item is associated to.

Returns:
The product.

getProductId

public int getProductId()

Get the order item product id.

Returns:
The order item product id.

getQty

public int getQty()

Get the quantity.

Returns:
The quantity for this item.

getTaxRate

public float getTaxRate()

Get the tax rate.

Returns:
The tax rate.

hasAttributes

public boolean hasAttributes()

Checks if the item has associated attributes.

Returns:
true if attributes exist, false if not.

setAttributes

public void setAttributes(array attributes)

Set item attributes.

Parameters:
attributes - A list of ZMAttribute instances.

setCalculatedPrice

public void setCalculatedPrice(float price)

Set the calculated price.

Parameters:
price - The calculated price.

setId

public void setId(int id)

Set the order item id.

Parameters:
id - The order item id.

setModel

public void setModel(string model)

Set the model.

Parameters:
model - The item model.

setName

public void setName(string name)

Set the item name.

Parameters:
name - The item name.

setProductId

public void setProductId(int productId)

Set the order item product id.

Parameters:
productId - The order item product id.

setQty

public void setQty(int qty)

Set the quantity.

Parameters:
qty - The quantity for this item.

setTaxRate

public void setTaxRate(float taxRate)

Set the tax rate.

Parameters:
taxRate - The tax rate.

ZenMagick 0.9.6