Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AbstractApiV2Controller
  • AbstractCategoryServiceFactory
  • AbstractCollection
  • AbstractCustomerFactory
  • AbstractCustomerServiceFactory
  • AbstractFileStorage
  • AbstractHttpContextFactory
  • AbstractHttpViewControllerRegistryFactory
  • AbstractImagesApiV2Controller
  • AbstractOrderServiceFactory
  • AbstractProductAttributeServiceFactory
  • AbstractProductServiceFactory
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory
  • AddressBlock
  • AddressBookService
  • AddressClass
  • AddressesApiV2Controller
  • AddressFormatProvider
  • AdminHttpViewController
  • AdminPageHttpControllerResponse
  • Asset
  • AssetCollection
  • AttachmentCollection
  • AttachmentName
  • AttachmentPath
  • AttachmentsApiV2Controller
  • AttachmentsHandler
  • BoolType
  • CategoriesApiV2Controller
  • Category
  • CategoryAddonValueStorage
  • CategoryFactory
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CategoryListItem
  • CategoryListItemCollection
  • CategoryListProvider
  • CategoryListProviderFactory
  • CategoryObjectService
  • CategoryReadService
  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategoryServiceFactory
  • CategorySettings
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter
  • CategoryWriteService
  • ContactCollection
  • ContactName
  • ContactType
  • CountriesApiV2Controller
  • CountryService
  • CrossCuttingLoader
  • CurrencyCode
  • Customer
  • CustomerAccountInputValidator
  • CustomerAddress
  • CustomerAddressDeleter
  • CustomerAddressInputValidator
  • CustomerAddressReader
  • CustomerAddressRepository
  • CustomerAddressWriter
  • CustomerB2BStatus
  • CustomerCallNumber
  • CustomerCity
  • CustomerCompany
  • CustomerCountry
  • CustomerCountryIso2
  • CustomerCountryIso3
  • CustomerCountryName
  • CustomerCountryReader
  • CustomerCountryRepository
  • CustomerCountryZone
  • CustomerCountryZoneIsoCode
  • CustomerCountryZoneName
  • CustomerCountryZoneReader
  • CustomerCountryZoneRepository
  • CustomerDateOfBirth
  • CustomerDeleter
  • CustomerEmail
  • CustomerFactory
  • CustomerFirstname
  • CustomerGender
  • CustomerInputValidator
  • CustomerInputValidatorSettings
  • CustomerLastname
  • CustomerNumber
  • CustomerPassword
  • CustomerPostcode
  • CustomerReader
  • CustomerReadService
  • CustomerRegistrationInputValidatorService
  • CustomerRepository
  • CustomersApiV2Controller
  • CustomerService
  • CustomerServiceFactory
  • CustomerServiceSettings
  • CustomerStatusInformation
  • CustomerStatusProvider
  • CustomerStreet
  • CustomerSuburb
  • CustomerVatNumber
  • CustomerWriter
  • CustomerWriteService
  • DecimalType
  • DefaultApiV2Controller
  • EditableCollection
  • EditableKeyValueCollection
  • Email
  • EmailAddress
  • EmailAttachment
  • EmailCollection
  • EmailContact
  • EmailContent
  • EmailDeleter
  • EmailFactory
  • EmailReader
  • EmailRepository
  • EmailsApiV2Controller
  • EmailService
  • EmailStringType
  • EmailSubject
  • EmailWriter
  • EmptyCurrencyCode
  • EmptyDateTime
  • EmptyLanguageCode
  • EmptyOrderItemDownloadInformation
  • EmptyProductImage
  • EnvCategoryServiceSettings
  • EnvironmentHttpContextFactory
  • EnvironmentHttpViewControllerRegistryFactory
  • EnvProductImageFileStorageSettings
  • ExistingDirectory
  • ExistingFile
  • FilenameStringType
  • GXCoreLoader
  • GXCoreLoaderSettings
  • GXEngineOrder
  • GXEngineProduct
  • HttpApiV2Controller
  • HttpContext
  • HttpContextReader
  • HttpControllerResponse
  • HttpDispatcher
  • HttpResponseProcessor
  • HttpService
  • HttpServiceFactory
  • HttpViewController
  • HttpViewControllerFactory
  • HttpViewControllerRegistry
  • IdCollection
  • IdType
  • ImageFileStorage
  • IntType
  • JsonHttpControllerResponse
  • KeyValueCollection
  • LanguageCode
  • LegacyProductImageProcessing
  • MailerAdapter
  • NonEmptyStringType
  • OrderAddonValueStorage
  • OrderFactory
  • OrderItem
  • OrderItemAddonValueStorage
  • OrderItemAttribute
  • OrderItemAttributeCollection
  • OrderItemAttributeFactory
  • OrderItemAttributeRepository
  • OrderItemAttributeRepositoryDeleter
  • OrderItemAttributeRepositoryFactory
  • OrderItemAttributeRepositoryReader
  • OrderItemAttributeRepositoryWriter
  • OrderItemCollection
  • OrderItemDownloadInformation
  • OrderItemFactory
  • OrderItemProperty
  • OrderItemPropertyFactory
  • OrderItemPropertyRepository
  • OrderItemPropertyRepositoryDeleter
  • OrderItemPropertyRepositoryReader
  • OrderItemPropertyRepositoryWriter
  • OrderItemRepository
  • OrderItemRepositoryDeleter
  • OrderItemRepositoryReader
  • OrderItemRepositoryWriter
  • OrderListGenerator
  • OrderListItem
  • OrderListItemCollection
  • OrderObjectService
  • OrderPaymentType
  • OrderReadService
  • OrderRepository
  • OrderRepositoryDeleter
  • OrderRepositoryReader
  • OrderRepositoryWriter
  • OrdersApiV2Controller
  • OrderServiceFactory
  • OrderServiceSettings
  • OrderShippingType
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrderStatusHistoryListItem
  • OrderStatusHistoryListItemCollection
  • OrderStatusHistoryStorage
  • OrdersTotalsApiV2Controller
  • OrderTotal
  • OrderTotalCollection
  • OrderTotalFactory
  • OrderTotalRepository
  • OrderTotalRepositoryDeleter
  • OrderTotalRepositoryReader
  • OrderTotalRepositoryWriter
  • OrderWriteService
  • ProductAddonValueStorage
  • ProductAttribute
  • ProductAttributeCollection
  • ProductAttributeFactory
  • ProductAttributeObjectService
  • ProductAttributeRepository
  • ProductAttributeRepositoryDeleter
  • ProductAttributeRepositoryReader
  • ProductAttributeRepositoryWriter
  • ProductAttributeService
  • ProductAttributeServiceFactory
  • ProductCategoryLinker
  • ProductFactory
  • ProductImage
  • ProductImageCollection
  • ProductImageContainer
  • ProductImageContainerRepository
  • ProductImageFileStorage
  • ProductImagesApiV2Controller
  • ProductListItem
  • ProductListItemCollection
  • ProductListProvider
  • ProductListProviderFactory
  • ProductObjectService
  • ProductPermissionSetter
  • ProductReadService
  • ProductRepository
  • ProductRepositoryDeleter
  • ProductRepositoryReader
  • ProductRepositoryWriter
  • ProductsApiV2Controller
  • ProductServiceFactory
  • ProductSettings
  • ProductSettingsRepository
  • ProductSettingsRepositoryReader
  • ProductSettingsRepositoryWriter
  • ProductsLinksApiV2Controller
  • ProductWriteService
  • RedirectHttpControllerResponse
  • StaticCrossCuttingLoader
  • StaticGXCoreLoader
  • StatisticsService
  • StoredCategory
  • StoredOrderItem
  • StoredOrderItemAttribute
  • StoredOrderItemAttributeCollection
  • StoredOrderItemCollection
  • StoredOrderItemProperty
  • StoredOrderTotal
  • StoredOrderTotalCollection
  • StoredProduct
  • StoredProductAttribute
  • StoredProductAttributeCollection
  • StringCollection
  • StringType
  • UserConfigurationReader
  • UserConfigurationService
  • UserConfigurationWriter
  • VatNumberValidator
  • WritableDirectory
  • WritableFile
  • YetAnotherLanguageProvider
  • ZonesApiV2Controller

