/** * AmazonItemLists contain all of the items for a given order. * * The parameters are passed to the parent constructor, which are * in turn passed to the AmazonCore constructor. See it for more information * on these parameters and common methods. * Please note that an extra parameter comes before the usual Mock Mode parameters, * so be careful when setting up the object. * @param string $s <p>Name for the store you want to use.</p> * @param string $id [optional] <p>The order ID to set for the object.</p> * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode. * This defaults to <b>FALSE</b>.</p> * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p> * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p> */ public function __construct($s, $id = null, $mock = false, $m = null, $config = null) { parent::__construct($s, $mock, $m, $config); include $this->env; if (!is_null($id)) { $this->setOrderId($id); } if (isset($THROTTLE_LIMIT_ITEM)) { $this->throttleLimit = $THROTTLE_LIMIT_ITEM; } if (isset($THROTTLE_TIME_ITEM)) { $this->throttleTime = $THROTTLE_TIME_ITEM; } $this->throttleGroup = 'ListOrderItems'; }
/** * AmazonOrderSet is a variation of <i>AmazonOrder</i> that pulls multiple specified orders. * * The parameters are passed to the parent constructor, which are * in turn passed to the AmazonCore constructor. See it for more information * on these parameters and common methods. * Please note that an extra parameter comes before the usual Mock Mode parameters, * so be careful when setting up the object. * @param string $s <p>Name for the store you want to use.</p> * @param string $o [optional] <p>The Order IDs to set for the object.</p> * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode. * This defaults to <b>FALSE</b>.</p> * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p> * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p> */ public function __construct($s, $o = null, $mock = false, $m = null, $config = null) { parent::__construct($s, $mock, $m, $config); $this->i = 0; include $this->env; if ($o) { $this->setOrderIds($o); } $this->options['Action'] = 'GetOrder'; if (isset($THROTTLE_LIMIT_ORDER)) { $this->throttleLimit = $THROTTLE_LIMIT_ORDER; } if (isset($THROTTLE_TIME_ORDER)) { $this->throttleTime = $THROTTLE_TIME_ORDER; } $this->throttleGroup = 'GetOrder'; }
/** * Amazon Order Lists pull a set of Orders and turn them into an array of <i>AmazonOrder</i> objects. * * The parameters are passed to the parent constructor, which are * in turn passed to the AmazonCore constructor. See it for more information * on these parameters and common methods. * @param string $s <p>Name for the store you want to use.</p> * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode. * This defaults to <b>FALSE</b>.</p> * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p> * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p> */ public function __construct($s, $mock = false, $m = null, $config = null) { parent::__construct($s, $mock, $m, $config); include $this->env; // if (file_exists($this->config)){ // include($this->config); // } else { // throw new \Exception('Config file does not exist!'); // } $store = Config::get('amazon-mws.store'); if (isset($store[$s]) && array_key_exists('marketplaceId', $store[$s])) { $this->options['MarketplaceId.Id.1'] = $store[$s]['marketplaceId']; } else { $this->log("Marketplace ID is missing", 'Urgent'); } if (isset($THROTTLE_LIMIT_ORDERLIST)) { $this->throttleLimit = $THROTTLE_LIMIT_ORDERLIST; } if (isset($THROTTLE_TIME_ORDERLIST)) { $this->throttleTime = $THROTTLE_TIME_ORDERLIST; } $this->throttleGroup = 'ListOrders'; }