Module: BookingSync::API::Client::Accounts
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/accounts.rb
Instance Method Summary collapse
-
#account(account, options = {}) ⇒ BookingSync::API::Resource
Get a single account.
-
#accounts(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List accounts.
Instance Method Details
#account(account, options = {}) ⇒ BookingSync::API::Resource
Get a single account
26 27 28 |
# File 'lib/bookingsync/api/client/accounts.rb', line 26 def account(account, = {}) get("accounts/#{account}", ).pop end |
#accounts(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List accounts
Returns all the accounts that the user is authenticated with.
15 16 17 |
# File 'lib/bookingsync/api/client/accounts.rb', line 15 def accounts( = {}, &block) paginate :accounts, , &block end |