public function update() { $order = new \stdClass(); // to use stdClass in global namespace use this... $order->status_id = $this->status_id; $order->is_deleted = $this->is_deleted; Client::updateResource('/orders/' . $this->id, $order); }
public function update() { Client::updateResource('/products/' . $this->fields->product_id . '/rules/' . $this->fields->id, $this->getUpdateFields()); }
public function update() { Client::updateResource('/optionsets/options/' . $this->id, $this->getUpdateFields()); }
public function testUpdateResourcePutsToTheRightPlace() { $update = array(rand() => rand()); $this->connection->expects($this->once())->method('put')->with('http://storeurl' . $this->basePath . '/whatever', (object) $update)->will($this->returnValue($update)); 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::updateResource('/whatever', $update); $this->assertSame($update, $result); }
public function update() { Client::updateResource('/options/' . $this->fields->option_id . '/values/' . $this->id, $this->getUpdateFields()); }
public function update() { return Client::updateResource('/orders/' . $this->fields->order_id . '/shipments/' . $this->id, $this->getUpdateFields()); }