Class: Outreach::Sequence
- Inherits:
-
Object
- Object
- Outreach::Sequence
- Extended by:
- Model
- Defined in:
- lib/outreach-ruby/sequence.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#response ⇒ Object
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Sequence
constructor
A new instance of Sequence.
Constructor Details
#initialize(attrs) ⇒ Sequence
Returns a new instance of Sequence.
9 10 11 12 13 |
# File 'lib/outreach-ruby/sequence.rb', line 9 def initialize(attrs) @id = attrs['id'] @name = attrs['name'] @response = attrs['response'] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/outreach-ruby/sequence.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/outreach-ruby/sequence.rb', line 7 def name @name end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/outreach-ruby/sequence.rb', line 7 def response @response end |
Class Method Details
.build_from_attributes_hash(data) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/outreach-ruby/sequence.rb', line 15 def self.build_from_attributes_hash(data) result = {} result['id'] = data['id'] result['name'] = nested_hash_value( data, %w[attributes name] ) result['response'] = data new(result) end |