Class: Reggora::Conversation
- Inherits:
-
Object
- Object
- Reggora::Conversation
- Defined in:
- lib/reggora/Entity/Lender/conversation.rb
Instance Method Summary collapse
-
#find_by_id(id) ⇒ Object
returns a Conversation object.
-
#initialize(client) ⇒ Conversation
constructor
A new instance of Conversation.
-
#send_message(id, message_params) ⇒ Object
Sends a message in the specified conversation.
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 (id, ) @client.post("/#{@model}/#{id}", ) end |