Class OrderWriteService

Class OrderWriteService

OrderWriteService implements OrderWriteServiceInterface
Package: Order
Category: System
Located at Services/Core/Order/OrderWriteService.inc.php

Methods summary

public __construct( OrderRepositoryInterface $orderRepository, OrderItemRepositoryInterface $orderItemRepository, OrderItemAttributeRepositoryFactoryInterface $orderItemAttributeRepositoryFactory, OrderTotalRepository $orderTotalRepository, OrderStatusHistoryStorage $orderStatusHistoryWriter, OrderServiceSettingsInterface $orderServiceSetting )

Class Constructor

public 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

Create New Customer Order

public 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

Create New Standalone Order

public updateCustomerAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Customer Address

public updateBillingAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Billing Address

public updateDeliveryAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Delivery Address

public addOrderItem( IdType $orderId, OrderItemInterface $orderItem ) : integer

Add Order Item

public updateOrderItem( StoredOrderItemInterface $orderItem )

Update Order Item

public removeOrderItem( StoredOrderItemInterface $orderItem )

Remove Order Item

public addOrderItemAttribute( IdType $orderItemId, OrderItemAttributeInterface $orderItemAttribute ) : integer

Add Order Item Attribute

public updateOrderItemAttribute( StoredOrderItemAttributeInterface $orderItemAttribute )

Update Order Item Attribute

public removeOrderItemAttribute( StoredOrderItemAttributeInterface $orderItemAttribute )

Remove Order Item Attribute

public addOrderTotal( IdType $orderId, OrderTotalInterface $orderTotal ) : integer

Add Order Total

public updateOrderTotal( StoredOrderTotalInterface $orderTotal )

Update Order Total

public removeOrderTotal( StoredOrderTotalInterface $orderTotal )

Remove Order Total

public updateShippingType( IdType $orderId, OrderShippingType $newShippingType )

Update Shipping Type

public updatePaymentType( IdType $orderId, OrderPaymentType $newPaymentType )

Update Payment Type

public updateComment( IdType $orderId, StringType $newComment )

Update Comment

public updateOrderStatus( IdType $orderId, IntType $newOrderStatusId, StringType $comment, BoolType $customerNotified, IdType $customerId = null )

Update Order Status

public addOrderStatusHistoryEntry( IdType $orderId, StringType $comment, IdType $customerId )

Add Order Status History Entry

public updateOrder( OrderInterface $order ) : OrderWriteService

Update Order

public removeOrderById( IdType $orderId )

Remove Order by ID

Properties summary