com.konakart.json.app
Class J_OrderTotal

java.lang.Object
  extended by com.konakart.json.app.J_OrderTotal
All Implemented Interfaces:
java.io.Serializable

public class J_OrderTotal
extends java.lang.Object
implements java.io.Serializable

An order may have an array of OrderTotal objects. Each OrderTotal object is created by an OrderTotal module. Modules may be enabled / disabled using the Admin App so that you can decide whether your order shows tax, shipping charges, subtotal, discount etc.

There is an API call getOrderTotals() which is used to populate the order with an array of order totals.

See Also:
Serialized Form

Constructor Summary
J_OrderTotal()
           
 
Method Summary
 java.lang.String getClassName()
          This is the name of the order total module.
 java.lang.String getCustom1()
           
 java.lang.String getCustom2()
           
 java.lang.String getCustom3()
           
 int getId()
           
 int getOrderId()
           
 J_OrderTotal[] getOrderTotals()
          An array of OrderTotals which is populated if the OrderTotal module returns more than one result.
 J_Promotion[] getPromotions()
          An array to contain the promotion objects used to calculate the discount for a discount order total module.
 int getSortOrder()
          The sort order defines the order in which the order total items are added to the order.
 java.math.BigDecimal getTax()
          In some cases an OrderTotal can modify the tax calculated for an order.
 java.lang.String getText()
          This is the actual text for the value of the order total.
 java.lang.String getTitle()
          This is the title for the order total which will appear on a print out of the order.
 java.math.BigDecimal getValue()
          The value is a numeric representation of the text which can be used to add the order totals in order to calculate the final total.
 void setClassName(java.lang.String _className)
          This is the name of the order total module.
 void setCustom1(java.lang.String _custom1)
           
 void setCustom2(java.lang.String _custom2)
           
 void setCustom3(java.lang.String _custom3)
           
 void setId(int _id)
           
 void setOrderId(int _orderId)
           
 void setOrderTotals(J_OrderTotal[] _orderTotals)
          An array of OrderTotals which is populated if the OrderTotal module returns more than one result.
 void setPromotions(J_Promotion[] _promotions)
          An array to contain the promotion objects used to calculate the discount for a discount order total module.
 void setSortOrder(int _sortOrder)
          The sort order defines the order in which the order total items are added to the order.
 void setTax(java.math.BigDecimal _tax)
          In some cases an OrderTotal can modify the tax calculated for an order.
 void setText(java.lang.String _text)
          This is the actual text for the value of the order total.
 void setTitle(java.lang.String _title)
          This is the title for the order total which will appear on a print out of the order.
 void setValue(java.math.BigDecimal _value)
          The value is a numeric representation of the text which can be used to add the order totals in order to calculate the final total.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J_OrderTotal

public J_OrderTotal()
Method Detail

getClassName

public java.lang.String getClassName()
This is the name of the order total module. e.g. ot_shipping, ot_tax, ot_total

Returns:
Returns the className.

setClassName

public void setClassName(java.lang.String _className)
This is the name of the order total module. e.g. ot_shipping, ot_tax, ot_total

Parameters:
_className - The className to set.

getId

public int getId()
Returns:
Returns the id.

setId

public void setId(int _id)
Parameters:
_id - The id to set.

getOrderId

public int getOrderId()
Returns:
Returns the orderId.

setOrderId

public void setOrderId(int _orderId)
Parameters:
_orderId - The orderId to set.

getSortOrder

public int getSortOrder()
The sort order defines the order in which the order total items are added to the order. ot_total should be last since it adds up all of the other order totals to calculate the total of the order.

Returns:
Returns the sortOrder.

setSortOrder

public void setSortOrder(int _sortOrder)
The sort order defines the order in which the order total items are added to the order. ot_total should be last since it adds up all of the other order totals to calculate the total of the order.

Parameters:
_sortOrder - The sortOrder to set.

getText

public java.lang.String getText()
This is the actual text for the value of the order total. e.g. $95.00 or $90.00

Returns:
Returns the text.

setText

public void setText(java.lang.String _text)
This is the actual text for the value of the order total. e.g. $95.00 or $90.00

Parameters:
_text - The text to set.

getTitle

public java.lang.String getTitle()
This is the title for the order total which will appear on a print out of the order. e.g. Sub-Total: or Total:

Returns:
Returns the title.

setTitle

public void setTitle(java.lang.String _title)
This is the title for the order total which will appear on a print out of the order. e.g. Sub-Total: or Total:

Parameters:
_title - The title to set.

getValue

public java.math.BigDecimal getValue()
The value is a numeric representation of the text which can be used to add the order totals in order to calculate the final total.

Returns:
Returns the value.

setValue

public void setValue(java.math.BigDecimal _value)
The value is a numeric representation of the text which can be used to add the order totals in order to calculate the final total.

Parameters:
_value - The value to set.

getTax

public java.math.BigDecimal getTax()
In some cases an OrderTotal can modify the tax calculated for an order. This is the case when a promotion is applied to the total of the order before tax. In this case the amount of tax for the order needs to be reduced since it is calculated on the total of the order minus the discount.

Returns:
the tax

setTax

public void setTax(java.math.BigDecimal _tax)
In some cases an OrderTotal can modify the tax calculated for an order. This is the case when a promotion is applied to the total of the order before tax. In this case the amount of tax for the order needs to be reduced since it is calculated on the total of the order minus the discount.

Parameters:
_tax - the tax to set

getPromotions

public J_Promotion[] getPromotions()
An array to contain the promotion objects used to calculate the discount for a discount order total module.

Returns:
Returns the promotions.

setPromotions

public void setPromotions(J_Promotion[] _promotions)
An array to contain the promotion objects used to calculate the discount for a discount order total module.

Parameters:
_promotions - The promotions to set.

getOrderTotals

public J_OrderTotal[] getOrderTotals()
An array of OrderTotals which is populated if the OrderTotal module returns more than one result.

Returns:
the orderTotals

setOrderTotals

public void setOrderTotals(J_OrderTotal[] _orderTotals)
An array of OrderTotals which is populated if the OrderTotal module returns more than one result.

Parameters:
_orderTotals - the orderTotals to set

getCustom1

public java.lang.String getCustom1()
Returns:
the custom1

setCustom1

public void setCustom1(java.lang.String _custom1)
Parameters:
_custom1 - the custom1 to set

getCustom2

public java.lang.String getCustom2()
Returns:
the custom2

setCustom2

public void setCustom2(java.lang.String _custom2)
Parameters:
_custom2 - the custom2 to set

getCustom3

public java.lang.String getCustom3()
Returns:
the custom3

setCustom3

public void setCustom3(java.lang.String _custom3)
Parameters:
_custom3 - the custom3 to set


Copyright © 2011 DS Data Systems UK Ltd.