Class: Hashblue::API::Contact
- Defined in:
- lib/hashblue/api/contact.rb
Overview
A Contact represents another number with which the Subscriber has sent or received Messages. It should not be instantiated directly; instead, use Subscriber#contacts to retrieve the set for a Subscriber.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Contact
constructor
:nodoc:.
-
#messages(options = {}) ⇒ Object
Returns an Array of Message objects corresponding to the conversation between the Subscriber and this Contact.
Methods inherited from Model
from_json, #get, #id, #method_missing, model_name, #post, #to_param
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Hashblue::API::Model
Instance Method Details
#messages(options = {}) ⇒ Object
Returns an Array of Message objects corresponding to the conversation between the Subscriber and this Contact.
The options available to this message correspond to those available for the collections on Subscriber.
17 18 19 |
# File 'lib/hashblue/api/contact.rb', line 17 def (={}) Hashblue::API::Message.from_json(get("#{_path}/messages.json", )) end |