Class: ConstantContact::Components::Address
- Defined in:
- lib/constantcontact/components/contacts/address.rb
Instance Attribute Summary collapse
-
#address_type ⇒ Object
Returns the value of attribute address_type.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#id ⇒ Object
Returns the value of attribute id.
-
#line1 ⇒ Object
Returns the value of attribute line1.
-
#line2 ⇒ Object
Returns the value of attribute line2.
-
#line3 ⇒ Object
Returns the value of attribute line3.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
-
#state_code ⇒ Object
Returns the value of attribute state_code.
-
#sub_postal_code ⇒ Object
Returns the value of attribute sub_postal_code.
Class Method Summary collapse
-
.create(props) ⇒ Address
Factory method to create an Address object from a json string.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#address_type ⇒ Object
Returns the value of attribute address_type
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def address_type @address_type end |
#city ⇒ Object
Returns the value of attribute city
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def city @city end |
#country_code ⇒ Object
Returns the value of attribute country_code
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def country_code @country_code end |
#id ⇒ Object
Returns the value of attribute id
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def id @id end |
#line1 ⇒ Object
Returns the value of attribute line1
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def line1 @line1 end |
#line2 ⇒ Object
Returns the value of attribute line2
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def line2 @line2 end |
#line3 ⇒ Object
Returns the value of attribute line3
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def line3 @line3 end |
#postal_code ⇒ Object
Returns the value of attribute postal_code
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def state @state end |
#state_code ⇒ Object
Returns the value of attribute state_code
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def state_code @state_code end |
#sub_postal_code ⇒ Object
Returns the value of attribute sub_postal_code
10 11 12 |
# File 'lib/constantcontact/components/contacts/address.rb', line 10 def sub_postal_code @sub_postal_code end |
Class Method Details
.create(props) ⇒ Address
Factory method to create an Address object from a json string
16 17 18 19 20 21 22 23 24 |
# File 'lib/constantcontact/components/contacts/address.rb', line 16 def self.create(props) obj = Address.new if props props.each do |key, value| obj.send("#{key}=", value) if obj.respond_to? key end end obj end |