Interfaces

  • AddonValueContainerInterface
  • AddonValueServiceInterface
  • AddonValueStorageFactoryInterface
  • AddressBlockInterface
  • AddressBookServiceInterface
  • AddressClassInterface
  • AddressFormatProviderInterface
  • AssetCollectionInterface
  • AssetInterface
  • AttachmentCollectionInterface
  • AttachmentNameInterface
  • AttachmentPathInterface
  • AttachmentsHandlerInterface
  • CategoryFactoryInterface
  • CategoryInterface
  • CategoryListProviderFactoryInterface
  • CategoryListProviderInterface
  • CategoryObjectServiceInterface
  • CategoryReadServiceInterface
  • CategoryRepositoryDeleterInterface
  • CategoryRepositoryInterface
  • CategoryRepositoryReaderInterface
  • CategoryRepositoryWriterInterface
  • CategoryServiceSettingsInterface
  • CategorySettingsInterface
  • CategorySettingsRepositoryInterface
  • CategorySettingsRepositoryReaderInterface
  • CategorySettingsRepositoryWriterInterface
  • CategoryWriteServiceInterface
  • ContactCollectionInterface
  • ContactNameInterface
  • ContactTypeInterface
  • ContentViewInterface
  • CountryServiceInterface
  • CrossCuttingLoaderInterface
  • CrossCuttingObjectInterface
  • CustomerAccountInputValidatorInterface
  • CustomerAddressDeleterInterface
  • CustomerAddressInputValidatorInterface
  • CustomerAddressInterface
  • CustomerAddressReaderInterface
  • CustomerAddressRepositoryInterface
  • CustomerAddressWriterInterface
  • CustomerB2BStatusInterface
  • CustomerCallNumberInterface
  • CustomerCityInterface
  • CustomerCompanyInterface
  • CustomerCountryInterface
  • CustomerCountryIso2Interface
  • CustomerCountryIso3Interface
  • CustomerCountryNameInterface
  • CustomerCountryReaderInterface
  • CustomerCountryRepositoryInterface
  • CustomerCountryZoneInterface
  • CustomerCountryZoneIsoCodeInterface
  • CustomerCountryZoneNameInterface
  • CustomerCountryZoneReaderInterface
  • CustomerCountryZoneRepositoryInterface
  • CustomerDeleterInterface
  • CustomerEmailInterface
  • CustomerFirstnameInterface
  • CustomerGenderInterface
  • CustomerInputValidatorInterface
  • CustomerInputValidatorSettingsInterface
  • CustomerInterface
  • CustomerLastnameInterface
  • CustomerNumberInterface
  • CustomerPasswordInterface
  • CustomerPostcodeInterface
  • CustomerReaderInterface
  • CustomerReadServiceInterface
  • CustomerRegistrationInputValidatorServiceInterface
  • CustomerRepositoryInterface
  • CustomerServiceInterface
  • CustomerServiceSettingsInterface
  • CustomerStatusProviderInterface
  • CustomerStreetInterface
  • CustomerSuburbInterface
  • CustomerVatNumberInterface
  • CustomerWriterInterface
  • CustomerWriteServiceInterface
  • EmailAddressInterface
  • EmailAttachmentInterface
  • EmailCollectionInterface
  • EmailContactInterface
  • EmailContentInterface
  • EmailDeleterInterface
  • EmailFactoryInterface
  • EmailInterface
  • EmailReaderInterface
  • EmailRepositoryInterface
  • EmailServiceInterface
  • EmailSubjectInterface
  • EmailWriterInterface
  • GXCoreLoaderInterface
  • GXCoreLoaderSettingsInterface
  • HttpContextInterface
  • HttpContextReaderInterface
  • HttpControllerResponseInterface
  • HttpDispatcherInterface
  • HttpResponseProcessorInterface
  • HttpServiceFactoryInterface
  • HttpServiceInterface
  • HttpViewControllerFactoryInterface
  • HttpViewControllerInterface
  • HttpViewControllerRegistryInterface
  • IdInterface
  • LanguageProviderInterface
  • MailerAdapterInterface
  • OrderFactoryInterface
  • OrderInterface
  • OrderItemAttributeFactoryInterface
  • OrderItemAttributeInterface
  • OrderItemAttributeRepositoryDeleterInterface
  • OrderItemAttributeRepositoryFactoryInterface
  • OrderItemAttributeRepositoryInterface
  • OrderItemAttributeRepositoryReaderInterface
  • OrderItemAttributeRepositoryWriterInterface
  • OrderItemFactoryInterface
  • OrderItemInterface
  • OrderItemPropertyFactoryInterface
  • OrderItemPropertyRepositoryDeleterInterface
  • OrderItemPropertyRepositoryReaderInterface
  • OrderItemPropertyRepositoryWriterInterface
  • OrderItemRepositoryDeleterInterface
  • OrderItemRepositoryInterface
  • OrderItemRepositoryReaderInterface
  • OrderItemRepositoryWriterInterface
  • OrderListGeneratorInterface
  • OrderObjectServiceInterface
  • OrderPaymentTypeInterface
  • OrderReadServiceInterface
  • OrderRepositoryDeleterInterface
  • OrderRepositoryInterface
  • OrderRepositoryReaderInterface
  • OrderRepositoryWriterInterface
  • OrderServiceSettingsInterface
  • OrderShippingTypeInterface
  • OrderStatusHistoryReaderInterface
  • OrderStatusHistoryWriterInterface
  • OrderTotalFactoryInterface
  • OrderTotalInterface
  • OrderTotalRepositoryDeleterInterface
  • OrderTotalRepositoryInterface
  • OrderTotalRepositoryReaderInterface
  • OrderTotalRepositoryWriterInterface
  • OrderWriteServiceInterface
  • ProductAttributeFactoryInterface
  • ProductAttributeInterface
  • ProductAttributeObjectServiceInterface
  • ProductAttributeRepositoryDeleterInterface
  • ProductAttributeRepositoryInterface
  • ProductAttributeRepositoryReaderInterface
  • ProductAttributeRepositoryWriterInterface
  • ProductAttributeServiceInterface
  • ProductCategoryLinkerInterface
  • ProductFactoryInterface
  • ProductImageContainerInterface
  • ProductImageContainerRepositoryInterface
  • ProductImageInterface
  • ProductImagePathsSettingsInterface
  • ProductImageProcessingInterface
  • ProductInterface
  • ProductListProviderFactoryInterface
  • ProductListProviderInterface
  • ProductObjectServiceInterface
  • ProductPermissionSetterInterface
  • ProductReadServiceInterface
  • ProductRepositoryDeleterInterface
  • ProductRepositoryInterface
  • ProductRepositoryReaderInterface
  • ProductRepositoryWriterInterface
  • ProductSettingsInterface
  • ProductSettingsRepositoryInterface
  • ProductSettingsRepositoryReaderInterface
  • ProductSettingsRepositoryWriterInterface
  • ProductWriteServiceInterface
  • StatisticsServiceInterface
  • StoredCategoryInterface
  • StoredOrderItemAttributeInterface
  • StoredOrderItemInterface
  • StoredOrderTotalInterface
  • StoredProductAttributeInterface
  • StoredProductInterface
  • UserConfigurationReaderInterface
  • UserConfigurationServiceInterface
  • UserConfigurationWriterInterface
  • VatNumberValidatorInterface

