Class OrderWriteService
category |
System |
---|---|
package |
Order |
__construct(\OrderRepositoryInterface $orderRepository, \OrderItemRepositoryInterface $orderItemRepository, \OrderItemAttributeRepositoryFactoryInterface $orderItemAttributeRepositoryFactory, \OrderTotalRepository $orderTotalRepository, \OrderStatusHistoryStorage $orderStatusHistoryWriter, \OrderServiceSettingsInterface $orderServiceSetting, \DeleteHistoryWriteService $deleteHistoryService)
\OrderRepositoryInterface
\OrderItemRepositoryInterface
\OrderItemAttributeRepositoryFactoryInterface
\OrderTotalRepository
\OrderStatusHistoryStorage
\OrderServiceSettingsInterface
\DeleteHistoryWriteService
addOrderItem(\IdType $orderId, \OrderItemInterface $orderItem) : integer
Adds an item to the order.
integer
Id of the StoredOrderItem
addOrderItemAttribute(\IdType $orderItemId, \OrderItemAttributeInterface $orderItemAttribute) : integer
Adds an order item attribute to the order
integer
Id of stored order item attribute.
addOrderStatusHistoryEntry(\IdType $orderId, \StringType $comment, \IdType $customerId)
Add an order status history entry to an order, without changing the status or notifying the customer.
addOrderTotal(\IdType $orderId, \OrderTotalInterface $orderTotal) : integer
Adds a total price to an order.
integer
Id of stored order total.
createNewCustomerOrder(\IdType $customerId, \CustomerStatusInformation $customerStatusInfo, \StringType $customerNumber, \EmailStringType $customerEmail, \StringType $customerTelephone, \StringType $vatIdNumber, \AddressBlockInterface $customerAddress, \AddressBlockInterface $billingAddress, \AddressBlockInterface $deliveryAddress, \OrderItemCollection $orderItemCollection, \OrderTotalCollection $orderTotalCollection, \OrderShippingType $shippingType, \OrderPaymentType $paymentType, \CurrencyCode $currencyCode, \LanguageCode $languageCode, \DecimalType $totalWeight, \StringType $comment = null, \IntType $orderStatusId = null, \KeyValueCollection $addonValues = null) : integer
Creates a new customer order and returns the order ID as an integer.
\KeyValueCollection
Optional key => value collection of addon values - e.g. cookies (default = null)
integer
createNewStandaloneOrder(\StringType $customerNumber, \EmailStringType $customerEmail, \StringType $customerTelephone, \StringTYpe $vatIdNumber, \AddressBlockInterface $customerAddress, \AddressBlockInterface $billingAddress, \AddressBlockInterface $deliveryAddress, \OrderItemCollection $orderItemCollection, \OrderTotalCollection $orderTotalCollection, \OrderShippingType $shippingType, \OrderPaymentType $paymentType, \CurrencyCode $currencyCode, \LanguageCode $languageCode, \DecimalType $totalWeight, \StringType $comment = null, \IntType $orderStatusId = null, \KeyValueCollection $addonValues = null) : integer
Creates a new standalone order (e.g. for guests) and returns the order ID as an integer.
\StringTYpe
VAT ID number of the customer.
\KeyValueCollection
Optional key => value collection of addon values - e.g. cookies (default = null)
integer
removeOrderById(\IdType $orderId)
Removes a specific order, depending on the provided order ID.
removeOrderItem(\StoredOrderItemInterface $orderItem)
Removes an item from an order.
removeOrderItemAttribute(\StoredOrderItemAttributeInterface $orderItemAttribute)
Removes an item attribute of an order
removeOrderTotal(\StoredOrderTotalInterface $orderTotal)
Removes a total price of an order
updateBillingAddress(\IdType $orderId, \AddressBlockInterface $newAddress)
Updates the customers billing address.
updateComment(\IdType $orderId, \StringType $newComment)
Updates the comment of an order.
updateCustomerAddress(\IdType $orderId, \AddressBlockInterface $newAddress)
Updates the customers address.
updateDeliveryAddress(\IdType $orderId, \AddressBlockInterface $newAddress)
Updates the customers delivery address.
updateOrder(\OrderInterface $order) : \OrderWriteService
Updates the provided order.
\OrderWriteService
Same instance for chained method calls.
updateOrderItem(\StoredOrderItemInterface $orderItem)
updateOrderItemAttribute(\StoredOrderItemAttributeInterface $orderItemAttribute)
Updates an item attribute of an order.
updateOrderStatus(\IdType $orderId, \IntType $newOrderStatusId, \StringType $comment, \BoolType $customerNotified, \IdType $customerId = null)
Updates the order status of an order.
updateOrderTotal(\StoredOrderTotalInterface $orderTotal)
Updates a total price of an order
updatePaymentType(\IdType $orderId, \OrderPaymentType $newPaymentType)
Updates the payment type of an order.
updateShippingType(\IdType $orderId, \OrderShippingType $newShippingType)
Updates the shipping type of an order.
orderItemAttributeRepositoryFactory : \OrderItemAttributeRepositoryFactory
orderStatusHistoryStorage : \OrderStatusHistoryStorage
orderServiceSettings : \OrderServiceSettingsInterface
deleteHistoryService : \DeleteHistoryWriteService