Class: ConstantContact::Components::AccountInfo
- Defined in:
- lib/constantcontact/components/account/account_info.rb
Instance Attribute Summary collapse
-
#company_logo ⇒ Object
Returns the value of attribute company_logo.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#organization_addresses ⇒ Object
Returns the value of attribute organization_addresses.
-
#organization_name ⇒ Object
Returns the value of attribute organization_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#state_code ⇒ Object
Returns the value of attribute state_code.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#website ⇒ Object
Returns the value of attribute website.
Class Method Summary collapse
-
.create(props) ⇒ AccountInfo
Factory method to create an AccountInfo object from a json string.
Instance Method Summary collapse
-
#initialize ⇒ AccountInfo
constructor
Class constructor.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Constructor Details
#initialize ⇒ AccountInfo
Class constructor
15 16 |
# File 'lib/constantcontact/components/account/account_info.rb', line 15 def initialize end |
Instance Attribute Details
#company_logo ⇒ Object
Returns the value of attribute company_logo
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def company_logo @company_logo end |
#country_code ⇒ Object
Returns the value of attribute country_code
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def country_code @country_code end |
#email ⇒ Object
Returns the value of attribute email
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def last_name @last_name end |
#organization_addresses ⇒ Object
Returns the value of attribute organization_addresses
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def organization_addresses @organization_addresses end |
#organization_name ⇒ Object
Returns the value of attribute organization_name
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def organization_name @organization_name end |
#phone ⇒ Object
Returns the value of attribute phone
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def phone @phone end |
#state_code ⇒ Object
Returns the value of attribute state_code
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def state_code @state_code end |
#time_zone ⇒ Object
Returns the value of attribute time_zone
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def time_zone @time_zone end |
#website ⇒ Object
Returns the value of attribute website
10 11 12 |
# File 'lib/constantcontact/components/account/account_info.rb', line 10 def website @website end |
Class Method Details
.create(props) ⇒ AccountInfo
Factory method to create an AccountInfo object from a json string
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/constantcontact/components/account/account_info.rb', line 21 def self.create(props) obj = AccountInfo.new if props props.each do |key, value| key = key.to_s if key == 'organization_addresses' value = value || [] obj.organization_addresses = value.collect{|address| Components::AccountAddress.create(address) } else obj.send("#{key}=", value) if obj.respond_to? key end end end obj end |