Exceptions

  • AjaxException
  • AttachmentNotFoundException
  • FileNotFoundException
  • HttpApiV2Exception
  • MissingControllerNameException
  • UnknownEnvironmentException
  1 <?php
  2 
  3 /* --------------------------------------------------------------
  4    OrderListGenerator.inc.php 2015-11-06 gm
  5    Gambio GmbH
  6    http://www.gambio.de
  7    Copyright (c) 2015 Gambio GmbH
  8    Released under the GNU General Public License (Version 2)
  9    [http://www.gnu.org/licenses/gpl-2.0.html]
 10    --------------------------------------------------------------
 11 */
 12 
 13 MainFactory::load_class('OrderListGeneratorInterface');
 14 
 15 /**
 16  * Class OrderListGenerator
 17  *
 18  * @category System
 19  * @package  Order
 20  */
 21 class OrderListGenerator implements OrderListGeneratorInterface
 22 {
 23     /**
 24      * @var CI_DB_query_builder
 25      */
 26     protected $db;
 27     
 28     
 29     /**
 30      * OrderListGenerator Constructor
 31      *
 32      * @param \CI_DB_query_builder $db
 33      */
 34     public function __construct(CI_DB_query_builder $db)
 35     {
 36         $this->db = $db;
 37     }
 38     
 39     
 40     /**
 41      * Get Order List Items
 42      *
 43      * Returns an order list item collection.
 44      *
 45      * @param array       $conditions Associative array which holds the CI_DB_query_builder conditions (default empty
 46      *                                array).
 47      * @param \IntType    $startIndex The start index of the wanted array to be returned (default = null).
 48      * @param \IntType    $maxCount   Maximum amount of items which should be returned (default = null).
 49      * @param \StringType $orderBy    A string which defines how the items should be ordered (default = null).
 50      *
 51      * @return \OrderListItemCollection
 52      */
 53     public function getOrderListByConditions(array $conditions = array(),
 54                                              IntType $startIndex = null,
 55                                              IntType $maxCount = null,
 56                                              StringType $orderBy = null)
 57     {
 58         $this->_select()->_limit($startIndex, $maxCount)->_order($orderBy)->_group();
 59         
 60         if(count($conditions) > 0)
 61         {
 62             $this->db->where($conditions);
 63         }
 64         
 65         $result = $this->db->get()->result_array();
 66         
 67         return $this->_prepareCollection($result);
 68     }
 69     
 70     
 71     /**
 72      * Filter records by a single keyword string.
 73      *
 74      * @param \StringType      $keyword    Keyword string to be used for searching in order records.
 75      * @param \IntType|null    $startIndex The start index of the wanted array to be returned (default = null).
 76      * @param \IntType|null    $maxCount   Maximum amount of items which should be returned (default = null).
 77      * @param \StringType|null $orderBy    A string which defines how the items should be ordered (default = null).
 78      *
 79      * @return mixed
 80      */
 81     public function getOrderListByKeyword(StringType $keyword,
 82                                           IntType $startIndex = null,
 83                                           IntType $maxCount = null,
 84                                           StringType $orderBy = null)
 85     {
 86         $this->_select()->_limit($startIndex, $maxCount)->_order($orderBy)->_group();
 87         
 88         $match = $keyword->asString();
 89         
 90         $this->db->where('orders_total.class', 'ot_total')
 91                  ->like('orders.orders_id', $match)
 92                  ->or_like('orders.customers_id', $match)
 93                  ->or_like('orders.date_purchased', $match)
 94                  ->or_like('orders.payment_class', $match)
 95                  ->or_like('orders.payment_method', $match)
 96                  ->or_like('orders.shipping_class', $match)
 97                  ->or_like('orders.shipping_method', $match)
 98                  ->or_like('orders.customers_firstname', $match)
 99                  ->or_like('orders.customers_lastname', $match)
100                  ->or_like('orders_total.value', $match)
101                  ->or_like('orders_status.orders_status_id', $match)
102                  ->or_like('orders_status.orders_status_name', $match);
103         
104         $result = $this->db->get()->result_array();
105         
106         return $this->_prepareCollection($result);
107     }
108     
109     
110     /**
111      * Execute the select and join methods.
112      *
113      * @return OrderListGenerator Returns the instance object for method chaining.
114      */
115     protected function _select()
116     {
117         $this->db->select('orders.orders_id, orders.customers_id, orders.date_purchased, orders.payment_class,
118             orders.payment_method, orders.shipping_class, orders.shipping_method, orders.customers_firstname, 
119             orders.customers_lastname, orders_status.orders_status_id, orders_status.orders_status_name, 
120             orders_total.value AS total_sum')
121                  ->from('orders')
122                  ->join('orders_status', 'orders_status.orders_status_id = orders.orders_status', 'inner')
123                  ->join('orders_total', 'orders_total.orders_id = orders.orders_id', 'left');
124         
125         return $this;
126     }
127     
128     
129     /**
130      * Add limit configuration to the database object.
131      *
132      * @param \IntType $startIndex
133      * @param \IntType $maxCount
134      *
135      * @return OrderListGenerator Returns the instance object for method chaining.
136      */
137     protected function _limit(IntType $startIndex = null, IntType $maxCount = null)
138     {
139         if($maxCount && $startIndex)
140         {
141             $this->db->limit($maxCount->asInt(), $startIndex->asInt());
142         }
143         else
144         {
145             if($maxCount && !$startIndex)
146             {
147                 $this->db->limit($maxCount->asInt());
148             }
149         }
150         
151         return $this;
152     }
153     
154     
155     /**
156      * Set the order by clause of the query.
157      *
158      * @param \StringType $orderBy
159      *
160      * @return OrderListGenerator Returns the instance object for method chaining.
161      */
162     protected function _order(StringType $orderBy = null)
163     {
164         if($orderBy)
165         {
166             $this->db->order_by($orderBy->asString());
167         }
168         
169         return $this;
170     }
171     
172     
173     /**
174      * Execute the group by statement.
175      *
176      * @return OrderListGenerator Returns the instance object for method chaining.
177      */
178     protected function _group()
179     {
180         $this->db->group_by('orders.orders_id');
181         
182         return $this;
183     }
184     
185     
186     /**
187      * Prepare the OrderListItemCollection object.
188      *
189      * This method will prepare the collection object which is going to be returned by both
190      * the "get" and "filter" methods. The following values are required to be present in
191      * each row of the $result parameter:
192      *      - orders_id
193      *      - customers_id
194      *      - customers_firstname
195      *      - customers_lastname
196      *      - date_purchased
197      *      - payment_class
198      *      - payment_method
199      *      - shipping_class
200      *      - shipping_method
201      *      - orders_status_id
202      *      - orders_status_name
203      *      - total_sum
204      *
205      * @param array $result Contains the order data.
206      *
207      * @return \OrderListItemCollection
208      */
209     protected function _prepareCollection(array $result)
210     {
211         $listItems = array();
212         
213         foreach($result as $row)
214         {
215             $orderId          = new IdType((int)$row['orders_id']);
216             $customerId       = new IdType((int)$row['customers_id']);
217             $customerName     = new StringType($row['customers_firstname'] . ' ' . $row['customers_lastname']);
218             $totalSum         = new DecimalType((float)$row['total_sum']);
219             $paymentType      = MainFactory::create('OrderPaymentType', new StringType($row['payment_method']),
220                                                     new StringType($row['payment_class']));
221             $shippingType     = MainFactory::create('OrderShippingType', new StringType($row['shipping_method']),
222                                                     new StringType($row['shipping_class']));
223             $purchaseDateTime = new DateTime($row['date_purchased']);
224             $orderStatusId    = new IdType((int)$row['orders_status_id']);
225             $orderStatusName  = new StringType($row['orders_status_name']);
226             
227             $orderListItem = MainFactory::create('OrderListItem', $orderId, $customerId, $customerName, $totalSum,
228                                                  $paymentType, $shippingType, $purchaseDateTime, $orderStatusId,
229                                                  $orderStatusName);
230             $listItems[]   = $orderListItem;
231         }
232         
233         $collection = MainFactory::create('OrderListItemCollection', $listItems);
234         
235         return $collection;
236     }
237 }
API documentation generated by ApiGen