Module: BookingSync::API::Client::Sources
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/sources.rb
Instance Method Summary collapse
-
#create_source(options = {}) ⇒ BookingSync::API::Resource
Create a new source.
-
#edit_source(source, options = {}) ⇒ BookingSync::API::Resource
Edit a source.
-
#sources(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List sources.
Instance Method Details
#create_source(options = {}) ⇒ BookingSync::API::Resource
Create a new source
25 26 27 |
# File 'lib/bookingsync/api/client/sources.rb', line 25 def create_source( = {}) post(:sources, sources: []).pop end |
#edit_source(source, options = {}) ⇒ BookingSync::API::Resource
Edit a source
ID of the source to be updated exception is raised otherwise
39 40 41 |
# File 'lib/bookingsync/api/client/sources.rb', line 39 def edit_source(source, = {}) put("sources/#{source}", sources: []).pop end |
#sources(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List sources
Returns sources for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/sources.rb', line 17 def sources( = {}, &block) paginate :sources, , &block end |