Exemplo n.º 1
0
 public function testProductResource()
 {
     $product = BigCommerce_Api::getProduct(1);
     $this->assertEquals(1, $product->id);
 }
Exemplo n.º 2
0
 /**
  * Internal method to wrap items in a collection to resource classes.
  *
  * @param string $resource name of the resource class
  * @param array $object object collection
  * @return array
  */
 private static function mapCollection($resource, $object)
 {
     if ($object == false || is_string($object)) {
         return $object;
     }
     self::$resource = $resource;
     return array_map(array('self', 'mapCollectionObject'), $object);
 }
Exemplo n.º 3
0
 public function update()
 {
     return BigCommerce_Api::updateBrand($this->id, $this->getUpdateFields());
 }