Module: BookingSync::API::Client::Clients
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/clients.rb
Instance Method Summary collapse
-
#client(client, options = {}) ⇒ BookingSync::API::Resource
Get a single client.
-
#clients(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List clients.
-
#create_client(options = {}) ⇒ BookingSync::API::Resource
Create a new client.
-
#edit_client(client, options = {}) ⇒ BookingSync::API::Resource
Edit a client.
Instance Method Details
#client(client, options = {}) ⇒ BookingSync::API::Resource
Get a single client
28 29 30 |
# File 'lib/bookingsync/api/client/clients.rb', line 28 def client(client, = {}) get("clients/#{client}", ).pop end |
#clients(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List clients
Returns clients for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/clients.rb', line 17 def clients( = {}, &block) paginate :clients, , &block end |
#create_client(options = {}) ⇒ BookingSync::API::Resource
Create a new client
36 37 38 |
# File 'lib/bookingsync/api/client/clients.rb', line 36 def create_client( = {}) post(:clients, clients: []).pop end |
#edit_client(client, options = {}) ⇒ BookingSync::API::Resource
Edit a client
49 50 51 |
# File 'lib/bookingsync/api/client/clients.rb', line 49 def edit_client(client, = {}) put("clients/#{client}", clients: []).pop end |