Class: ConstantContact::Components::Note

Inherits:
Component
  • Object
show all
Defined in:
lib/constantcontact/components/contacts/note.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#created_dateObject

Returns the value of attribute created_date



10
11
12
# File 'lib/constantcontact/components/contacts/note.rb', line 10

def created_date
  @created_date
end

#idObject

Returns the value of attribute id



10
11
12
# File 'lib/constantcontact/components/contacts/note.rb', line 10

def id
  @id
end

#modified_dateObject

Returns the value of attribute modified_date



10
11
12
# File 'lib/constantcontact/components/contacts/note.rb', line 10

def modified_date
  @modified_date
end

#noteObject

Returns the value of attribute note



10
11
12
# File 'lib/constantcontact/components/contacts/note.rb', line 10

def note
  @note
end

Class Method Details

.create(props) ⇒ Object

Factory method to create a Note object from a json string

Parameters:

  • props (String)
    • properties to create object from

Returns:

  • Note



15
16
17
18
19
20
21
22
23
# File 'lib/constantcontact/components/contacts/note.rb', line 15

def self.create(props)
  note = Note.new
  if props
    props.each do |key, value|
      note.send("#{key}=", value)
    end
  end
  note
end