Class: Fishbowl::Objects::Address

Inherits:
BaseObject show all
Defined in:
lib/fishbowl/objects/address.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#send_request

Constructor Details

#initialize(address_xml) ⇒ Address

Returns a new instance of Address.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fishbowl/objects/address.rb', line 11

def initialize(address_xml)
  @xml = address_xml
  parse_attributes

  @temp_account
  @state = get_state(address_xml)
  @country = get_country(address_xml)
  @address_information_list = get_address_information(address_xml)

  self
end

Instance Attribute Details

#address_information_listObject (readonly)

Returns the value of attribute address_information_list.



5
6
7
# File 'lib/fishbowl/objects/address.rb', line 5

def address_information_list
  @address_information_list
end

#attnObject (readonly)

Returns the value of attribute attn.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def attn
  @attn
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



5
6
7
# File 'lib/fishbowl/objects/address.rb', line 5

def country
  @country
end

#db_idObject (readonly)

Returns the value of attribute db_id.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def db_id
  @db_id
end

#defaultObject (readonly)

Returns the value of attribute default.



4
5
6
# File 'lib/fishbowl/objects/address.rb', line 4

def default
  @default
end

#location_group_idObject (readonly)

Returns the value of attribute location_group_id.



4
5
6
# File 'lib/fishbowl/objects/address.rb', line 4

def location_group_id
  @location_group_id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def name
  @name
end

#residentialObject (readonly)

Returns the value of attribute residential.



4
5
6
# File 'lib/fishbowl/objects/address.rb', line 4

def residential
  @residential
end

#stateObject (readonly)

Returns the value of attribute state.



4
5
6
# File 'lib/fishbowl/objects/address.rb', line 4

def state
  @state
end

#streetObject (readonly)

Returns the value of attribute street.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def street
  @street
end

#temp_accountObject (readonly)

Returns the value of attribute temp_account.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def 
  @temp_account
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/fishbowl/objects/address.rb', line 4

def type
  @type
end

#zipObject (readonly)

Returns the value of attribute zip.



3
4
5
# File 'lib/fishbowl/objects/address.rb', line 3

def zip
  @zip
end

Class Method Details

.attributesObject



7
8
9
# File 'lib/fishbowl/objects/address.rb', line 7

def self.attributes
  %w{ID Name Attn Street City Zip LocationGroupID Default Residential Type}
end