Example #1
0
 public function getSelf(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array();
     $enums = array();
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_GET, '/', new Hotel(), 'NODE', Hotel::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }
 public function createHotel(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('address' => 'Object', 'applinks' => 'Object', 'brand' => 'string', 'description' => 'string', 'guest_ratings' => 'list<Object>', 'hotel_id' => 'string', 'images' => 'list<Object>', 'name' => 'string', 'phone' => 'string', 'star_rating' => 'float', 'url' => 'string');
     $enums = array();
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/hotels', new Hotel(), 'EDGE', Hotel::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }