Module: HomeAway::API::Domain::AddMessage

Included in:
Client
Defined in:
lib/homeaway/api/domain/add_message.rb

Instance Method Summary collapse

Instance Method Details

#add_message(conversation_id, message, opts = {}) ⇒ HomeAway::API::Response

Note:

user must be logged in via 3 legged oauth to call this function without error

Add a Message to a Conversation

analogous to calling a POST on API url /public/addMessage

Headers:

  • X-HomeAway-DisplayLocale: If a locale is not specified in a query param, it will be searched for in the X-HomeAway-DisplayLocale Header. If it is not supplied in either area the default locale of the user will be selected if it exists. Otherwise the Accept-Language Header will be used.

Parameters:

  • conversation_id (String)

    The Conversation UUID to load.

  • message (String)

    The body of the message to add to the given conversation.

Returns:



33
34
35
36
37
38
39
40
41
# File 'lib/homeaway/api/domain/add_message.rb', line 33

def add_message(conversation_id, message, opts={})
  body = {
      'message' => message.to_s,
  }.merge(HomeAway::API::Util::Validators.query_keys(opts))
  params = {
      'conversationId' => HomeAway::API::Util::Validators.uuid(conversation_id)
  }
  post '/public/addMessage', body, params
end