net.authorize.data
Class Order

java.lang.Object
  extended by net.authorize.data.Order
All Implemented Interfaces:
Serializable

public class Order
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  String description
           
protected  String invoiceNumber
           
static int MAX_DESCRIPTION_LENGTH
           
static int MAX_INVOICE_NUMBER_LENGTH
           
static int MAX_ORDER_ITEM_SIZE
           
protected  List<OrderItem> orderItems
           
protected  String purchaseOrderNumber
           
protected  ShippingCharges shippingCharges
           
protected  BigDecimal totalAmount
           
 
Constructor Summary
protected Order()
           
 
Method Summary
 void addOrderItem(OrderItem orderItem)
          Adds an OrderItem to the list of OrderItems - provided the list of items isn't already at the max of 30.
static Order createOrder()
           
 String getDescription()
           
 String getInvoiceNumber()
           
 List<OrderItem> getOrderItems()
           
 String getPurchaseOrderNumber()
           
 ShippingCharges getShippingCharges()
          Get the shipping charges associated with this order.
 BigDecimal getTotalAmount()
          Return the total amount of the order.
 void setDescription(String description)
           
 void setInvoiceNumber(String invoiceNumber)
           
 void setOrderItems(List<OrderItem> orderItems)
          Sets the list of OrderItems to the list being passed in.
 void setPurchaseOrderNumber(String purchaseOrderNumber)
           
 void setShippingCharges(ShippingCharges shippingCharges)
          Set the shipping charges assocaited with this order.
 void setTotalAmount(BigDecimal totalAmount)
          Set the total amount of the order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_INVOICE_NUMBER_LENGTH

public static final int MAX_INVOICE_NUMBER_LENGTH
See Also:
Constant Field Values

MAX_DESCRIPTION_LENGTH

public static final int MAX_DESCRIPTION_LENGTH
See Also:
Constant Field Values

MAX_ORDER_ITEM_SIZE

public static final int MAX_ORDER_ITEM_SIZE
See Also:
Constant Field Values

invoiceNumber

protected String invoiceNumber

purchaseOrderNumber

protected String purchaseOrderNumber

description

protected String description

totalAmount

protected BigDecimal totalAmount

shippingCharges

protected ShippingCharges shippingCharges

orderItems

protected List<OrderItem> orderItems
Constructor Detail

Order

protected Order()
Method Detail

createOrder

public static Order createOrder()

getInvoiceNumber

public String getInvoiceNumber()
Returns:
the invoiceNumber

setInvoiceNumber

public void setInvoiceNumber(String invoiceNumber)
Parameters:
invoiceNumber - the invoiceNumber to set

getDescription

public String getDescription()
Returns:
the description

setDescription

public void setDescription(String description)
Parameters:
description - the description to set

getTotalAmount

public BigDecimal getTotalAmount()
Return the total amount of the order.

Returns:
the totalAmount

setTotalAmount

public void setTotalAmount(BigDecimal totalAmount)
Set the total amount of the order.

Parameters:
totalAmount - the totalAmount to set

getOrderItems

public List<OrderItem> getOrderItems()
Returns:
the orderItems

setOrderItems

public void setOrderItems(List<OrderItem> orderItems)
Sets the list of OrderItems to the list being passed in. The list will be truncated to 30 items, which is the max number of OrderItems allowed.

Parameters:
orderItems - the orderItems to set

addOrderItem

public void addOrderItem(OrderItem orderItem)
Adds an OrderItem to the list of OrderItems - provided the list of items isn't already at the max of 30.

Parameters:
orderItem -

getShippingCharges

public ShippingCharges getShippingCharges()
Get the shipping charges associated with this order.

Returns:
the shippingCharges

setShippingCharges

public void setShippingCharges(ShippingCharges shippingCharges)
Set the shipping charges assocaited with this order.

Parameters:
shippingCharges - the shippingCharges to set

getPurchaseOrderNumber

public String getPurchaseOrderNumber()
Returns:
the purchaseOrderNumber

setPurchaseOrderNumber

public void setPurchaseOrderNumber(String purchaseOrderNumber)
Parameters:
purchaseOrderNumber - the purchaseOrderNumber to set


Copyright © 2014. All Rights Reserved.