/** * 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 [optional] <p>Name for the store you want to use. * This parameter is optional if only one store is defined in the config file.</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 = null, $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'; }
/** * 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 [optional] <p>Name for the store you want to use. * This parameter is optional if only one store is defined in the config file.</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> * @throws \Exception */ public function __construct($config, $mock = false, $m = null) { parent::__construct($config, $mock, $m); include_once $this->env; if (array_key_exists('marketplaceId', $this->options)) { $this->options['MarketplaceId.Id.1'] = $this->options['marketplaceId']; } if (isset($THROTTLE_LIMIT_ORDERLIST)) { $this->throttleLimit = $THROTTLE_LIMIT_ORDERLIST; } if (isset($THROTTLE_TIME_ORDERLIST)) { $this->throttleTime = $THROTTLE_TIME_ORDERLIST; } $this->throttleGroup = 'ListOrders'; }
/** * 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 (isset($this->conf_data[$s]) && array_key_exists('marketplaceId', $this->conf_data[$s])) { $this->options['MarketplaceId.Id.1'] = $this->conf_data[$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'; }
/** * 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 [optional] <p>Name for the store you want to use. * This parameter is optional if only one store is defined in the config file.</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($config, $o = null, $mock = false, $m = null) { parent::__construct($config, $mock, $m); $this->i = 0; include_once $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'; }
/** * AmazonOrder object gets the details for a single object from Amazon. * * 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 two extra parameters come before the usual Mock Mode parameters, * so be careful when setting up the object. * @param string $s [optional] <p>Name for the store you want to use. * This parameter is optional if only one store is defined in the config file.</p> * @param string $id [optional] <p>The Order ID to set for the object.</p> * @param SimpleXMLElement $data [optional] <p>XML data from Amazon to be parsed.</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 = null, $id = null, $data = null, $mock = false, $m = null, $config = null) { parent::__construct($s, $mock, $m, $config); include $this->env; if ($id) { $this->setOrderId($id); } if ($data) { $this->parseXML($data); } $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 [optional] <p>Name for the store you want to use. * This parameter is optional if only one store is defined in the config file.</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 = null, $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!'); } if (isset($store[$this->storeName]) && array_key_exists('marketplaceId', $store[$this->storeName])) { $this->options['MarketplaceId.Id.1'] = $store[$this->storeName]['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'; }