Module: BookingSync::API::Client::Hosts
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/hosts.rb
Instance Method Summary collapse
-
#create_host(options = {}) ⇒ BookingSync::API::Resource
Create a new host.
-
#edit_host(host, options = {}) ⇒ BookingSync::API::Resource
Edit a host.
-
#host(host) ⇒ BookingSync::API::Resource
Get a single host.
-
#hosts(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List hosts.
Instance Method Details
#create_host(options = {}) ⇒ BookingSync::API::Resource
Create a new host
32 33 34 |
# File 'lib/bookingsync/api/client/hosts.rb', line 32 def create_host( = {}) post(:hosts, hosts: []).pop end |
#edit_host(host, options = {}) ⇒ BookingSync::API::Resource
Edit a host
46 47 48 |
# File 'lib/bookingsync/api/client/hosts.rb', line 46 def edit_host(host, = {}) put("hosts/#{host}", hosts: []).pop end |
#host(host) ⇒ BookingSync::API::Resource
Get a single host
24 25 26 |
# File 'lib/bookingsync/api/client/hosts.rb', line 24 def host(host) get("hosts/#{host}").pop end |
#hosts(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List hosts
Returns all hosts supported in BookingSync.
15 16 17 |
# File 'lib/bookingsync/api/client/hosts.rb', line 15 def hosts( = {}, &block) paginate :hosts, , &block end |