Module: BookingSync::API::Client::RatesTables
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/rates_tables.rb
Instance Method Summary collapse
-
#create_rates_table(options = {}) ⇒ BookingSync::API::Resource
Create a new rates_table.
-
#delete_rates_table(rates_table) ⇒ NilClass
Delete a rates_table.
-
#edit_rates_table(rates_table, options = {}) ⇒ BookingSync::API::Resource
Edit a rates_table.
-
#rates_tables(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rates table.
Instance Method Details
#create_rates_table(options = {}) ⇒ BookingSync::API::Resource
Create a new rates_table
25 26 27 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 25 def create_rates_table( = {}) post(:rates_tables, rates_tables: []).pop end |
#delete_rates_table(rates_table) ⇒ NilClass
Delete a rates_table
48 49 50 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 48 def delete_rates_table(rates_table) delete "rates_tables/#{rates_table}" end |
#edit_rates_table(rates_table, options = {}) ⇒ BookingSync::API::Resource
Edit a rates_table
ID of the rates table to be updated exception is raised otherwise
39 40 41 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 39 def edit_rates_table(rates_table, = {}) put("rates_tables/#{rates_table}", rates_tables: []).pop end |
#rates_tables(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rates table
Returns rates tables for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 17 def rates_tables( = {}, &block) paginate :rates_tables, , &block end |