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    OrderItem.php 2016-01-18
  4    Gambio GmbH
  5    http://www.gambio.de
  6    Copyright (c) 2016 Gambio GmbH
  7    Released under the GNU General Public License (Version 2)
  8    [http://www.gnu.org/licenses/gpl-2.0.html]
  9    --------------------------------------------------------------
 10 */
 11 
 12 MainFactory::load_class('OrderItemInterface');
 13 
 14 /**
 15  * Class OrderItem
 16  *
 17  * @category   System
 18  * @package    Order
 19  * @subpackage Entities
 20  */
 21 class OrderItem implements OrderItemInterface
 22 {
 23     /**
 24      * Product model.
 25      *
 26      * @var string
 27      */
 28     protected $productModel = '';
 29     
 30     /**
 31      * Name.
 32      *
 33      * @var string
 34      */
 35     protected $name = '';
 36     
 37     /**
 38      * Price.
 39      *
 40      * @var float
 41      */
 42     protected $price = 0.0;
 43     
 44     /**
 45      * Quantity.
 46      *
 47      * @var float
 48      */
 49     protected $quantity = 0.0;
 50     
 51     /**
 52      * Tax amount.
 53      *
 54      * @var float
 55      */
 56     protected $tax = 0.0;
 57     
 58     /**
 59      * Tax allowed on this order item.
 60      *
 61      * @var bool
 62      */
 63     protected $taxAllowed = false;
 64     
 65     /**
 66      * Amount of discount made on this order item..
 67      *
 68      * @var float
 69      */
 70     protected $discountMade = 0.0;
 71     
 72     /**
 73      * Order item shipping time info text.
 74      *
 75      * @var string
 76      */
 77     protected $shippingTimeInfo = '';
 78     
 79     /**
 80      * Attributes of the order item.
 81      *
 82      * @var OrderItemAttributeCollection
 83      */
 84     protected $attributes;
 85     
 86     /**
 87      * Order item quantity unit name.
 88      *
 89      * @var string
 90      */
 91     protected $quantityUnitName = '';
 92     
 93     /**
 94      * Checkout information.
 95      *
 96      * @var string
 97      */
 98     protected $checkoutInformation = '';
 99     
100     /**
101      * Download information.
102      *
103      * @var OrderItemDownloadInformation
104      */
105     protected $downloadInformation;
106     
107     /**
108      * Order item addon collection.
109      *
110      * @var EditableKeyValueCollection
111      */
112     protected $addonValues;
113     
114     
115     /**
116      * OrderItem constructor.
117      *
118      * @param StringType $name Order item name.
119      */
120     public function __construct(StringType $name)
121     {
122         $this->setName($name);
123         
124         // Set empty download information
125         $this->downloadInformation = MainFactory::create('EmptyOrderItemDownloadInformation');
126         
127         // Set addon values collection.
128         // Note, that there is no setter method for assign the addonValues collection.
129         $addonValues       = MainFactory::create('EditableKeyValueCollection', array());
130         $this->addonValues = $addonValues;
131     }
132     
133     
134     /**
135      * Returns the product model of the order item.
136      *
137      * @return string Product model of the order item.
138      */
139     public function getProductModel()
140     {
141         return $this->productModel;
142     }
143     
144     
145     /**
146      * Returns the name of the order item.
147      *
148      * @return string Name of the order item.
149      */
150     public function getName()
151     {
152         return $this->name;
153     }
154     
155     
156     /**
157      * Returns the price of the order item.
158      *
159      * @return double Price of the order item.
160      */
161     public function getPrice()
162     {
163         return $this->price;
164     }
165     
166     
167     /**
168      * Returns the quantity of the order item.
169      *
170      * @return double Quantity of the order item.
171      */
172     public function getQuantity()
173     {
174         return $this->quantity;
175     }
176     
177     
178     /**
179      * Returns the final price of the order item.
180      *
181      * @return float Final price of the order item.
182      */
183     public function getFinalPrice()
184     {
185         return $this->price * $this->quantity;
186     }
187     
188     
189     /**
190      * Returns the tax of the order item.
191      *
192      * @return float Tax of the order item.
193      */
194     public function getTax()
195     {
196         return $this->tax;
197     }
198     
199     
200     /**
201      * Is tax of the order item allowed?
202      *
203      * @return bool Is tax of the order item allowed?
204      */
205     public function isTaxAllowed()
206     {
207         return $this->taxAllowed;
208     }
209     
210     
211     /**
212      * Returns the amount of discount of the order item.
213      *
214      * @return float Amount of discount of the order item.
215      */
216     public function getDiscountMade()
217     {
218         return $this->discountMade;
219     }
220     
221     
222     /**
223      * Returns the shipping time of the order item.
224      *
225      * @return string Shipping time of the order item.
226      */
227     public function getShippingTimeInfo()
228     {
229         return $this->shippingTimeInfo;
230     }
231     
232     
233     /**
234      * Returns the attributes of the order item.
235      *
236      * @return OrderItemAttributeCollection Attributes of the order item.
237      */
238     public function getAttributes()
239     {
240         // If no collection is set, create a new empty one.
241         if(null === $this->attributes)
242         {
243             $this->attributes = MainFactory::create('OrderItemAttributeCollection', array());
244         }
245         
246         return $this->attributes;
247     }
248     
249     
250     /**
251      * Returns the name of quantity unit of the order item.
252      *
253      * @return string Name of quantity unit of the order item.
254      */
255     public function getQuantityUnitName()
256     {
257         return $this->quantityUnitName;
258     }
259     
260     
261     /**
262      * Returns the checkout information of the order item.
263      *
264      * @return string Checkout information of the order item.
265      */
266     public function getCheckoutInformation()
267     {
268         return $this->checkoutInformation;
269     }
270     
271     
272     /**
273      * Returns the download information of the order item.
274      *
275      * @return OrderItemDownloadInformation Download information of the order item.
276      */
277     public function getDownloadInformation()
278     {
279         return $this->downloadInformation;
280     }
281     
282     
283     /**
284      * Returns the addon collection of an order item.
285      *
286      * @return EditableKeyValueCollection Addon collection.
287      */
288     public function getAddonValues()
289     {
290         return $this->addonValues->getClone();
291     }
292     
293     
294     /**
295      * Returns the order addon key value from collection.
296      *
297      * @param StringType $key Addon key.
298      *
299      * @return string Addon value.
300      */
301     public function getAddonValue(StringType $key)
302     {
303         return $this->addonValues->getValue($key->asString());
304     }
305     
306     
307     /**
308      * Sets product model of the OrderItem.
309      *
310      * @param StringType $model Model of the OrderItem.
311      *
312      * @return OrderItem Same instance for method chaining.
313      */
314     public function setProductModel(StringType $model)
315     {
316         $this->productModel = $model->asString();
317         
318         return $this;
319     }
320     
321     
322     /**
323      * Sets name of the OrderItem.
324      *
325      * @param StringType $name Name of the OrderItem.
326      *
327      * @return OrderItem Same instance for method chaining.
328      */
329     public function setName(StringType $name)
330     {
331         $this->name = $name->asString();
332         
333         return $this;
334     }
335     
336     
337     /**
338      * Sets price of the OrderItem.
339      *
340      * @param DecimalType $price Price of the OrderItem.
341      *
342      * @return OrderItem Same instance for method chaining.
343      */
344     public function setPrice(DecimalType $price)
345     {
346         $this->price = $price->asDecimal();
347         
348         return $this;
349     }
350     
351     
352     /**
353      * Sets quantity of the OrderItem.
354      *
355      * @param DecimalType $quantity Quantity of the OrderItem.
356      *
357      * @return OrderItem Same instance for method chaining.
358      */
359     public function setQuantity(DecimalType $quantity)
360     {
361         $this->quantity = $quantity->asDecimal();
362         
363         return $this;
364     }
365     
366     
367     /**
368      * Sets tax of the OrderItem.
369      *
370      * @param DecimalType $tax Tax of the OrderItem.
371      *
372      * @return OrderItem Same instance for method chaining.
373      */
374     public function setTax(DecimalType $tax)
375     {
376         $this->tax = $tax->asDecimal();
377         
378         return $this;
379     }
380     
381     
382     /**
383      * Sets whether tax of the OrderItem is allowed or not.
384      *
385      * @param BoolType $allow Tax allowed or not?
386      *
387      * @return OrderItem Same instance for method chaining.
388      */
389     public function setTaxAllowed(BoolType $allow)
390     {
391         $this->taxAllowed = $allow->asBool();
392         
393         return $this;
394     }
395     
396     
397     /**
398      * Sets discount of the OrderItem.
399      *
400      * @param DecimalType $discount Discount of the OrderItem.
401      *
402      * @return OrderItem Same instance for method chaining.
403      */
404     public function setDiscountMade(DecimalType $discount)
405     {
406         $this->discountMade = $discount->asDecimal();
407         
408         return $this;
409     }
410     
411     
412     /**
413      * Sets shipping time of the OrderItem.
414      *
415      * @param StringType $time Shipping time of the OrderItem.
416      *
417      * @return OrderItem Same instance for method chaining.
418      */
419     public function setShippingTimeInfo(StringType $time)
420     {
421         $this->shippingTimeInfo = $time->asString();
422         
423         return $this;
424     }
425     
426     
427     /**
428      * Sets attributes of the OrderItem.
429      *
430      * @param OrderItemAttributeCollection $attributeCollection Attributes of the OrderItem.
431      *
432      * @return OrderItem Same instance for method chaining.
433      */
434     public function setAttributes(OrderItemAttributeCollection $attributeCollection)
435     {
436         $this->attributes = $attributeCollection;
437         
438         return $this;
439     }
440     
441     
442     /**
443      * Sets name of quantity unit of the OrderItem.
444      *
445      * @param StringType $name Name of quantity unit of the OrderItem.
446      *
447      * @return OrderItem Same instance for method chaining.
448      */
449     public function setQuantityUnitName(StringType $name)
450     {
451         $this->quantityUnitName = $name->asString();
452         
453         return $this;
454     }
455     
456     
457     /**
458      * Sets the checkout information.
459      *
460      * @param StringType $checkoutInformation Contains the checkout info of the order item.
461      *
462      * @return OrderItem Same instance for method chaining.
463      */
464     public function setCheckoutInformation(StringType $checkoutInformation)
465     {
466         $this->checkoutInformation = $checkoutInformation->asString();
467         
468         return $this;
469     }
470     
471     
472     /**
473      * Sets the download information of the OrderItem.
474      *
475      * @param OrderItemDownloadInformation $download Download information.
476      *
477      * @return OrderItem Same instance for method chaining.
478      */
479     public function setDownloadInformation(OrderItemDownloadInformation $download)
480     {
481         $this->downloadInformation = $download;
482         
483         return $this;
484     }
485     
486     
487     /**
488      * Adds/updates a key value in the addon value collection.
489      *
490      * @param StringType $key   Addon key.
491      * @param StringType $value Addon value.
492      *
493      * @return OrderItem Same instance for method chaining.
494      */
495     public function setAddonValue(StringType $key, StringType $value)
496     {
497         $this->addonValues->setValue($key->asString(), $value->asString());
498         
499         return $this;
500     }
501     
502     
503     /**
504      * Merges the existing addon values with new ones.
505      *
506      * @param KeyValueCollection $addonValues Contains the new addon values to be merged with the existing ones.
507      *
508      * @return OrderItem Same instance for method chaining.
509      */
510     public function addAddonValues(KeyValueCollection $addonValues)
511     {
512         $this->addonValues->addCollection($addonValues);
513         
514         return $this;
515     }
516     
517     
518     /**
519      * Deletes a specific addon value entry by key.
520      *
521      * @param StringType $key Addon key.
522      *
523      * @return OrderItem Same instance for method chaining.
524      */
525     public function deleteAddonValue(StringType $key)
526     {
527         $this->addonValues->deleteValue($key->asString());
528         
529         return $this;
530     }
531 }
API documentation generated by ApiGen