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_table(rates_table, options = {}) ⇒ BookingSync::API::Resource
Get a single 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
36 37 38 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 36 def create_rates_table( = {}) post(:rates_tables, rates_tables: []).pop end |
#delete_rates_table(rates_table) ⇒ NilClass
Delete a rates_table
59 60 61 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 59 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
50 51 52 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 50 def edit_rates_table(rates_table, = {}) put("rates_tables/#{rates_table}", rates_tables: []).pop end |
#rates_table(rates_table, options = {}) ⇒ BookingSync::API::Resource
Get a single rates_table
28 29 30 |
# File 'lib/bookingsync/api/client/rates_tables.rb', line 28 def rates_table(rates_table, = {}) get("rates_tables/#{rates_table}", ).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 |