Class: TaxCloud::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Address

Returns a new instance of Address.



7
8
9
10
11
12
# File 'lib/address.rb', line 7

def initialize(attrs = {})
  attrs.each do |sym, val|
    self.send "#{sym}=", val
  end

end

Instance Attribute Details

#address1Object

Returns the value of attribute address1.



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

def address1
  @address1
end

#address2Object

Returns the value of attribute address2.



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

def address2
  @address2
end

#cityObject

Returns the value of attribute city.



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

def city
  @city
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

#zip4Object

Returns the value of attribute zip4.



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

def zip4
  @zip4
end

#zip5Object

Returns the value of attribute zip5.



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

def zip5
  @zip5
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/address.rb', line 14

def to_hash
  {
      'Address1' => address1,
      'Address2' => address2,
      'City' => city,
      'State' => state,
      'Zip5' => zip5,
      'Zip4' => zip4
  }
end