ZenMagick 0.9.6


org.zenmagick.model.order.ZMOrder

Class ZMOrder

ZMObject
|
+--ZMOrder

public class ZMOrder
extends ZMObject

A single order.

Author:
DerManoMann
Version:
$Id: ZMOrder.php 2149 2009-04-13 22:59:14Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMOrder()

Create order.

Method Summary
ZMAccount

getAccount()

Get the account for this order.

int

getAccountId()

Get the account id.

ZMAddress

getBillingAddress()

Get the billing address.

int

getId()

Get the order id.

string

getOrderDate()

Get the order date.

array

getOrderItems()

Get the order items.

array

getOrderStatusHistory()

Get the order status history.

int

getOrderStatusId()

Get the order status [id].

ZMOrderTotal

getOrderTotal(string name, boolean force)

Get order total for the given name.

array

getOrderTotals()

Get all order totals.

ZMPaymentType

getPaymentType()

Get the payment type.

ZMAddress

getShippingAddress()

Get the shipping address.

string

getStatusName()

Get the order status name [read only]

float

getTotal()

Get the order total.

boolean

hasShippingAddress()

Checks if the order has a shipping address.

boolean

isStorePickup()

Check if the order it pickup.

private void

loadAddress(mixed address, mixed prefix)

Load address details.

private void

mkAddress(mixed prefix)

Create address instance.

void

setAccount(ZMAccount account)

Set the account for this order.

void

setAccountId(int accountId)

Set the account id.

void

setBillingAddress(ZMAddress address)

Set the billing address.

void

setId(int id)

Set the order id.

void

setOrderDate(string date)

Set the order date.

void

setOrderStatusId(int statusId)

Set the order status [id].

void

setShippingAddress(ZMAddress address)

Set the shipping address.

void

setTotal(float total)

Set the order total.

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

Constructor Detail

ZMOrder

public ZMOrder()

Create order. /


Method Detail

getAccount

public ZMAccount getAccount()

Get the account for this order.

NOTE: This contains the account information as of the time the order was placed. This might be different from the current account data.

Returns:
The account.

getAccountId

public int getAccountId()

Get the account id.

Returns:
The account id.

getBillingAddress

public ZMAddress getBillingAddress()

Get the billing address.

Returns:
The billing address or null.

getId

public int getId()

Get the order id.

Returns:
The order id.

getOrderDate

public string getOrderDate()

Get the order date.

Returns:
The order date.

getOrderItems

public array getOrderItems()

Get the order items.

Returns:
A list of ZMOrderItem instances.

getOrderStatusHistory

public array getOrderStatusHistory()

Get the order status history.

Returns:
A list of previous order stati.

getOrderStatusId

public int getOrderStatusId()

Get the order status [id].

Returns:
The order status [id].

getOrderTotal

public ZMOrderTotal getOrderTotal(string name, boolean force)

Get order total for the given name.

Parameters:
name - The total name (without the ot_ prefix).
force - If set, a new order total will be created in case the order * does not contain the one requested.
Returns:
A ZMOrderTotal or null.

getOrderTotals

public array getOrderTotals()

Get all order totals.

Returns:
A list of ZMOrderTotal instances.

getPaymentType

public ZMPaymentType getPaymentType()

Get the payment type.

Returns:
A payment type or null if N/A.

getShippingAddress

public ZMAddress getShippingAddress()

Get the shipping address.

Returns:
The shipping address or null.

getStatusName

public string getStatusName()

Get the order status name [read only]

Returns:
The order status name.

getTotal

public float getTotal()

Get the order total.

Returns:
The order total.

hasShippingAddress

public boolean hasShippingAddress()

Checks if the order has a shipping address.

Returns:
true if a shipping address exists, false if not.

isStorePickup

public boolean isStorePickup()

Check if the order it pickup.

Returns:
true if the order is store pickup, false if not.

loadAddress

private void loadAddress(mixed address, mixed prefix)

Load address details. /


mkAddress

private void mkAddress(mixed prefix)

Create address instance. /


setAccount

public void setAccount(ZMAccount account)

Set the account for this order.

NOTE: This contains the account information as of the time the order was placed. This might be different from the current account data.

Parameters:
account - The account.

setAccountId

public void setAccountId(int accountId)

Set the account id.

Parameters:
accountId - The account id.

setBillingAddress

public void setBillingAddress(ZMAddress address)

Set the billing address.

Parameters:
address - The billing address.

setId

public void setId(int id)

Set the order id.

Parameters:
id - The order id.

setOrderDate

public void setOrderDate(string date)

Set the order date.

Parameters:
date - The order date.

setOrderStatusId

public void setOrderStatusId(int statusId)

Set the order status [id].

Parameters:
statusId - The order status [id].

setShippingAddress

public void setShippingAddress(ZMAddress address)

Set the shipping address.

Parameters:
address - The shipping address.

setTotal

public void setTotal(float total)

Set the order total.

Parameters:
total - The order total.

ZenMagick 0.9.6