1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
<?php
/* --------------------------------------------------------------
OrderWriteServiceInterface.php 2016-07-11
Gambio GmbH
http://www.gambio.de
Copyright (c) 2016 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
*/
/**
* Interface OrderWriteServiceInterface
*
* @category System
* @package Order
* @subpackage Interfaces
*/
interface OrderWriteServiceInterface
{
/**
* Creates a new customer order and returns the order ID as an integer.
*
* @param IdType $customerId Customer ID.
* @param CustomerStatusInformation $customerStatusInfo Customer Status Information.
* @param StringType $customerNumber Customer Number.
* @param EmailStringType $customerEmail Customer Email.
* @param StringType $customerTelephone Customer Telephone.
* @param StringType $vatIdNumber VAT ID Number.
* @param AddressBlockInterface $customerAddress Address of the customer.
* @param AddressBlockInterface $billingAddress Billing address of the customer.
* @param AddressBlockInterface $deliveryAddress Delivery address of the customer.
* @param OrderItemCollection $orderItemCollection Collection of the order items.
* @param OrderTotalCollection $orderTotalCollection Total collection of the order.
* @param OrderShippingType $shippingType Shipping type of the order.
* @param OrderPaymentType $paymentType Payment type of the order.
* @param CurrencyCode $currencyCode Currency code of the order.
* @param LanguageCode $languageCode Language code of the order.
* @param StringType $comment Optional comment of the order (default = null).
* @param DecimalType $totalWeight Total weight of the order in kg.
* @param IntType $orderStatusId Optional id of the initial order status (default = null).
* @param KeyValueCollection $addonValues Optional key => value collection of addon values - e.g.
* cookies (default = null).
*
* @return int Order ID.
*/
public function 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);
/**
* Creates a new standalone order (e.g. for guests) and returns the order ID as an integer.
*
* @param StringType $customerNumber Customer Number.
* @param EmailStringType $customerEmail Customer Email.
* @param StringType $customerTelephone Customer Telephone.
* @param StringTYpe $vatIdNumber VAT ID number of the customer.
* @param AddressBlockInterface $customerAddress Address of the customer.
* @param AddressBlockInterface $billingAddress Billing address of the customer.
* @param AddressBlockInterface $deliveryAddress Delivery address of the customer.
* @param OrderItemCollection $orderItemCollection Collection of the order items.
* @param OrderTotalCollection $orderTotalCollection Total collection of the order.
* @param OrderShippingType $shippingType Shipping type of the order.
* @param OrderPaymentType $paymentType Payment type of the order.
* @param CurrencyCode $currencyCode Currency code of the order.
* @param LanguageCode $languageCode Language code of the order.
* @param DecimalType $totalWeight Total weight of the order in kg.
* @param StringType $comment Optional comment of the order (default = null).
* @param IntType $orderStatusId Optional id of the initial order status (default = null).
* @param KeyValueCollection $addonValues Optional key => value collection of addon values - e.g.
* cookies (default = null).
*
* @return int Order ID.
*/
public function 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);
/**
* Updates the customers address.
*
* @param IdType $orderId Order ID which holds the current address.
* @param AddressBlockInterface $newAddress New address of the customer.
*/
public function updateCustomerAddress(IdType $orderId, AddressBlockInterface $newAddress);
/**
* Updates the customers billing address.
*
* @param IdType $orderId Order ID which holds the current address.
* @param AddressBlockInterface $newAddress New billing address.
*/
public function updateBillingAddress(IdType $orderId, AddressBlockInterface $newAddress);
/**
* Updates the customers delivery address.
*
* @param IdType $orderId Order ID which holds the current address.
* @param AddressBlockInterface $newAddress New delivery address.
*/
public function updateDeliveryAddress(IdType $orderId, AddressBlockInterface $newAddress);
/**
* Adds an item to the order.
*
* @param IdType $orderId Order ID of the order to add the item.
* @param OrderItemInterface $orderItem The order item to add.
*
* @return int ID of the StoredOrderItem.
*/
public function addOrderItem(IdType $orderId, OrderItemInterface $orderItem);
/**
* Updates an order item.
*
* @param StoredOrderItemInterface $orderItem The order item to update.
*/
public function updateOrderItem(StoredOrderItemInterface $orderItem);
/**
* Removes an item from an order.
*
* @param StoredOrderItemInterface $orderItem The order item to remove.
*/
public function removeOrderItem(StoredOrderItemInterface $orderItem);
/**
* Adds an order item attribute to the order.
*
* @param IdType $orderItemId Order ID of the order item to add the attribute.
* @param OrderItemAttributeInterface $orderItemAttribute The order item attribute to add.
*
* @return int ID of stored order item attribute.
*/
public function addOrderItemAttribute(IdType $orderItemId, OrderItemAttributeInterface $orderItemAttribute);
/**
* Updates an item attribute of an order.
*
* @param StoredOrderItemAttributeInterface $orderItemAttribute The order item attribute to update.
*/
public function updateOrderItemAttribute(StoredOrderItemAttributeInterface $orderItemAttribute);
/**
* Removes an item attribute of an order.
*
* @param StoredOrderItemAttributeInterface $orderItemAttribute The order item attribute to remove.
*/
public function removeOrderItemAttribute(StoredOrderItemAttributeInterface $orderItemAttribute);
/**
* Adds a total price to an order.
*
* @param IdType $orderId Order ID of the order to add the total price.
* @param OrderTotalInterface $orderTotal Total price to add to the order.
*
* @return int ID of stored order total.
*/
public function addOrderTotal(IdType $orderId, OrderTotalInterface $orderTotal);
/**
* Updates a total price of an order.
*
* @param StoredOrderTotalInterface $orderTotal The total price of an order to update.
*/
public function updateOrderTotal(StoredOrderTotalInterface $orderTotal);
/**
* Removes a total price of an order.
*
* @param StoredOrderTotalInterface $orderTotal The total price of an order to remove.
*/
public function removeOrderTotal(StoredOrderTotalInterface $orderTotal);
/**
* Updates the shipping type of an order.
*
* @param IdType $orderId Order ID of the order to update.
* @param OrderShippingType $newShippingType The new shipping type.
*/
public function updateShippingType(IdType $orderId, OrderShippingType $newShippingType);
/**
* Updates the payment type of an order.
*
* @param IdType $orderId Order ID of the order to update.
* @param OrderPaymentType $newPaymentType The new payment type.
*/
public function updatePaymentType(IdType $orderId, OrderPaymentType $newPaymentType);
/**
* Updates the comment of an order.
*
* @param IdType $orderId Order ID of the order to update.
* @param StringType $newComment The new comment.
*/
public function updateComment(IdType $orderId, StringType $newComment);
/**
* Updates the order status of an order.
*
* @param IdType $orderId Order ID of the order to update.
* @param IntType $newOrderStatusId The new status ID.
* @param StringType $comment Comment of the order status history item.
* @param BoolType $customerNotified Customer notified flag.
*/
public function updateOrderStatus(IdType $orderId,
IntType $newOrderStatusId,
StringType $comment,
BoolType $customerNotified);
/**
* Updates the provided order.
*
* @param OrderInterface $order Order to update.
*/
public function updateOrder(OrderInterface $order);
/**
* Removes a specific order, depending on the provided order ID.
*
* @param IdType $orderId Order ID of the order to remove.
*/
public function removeOrderById(IdType $orderId);
}