Class: ConstantContact::Components::AccountAddress

Inherits:
Component
  • Object
show all
Defined in:
lib/constantcontact/components/account/account_address.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#cityObject

Returns the value of attribute city



10
11
12
# File 'lib/constantcontact/components/account/account_address.rb', line 10

def city
  @city
end

#country_codeObject

Returns the value of attribute country_code



10
11
12
# File 'lib/constantcontact/components/account/account_address.rb', line 10

def country_code
  @country_code
end

#line1Object

Returns the value of attribute line1



10
11
12
# File 'lib/constantcontact/components/account/account_address.rb', line 10

def line1
  @line1
end

#postal_codeObject

Returns the value of attribute postal_code



10
11
12
# File 'lib/constantcontact/components/account/account_address.rb', line 10

def postal_code
  @postal_code
end

#state_codeObject

Returns the value of attribute state_code



10
11
12
# File 'lib/constantcontact/components/account/account_address.rb', line 10

def state_code
  @state_code
end

Class Method Details

.create(props) ⇒ AccountAddress

Factory method to create an AccountAddress object from a json string

Parameters:

  • props (Hash)
    • properties to create object from

Returns:



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

def self.create(props)
  obj = AccountAddress.new
  if props
    props.each do |key, value|
      obj.send("#{key}=", value) if obj.respond_to? key
    end
  end
  obj
end