Class: Hubspot::ConversationThread
- Inherits:
-
Object
- Object
- Hubspot::ConversationThread
- Defined in:
- lib/hubspot/conversation_thread.rb
Overview
Constant Summary collapse
- THREAD_PATH =
'/conversations/v3/conversations/threads/:thread_id'
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response_hash) ⇒ ConversationThread
constructor
A new instance of ConversationThread.
Constructor Details
#initialize(response_hash) ⇒ ConversationThread
14 15 16 17 |
# File 'lib/hubspot/conversation_thread.rb', line 14 def initialize(response_hash) @id = response_hash['id'] @properties = response_hash.deep_symbolize_keys end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
12 13 14 |
# File 'lib/hubspot/conversation_thread.rb', line 12 def id @id end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
12 13 14 |
# File 'lib/hubspot/conversation_thread.rb', line 12 def properties @properties end |
Class Method Details
.find(thread_id, with_associations: false) ⇒ Object
20 21 22 23 24 |
# File 'lib/hubspot/conversation_thread.rb', line 20 def find(thread_id, with_associations: false) association = with_associations ? ['TICKET'] : [] response = Hubspot::Connection.get_json(THREAD_PATH, thread_id:, association:) new(response) end |