public method IO2GLastOrderUpdateResponseReader.getOrder
Brief
Gets an instance of the class that provides access to order information.
| Declaration | ||||
|
||||
Details
The returned value of the method provides access to the current order state through the use of the IO2GOrderRow.getStatus method.
For example,
String status = orderRow.getStatus();
Example
Getting the current order status [hide]
// Implementation of IO2GResponseListener interface public method onRequestCompleted
void onRequestCompleted(const char * requestID, IO2GResponse *response)
{
O2G2Ptr<IO2GResponseReaderFactory> readerFactory = mSession->getResponseReaderFactory();
if (readerFactory != NULL)
{
if (response->getType() == GetLastOrderUpdate)
{
O2G2Ptr<IO2GLastOrderUpdateResponseReader> lastOrderUpdateResponseReader = readerFactory->createLastOrderUpdateResponseReader(response);
O2G2Ptr<IO2GOrderRow> orderRow = lastOrderUpdateResponseReader->getOrder();
std::cout << "OrderID: " << orderRow->getOrderID() <<
" Status: " << orderRow->getStatus() << std::endl;
}
}
}
Declared in IO2GLastOrderUpdateResponseReader