Module: BookingSync::API::Client::RatesRules

Included in:
BookingSync::API::Client
Defined in:
lib/bookingsync/api/client/rates_rules.rb

Instance Method Summary collapse

Instance Method Details

#rates_rules(options = {}, &block) ⇒ Array<BookingSync::API::Resource>

List rates rules

Returns rates rules for the account user is authenticated with.

Examples:

Get the list of rates rules for the current account

rates_rules = @api.rates_rules
rates_rules.first.always_applied # => true

Get the list of rates rules only with always_applied and kind for smaller response

@api.rates_rules(fields: [:always_applied, :kind])

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:

See Also:



17
18
19
# File 'lib/bookingsync/api/client/rates_rules.rb', line 17

def rates_rules(options = {}, &block)
  paginate :rates_rules, options, &block
end