Module: BookingSync::API::Client::RatesRules
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/rates_rules.rb
Instance Method Summary collapse
-
#create_rates_rule(rates_table, options = {}) ⇒ BookingSync::API::Resource
Create a new rates_rule.
-
#delete_rates_rule(rates_rule) ⇒ NilClass
Delete a rates_rule.
-
#edit_rates_rule(rates_rule, options = {}) ⇒ BookingSync::API::Resource
Edit a rates_rule.
-
#rates_rule(rates_rule, options = {}) ⇒ BookingSync::API::Resource
Get a single rates_rule.
-
#rates_rules(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rates rules.
Instance Method Details
#create_rates_rule(rates_table, options = {}) ⇒ BookingSync::API::Resource
Create a new rates_rule
38 39 40 |
# File 'lib/bookingsync/api/client/rates_rules.rb', line 38 def create_rates_rule(rates_table, = {}) post("rates_tables/#{rates_table}/rates_rules", rates_rules: []).pop end |
#delete_rates_rule(rates_rule) ⇒ NilClass
Delete a rates_rule
61 62 63 |
# File 'lib/bookingsync/api/client/rates_rules.rb', line 61 def delete_rates_rule(rates_rule) delete "rates_rules/#{rates_rule}" end |
#edit_rates_rule(rates_rule, options = {}) ⇒ BookingSync::API::Resource
Edit a rates_rule
52 53 54 |
# File 'lib/bookingsync/api/client/rates_rules.rb', line 52 def edit_rates_rule(rates_rule, = {}) put("rates_rules/#{rates_rule}", rates_rules: []).pop end |
#rates_rule(rates_rule, options = {}) ⇒ BookingSync::API::Resource
Get a single rates_rule
28 29 30 |
# File 'lib/bookingsync/api/client/rates_rules.rb', line 28 def rates_rule(rates_rule, = {}) get("rates_rules/#{rates_rule}", ).pop end |
#rates_rules(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rates rules
Returns rates rules for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/rates_rules.rb', line 17 def rates_rules( = {}, &block) paginate :rates_rules, , &block end |