コード例 #1
0
 /**
  * AmazonReportsCore constructor sets up key information used in all Amazon Reports Core requests
  *
  * This constructor is called when initializing all objects in the Amazon Reports Core.
  * The parameters are passed by the child objects' constructors, 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;
     $this->urlbranch = '';
     if (isset($AMAZON_VERSION_REPORTS)) {
         $this->options['Version'] = $AMAZON_VERSION_REPORTS;
     }
 }
コード例 #2
0
 /**
  * AmazonInboundCore constructor sets up key information used in all Amazon Inbound Core requests
  *
  * This constructor is called when initializing all objects in the Amazon Inbound Core.
  * The parameters are passed by the child objects' constructors, 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($AMAZON_VERSION_INBOUND)) {
         $this->urlbranch = 'FulfillmentInboundShipment/' . $AMAZON_VERSION_INBOUND;
         $this->options['Version'] = $AMAZON_VERSION_INBOUND;
     }
     if (isset($THROTTLE_LIMIT_INVENTORY)) {
         $this->throttleLimit = $THROTTLE_LIMIT_INVENTORY;
     }
     if (isset($THROTTLE_TIME_INVENTORY)) {
         $this->throttleTime = $THROTTLE_TIME_INVENTORY;
     }
     $this->throttleGroup = 'Inventory';
 }
コード例 #3
0
 /**
  * AmazonServiceStatus is a simple object that fetches the status of given Amazon service.
  *
  * 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 $service [optional] <p>The service 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, $service = null, $mock = false, $m = null, $config = null)
 {
     parent::__construct($s, $mock, $m, $config);
     include $this->env;
     if ($service) {
         $this->setService($service);
     }
     $this->options['Action'] = 'GetServiceStatus';
     if (isset($THROTTLE_LIMIT_STATUS)) {
         $this->throttleLimit = $THROTTLE_LIMIT_STATUS;
     }
     if (isset($THROTTLE_TIME_STATUS)) {
         $this->throttleTime = $THROTTLE_TIME_STATUS;
     }
     $this->throttleGroup = 'GetServiceStatus';
 }
コード例 #4
0
 /**
  * AmazonProductsCore constructor sets up key information used in all Amazon Products Core requests
  *
  * This constructor is called when initializing all objects in the Amazon Products Core.
  * The parameters are passed by the child objects' constructors, 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($AMAZON_VERSION_PRODUCTS)) {
         $this->urlbranch = 'Products/' . $AMAZON_VERSION_PRODUCTS;
         $this->options['Version'] = $AMAZON_VERSION_PRODUCTS;
     }
     $store = Config::get('amazon-mws.store');
     if (isset($store[$s]) && array_key_exists('marketplaceId', $store[$s])) {
         $this->options['MarketplaceId'] = $store[$s]['marketplaceId'];
     } else {
         $this->log("Marketplace ID is missing", 'Urgent');
     }
     if (isset($THROTTLE_LIMIT_PRODUCT)) {
         $this->throttleLimit = $THROTTLE_LIMIT_PRODUCT;
     }
 }