| 
    Wt
    4.0.0
    
   | 
 
Describes an item in an order. More...
#include <Wt/Payment/OrderItem.h>
Public Member Functions | |
| void | setName (const WString &name) | 
| Sets the item name.  | |
| const WString & | name () const | 
| Returns item name.  More... | |
| void | setNumber (const std::string &number) | 
| Sets the item number.  | |
| std::string | number () const | 
| Returns item number.  More... | |
| void | setDescription (const WString &description) | 
| Sets the item description.  | |
| const WString & | description () const | 
| Returns the item description.  More... | |
| void | setQuantity (double quantity) | 
| Sets the item quantity.  More... | |
| double | quantity () const | 
| Returns the item quantity.  More... | |
| void | setUnitCost (const Money &unitCost) | 
| Changes the item unit cost field.  More... | |
| Money | unitCost () const | 
| Returns item unit cost.  More... | |
| Money | computeTotal () const | 
| Returns the total cost for this order item.  More... | |
Describes an item in an order.
Usage example:
| Money Wt::Payment::OrderItem::computeTotal | ( | ) | const | 
Returns the total cost for this order item.
This returns quantity() * unitCost()
| const WString& Wt::Payment::OrderItem::description | ( | ) | const | 
Returns the item description.
| std::string Wt::Payment::OrderItem::number | ( | ) | const | 
Returns item number.
| double Wt::Payment::OrderItem::quantity | ( | ) | const | 
Returns the item quantity.
| void Wt::Payment::OrderItem::setQuantity | ( | double | quantity | ) | 
Sets the item quantity.
This is either an integer quantity (number of items) or a fractional quantity (e.g. 1.5 times 1 kilogram).
The total price for this item in the order will be the quantity() times the unitCost().
| void Wt::Payment::OrderItem::setUnitCost | ( | const Money & | unitCost | ) | 
Changes the item unit cost field.
This is the unit cost.
| Money Wt::Payment::OrderItem::unitCost | ( | ) | const | 
Returns item unit cost.
 1.8.11