module BookingSync::API::Client::Destinations
Public Instance Methods
destination(destination, options = {})
click to toggle source
Get a single destination
@param destination [BookingSync::API::Resource|Integer] Destination or ID
of the destination.
@param options [Hash] A customizable set of query options. @option options [Array] fields: List of fields to be fetched. @return [BookingSync::API::Resource]
# File lib/bookingsync/api/client/destinations.rb, line 28 def destination(destination, options = {}) get("destinations/#{destination}", options).pop end
destinations(options = {}, &block)
click to toggle source
List destinations
Returns destinations for the account user is authenticated with. @param options [Hash] A customizable set of options. @option options [Array] fields: List of fields to be fetched. @return [Array<BookingSync::API::Resource>] Array of destinations.
@example Get the list of destinations for the current account
destinations = @api.destinations destinations.first.fullname # => {"en":"Europe, World"}
@example Get the list of destinations only with name and fullname for smaller response
@api.destinations(fields: [:name, :fullname])
@see developers.bookingsync.com/reference/endpoints/destinations/#list-destinations
# File lib/bookingsync/api/client/destinations.rb, line 17 def destinations(options = {}, &block) paginate :destinations, options, &block end