Пример #1
0
 /**
  * NsItemFulfillment constructor.
  *
  * @param null $options
  * @throws NetSuiteException
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (!defined('NETSUITE_ITEM_FULFILLMENT_RESTLET')) {
         throw new NetSuiteException('No restlet url specified in bootstrap.');
     }
     $this->NetSuiteAPI = new NetSuiteAPI(null, NETSUITE_ITEM_FULFILLMENT_RESTLET);
 }
Пример #2
0
 /**
  * DataFlowTenSingle constructor.
  * @param null $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->restlet_id = self::$RESTLET_ID;
     /**
      * Max retries for failed shipments
      */
     if (!empty($options['max_retry'])) {
         $this->max_retry = $options['max_retry'];
     } else {
         $this->max_retry = self::$MAX_RETRY;
     }
 }
Пример #3
0
 /**
  * DataFlowTen constructor.
  *
  * @param null $options
  */
 public function __construct($options = null)
 {
     App::import("Model", "WarehouseUtil");
     App::import("Model", "Country");
     App::uses('WarehouseUtil', 'Lib');
     print_r(array('options' => $options));
     parent::__construct($options);
     /**
      * Configure Export Limit
      */
     if (!empty($options['export_limit'])) {
         $this->export_limit = $options['export_limit'];
     } else {
         $this->export_limit = DataFlowTen::$EXPORT_LIMIT;
     }
     if (!empty($options['market_warehouses'])) {
         $this->market_warehouses = $options['market_warehouses'];
     }
     /**
      * Configure execute limit
      * Number of times execute is called
      */
     if (!empty($options['execute_limit'])) {
         $this->execute_limit = $options['execute_limit'];
     } else {
         $this->execute_limit = DataFlowTen::$EXECUTE_LIMIT;
     }
     /**
      * Max retries for failed shipments
      */
     if (!empty($options['max_retry'])) {
         $this->max_retry = $options['max_retry'];
     } else {
         $this->max_retry = DataFlowTen::$MAX_RETRY;
     }
     /**
      * Initialize
      */
     $this->Order = ClassRegistry::init('Order');
     $this->OrderItem = ClassRegistry::init('OrderItem');
     $this->OrderShipment = ClassRegistry::init('OrderShipment');
     $this->OrderShipmentItem = ClassRegistry::init('OrderShipmentItem');
     $this->ItemShipmentClass = ClassRegistry::init('ItemShipmentClass');
     $this->OrderShipmentMethod = ClassRegistry::init('OrderShipmentMethod');
     $this->DataFlowFour = new DataFlowFour(array('execute_limit' => 1));
     //$this->NetSuite			   = ClassRegistry::init('NetSuite');
     if ($options) {
         $this->execute($options);
     }
     $this->repDB = $this->Order->getDataSource('replicated');
 }
Пример #4
0
 /**
  * DataFlowFour constructor.
  *
  * @param null $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->restlet_id = self::$RESTLET_ID;
     /**
      * Configure Export Limit
      */
     if (!empty($options['export_limit'])) {
         $this->export_limit = $options['export_limit'];
     } else {
         $this->export_limit = self::$EXPORT_LIMIT;
     }
     /**
      * Configure Expedited flag
      */
     if (!empty($options['expedited'])) {
         $this->expedited = $options['expedited'];
     }
     /**
      * Configure execute limit
      * Number of times execute is called
      */
     if (!empty($options['execute_limit'])) {
         $this->execute_limit = $options['execute_limit'];
     } else {
         $this->execute_limit = self::$EXECUTE_LIMIT;
     }
     /**
      * Max retries for failed shipments
      */
     if (!empty($options['max_retry'])) {
         $this->max_retry = $options['max_retry'];
     } else {
         $this->max_retry = self::$MAX_RETRY;
     }
     /**
      * Initialize
      */
     $this->OrderShipment = ClassRegistry::init('OrderShipment');
     $this->CouponPresenterUser = ClassRegistry::init('CouponPresenterUser');
     $this->OrderItem = ClassRegistry::init('OrderItem');
     $this->RoyaltiesEarned = ClassRegistry::init('RoyaltiesEarned');
     $this->Order = ClassRegistry::init('Order');
     $this->Item = ClassRegistry::init('Item');
     $this->Party = ClassRegistry::init('Party');
 }