Module: BookingSync::API::Client::Inquiries

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

Instance Method Summary collapse

Instance Method Details

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

Create a new inquiry

Parameters:

  • rental (BookingSync::API::Resource)

    Rental or ID of the rental for which an inquiry will be created.

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

    Inquiry attributes.

Returns:



31
32
33
# File 'lib/bookingsync/api/client/inquiries.rb', line 31

def create_inquiry(rental, options = {})
  post("rentals/#{rental}/inquiries", inquiries: [options]).pop
end

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

List inquiries

Return list of inquiries for current account.

Parameters:

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

    A customizable set of query options.

Returns:

See Also:



10
11
12
# File 'lib/bookingsync/api/client/inquiries.rb', line 10

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

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

Get a single inquiry

Parameters:

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

    Inquiry or ID of the inquiry.

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

    A customizable set of query options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:



21
22
23
# File 'lib/bookingsync/api/client/inquiries.rb', line 21

def inquiry(inquiry, options = {})
  get("inquiries/#{inquiry}", options).pop
end