Пример #1
0
 public function delete($uuid, $order_uuid = null, $service_uuid)
 {
     $this->authenticate();
     $customers = Customers::findWithUuid($uuid);
     if (empty($customers)) {
         throw new Shineisp_Api_Exceptions(400007, ":: 'uuid' not valid");
         exit;
     }
     $id = $customers['customer_id'];
     if ($order_uuid == null && $service_uuid == null) {
         throw new Shineisp_Api_Exceptions(400007, ":: 'order_uuid' not valid and 'service_uuid' not valid");
     }
     #TODO get order from $order_uuid
     if ($service_uuid != null) {
         $objService = OrdersItems::findByUUID($service_uuid);
         if ($objService == false) {
             return false;
         }
         $service = $objService->toArray();
         $orderid = $service['order_id'];
         Orders::DeleteByID($orderid, $id);
     }
 }