public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'Product';
     $this->local_entity_name = 'Products';
     $this->connec_resource_name = 'items';
     $this->connec_resource_endpoint = 'items';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'TaxCode';
     $this->local_entity_name = 'TaxRecord';
     $this->connec_resource_name = 'tax_codes';
     $this->connec_resource_endpoint = 'tax_codes';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'Invoice';
     $this->local_entity_name = 'Invoice';
     $this->connec_resource_name = 'invoices';
     $this->connec_resource_endpoint = 'invoices';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'Customer';
     $this->local_entity_name = 'Customers';
     $this->connec_resource_name = 'people';
     $this->connec_resource_endpoint = 'people';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'AppUser';
     $this->local_entity_name = 'Users';
     $this->connec_resource_name = 'app_users';
     $this->connec_resource_endpoint = 'app_users';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'SalesOrder';
     $this->local_entity_name = 'SalesOrders';
     $this->connec_resource_name = 'sales_orders';
     $this->connec_resource_endpoint = 'sales_orders';
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'Payment';
     $this->local_entity_name = 'Payments';
     $this->connec_resource_name = 'payments';
     $this->connec_resource_endpoint = 'payments';
     $this->payment_method_mapping_reverse = array('ccsave' => 'CC', 'Cash on delivery (COD)' => 'COD');
 }
 public function __construct()
 {
     parent::__construct();
     $this->connec_entity_name = 'SalesOrder';
     $this->local_entity_name = 'SalesOrders';
     $this->connec_resource_name = 'sales_orders';
     $this->connec_resource_endpoint = 'sales_orders';
     $this->sales_order_status_mapping = array('Awaiting check payment' => 'AUTHORISED', 'Payment accepted' => 'PAID', 'Processing in progress' => 'AUTHORISED', 'Shipped' => 'SHIPPED', 'Delivered' => 'DELIVERED', 'Canceled' => 'Cancelled', 'Refunded' => 'REFUNDED', 'Payment error' => 'SUBMITTED', 'On backorder (paid)' => 'SUBMITTED', 'Awaiting bank wire payment' => 'AUTHORISED', 'Awaiting PayPal payment' => 'AUTHORISED', 'Remote payment accepted' => 'AUTHORISED', 'On backorder (not paid)' => 'AUTHORISED', 'Awaiting Cash On Delivery validation' => 'AUTHORISED');
 }
예제 #9
0
 /**
  * Creates mappers in according [[mappers]] property for [[src]] item
  * @param object|array $src 
  * @return mapper\mappers\BaseMapper[]
  */
 protected function createMappers($src)
 {
     $result = [];
     foreach ($this->mappers as $config) {
         if (is_array($config)) {
             $result[] = BaseMapper::createMapper($config[1], (array) $config[0], array_slice($config, 2));
         } else {
             throw new \InvalidConfigException('Invalid mapper config.');
         }
     }
     return $result;
 }
예제 #10
0
 public function getById($id)
 {
     $result = parent::getById($id, "\n    \t\t\t\t*,\n                    unix_timestamp(created) as tscreated,\n                    unix_timestamp(lastpingvisitor) as lpvisitor,\n                    unix_timestamp(lastpingagent) as lpoperator,\n                    unix_timestamp(CURRENT_TIMESTAMP) as current");
     if ($result) {
         //Inject rate if needed
         $crm = MapperFactory::getMapper("Rate");
         $rate = $crm->getByThreadidAndOperatorid($result['threadid'], $result['operatorid']);
         if ($rate) {
             $result['ratedoperatorid'] = $rate['operatorid'];
             $result['rate'] = $rate['rate'];
         } else {
             $result['ratedoperatorid'] = null;
             $result['rate'] = null;
         }
     }
     return $result;
 }
예제 #11
0
 public function getById($id)
 {
     $result = parent::getById($id, '
 				t.*,
                 WM_UNIX_TIMESTAMP("created") as "tscreated",
                 WM_UNIX_TIMESTAMP("lastpingvisitor") as "lpvisitor",
                 WM_UNIX_TIMESTAMP("lastpingagent") as "lpoperator",
                 WM_UNIX_TIMESTAMP(SYSDATE) as "current"
                 ');
     if ($result) {
         //Inject rate if needed
         $crm = MapperFactory::getMapper("Rate");
         $rate = $crm->getByThreadidAndOperatorid($result['threadid'], $result['operatorid']);
         if ($rate) {
             $result['ratedoperatorid'] = $rate['operatorid'];
             $result['rate'] = $rate['rate'];
         } else {
             $result['ratedoperatorid'] = null;
             $result['rate'] = null;
         }
     }
     return $result;
 }
예제 #12
0
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array('date', 'deldate'));
 }
예제 #13
0
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name);
 }
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array('created', 'updated'));
 }
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array('updated'), false, 'id');
 }
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array("recoverytime"));
 }
예제 #17
0
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array("created"));
 }
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array("updated"), false, "id");
 }
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array("lastvisited"), false, "operatorid");
 }
예제 #20
0
 public function __construct(DBDriver $db, $model_name)
 {
     parent::__construct($db, $model_name, array(), false, "configkey");
 }