Module: BookingSync::API::Client::BookingsFees

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

Instance Method Summary collapse

Instance Method Details

#bookings_fee(bookings_fee, options = {}) ⇒ BookingSync::API::Resource

Get a single bookings fee

Parameters:

  • bookings_fee (BookingSync::API::Resource|Integer)

    BookingsFee or ID of the bookings fee.

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

    A customizable set of query options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:



28
29
30
# File 'lib/bookingsync/api/client/bookings_fees.rb', line 28

def bookings_fee(bookings_fee, options = {})
  get("bookings_fees/#{bookings_fee}", options).pop
end

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

List bookings fees

Returns bookings fees for the account user is authenticated with.

Examples:

Get the list of bookings fees for the current account

bookings_fees = @api.bookings_fees
bookings_fees.first.times_booked # => 1

Get the list of bookings fees only with times_booked for smaller response

@api.bookings_fees(fields: [:times_booked])

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/bookings_fees.rb', line 17

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