Example #1
0
 public function create()
 {
     return Client::createResource('/products/' . $this->fields->product_id . '/rules', $this->getCreateFields());
 }
 public function create()
 {
     return Client::createResource('/optionsets/options', $this->getCreateFields());
 }
 public function testCreateResourcePostsToTheRightPlace()
 {
     $new = array(rand() => rand());
     $this->connection->expects($this->once())->method('post')->with('http://storeurl' . $this->basePath . '/whatever', (object) $new)->will($this->returnValue($new));
     Client::configure(array('store_url' => 'http://storeurl', 'username' => 'whatever', 'api_key' => 'whatever'));
     Client::setConnection($this->connection);
     // re-set the connection since Client::configure unsets it
     $result = Client::createResource('/whatever', $new);
     $this->assertSame($new, $result);
 }
 public function create()
 {
     return Client::createResource('/options/' . $this->fields->option_id . '/values', $this->getCreateFields());
 }
 public function create()
 {
     return Client::createResource('/orders/' . $this->fields->order_id . '/shipments', $this->getCreateFields());
 }
Example #6
0
 public static function createCustomerAddress($customer_id, $object)
 {
     return Bigcommerce::createResource('/customers/' . $customer_id . '/addresses', $object);
 }