Class: Reggora::Conversation

Inherits:
Object
  • Object
show all
Defined in:
lib/reggora/Entity/Lender/conversation.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Conversation

Returns a new instance of Conversation.



3
4
5
6
# File 'lib/reggora/Entity/Lender/conversation.rb', line 3

def initialize(client)
  @model = 'conversation'
  @client = client
end

Instance Method Details

#find_by_id(id) ⇒ Object

returns a Conversation object



8
9
10
# File 'lib/reggora/Entity/Lender/conversation.rb', line 8

def find_by_id(id)
  @client.get("/#{@model}/#{id}")
end

#send_message(id, message_params) ⇒ Object

Sends a message in the specified conversation



13
14
15
# File 'lib/reggora/Entity/Lender/conversation.rb', line 13

def send_message(id, message_params)
  @client.post("/#{@model}/#{id}", message_params)
end