Class: Whitehouse::Order::Address

Inherits:
Struct
  • Object
show all
Defined in:
lib/whitehouse/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addr1Object

Returns the value of attribute addr1

Returns:

  • (Object)

    the current value of addr1



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def addr1
  @addr1
end

#addr2Object

Returns the value of attribute addr2

Returns:

  • (Object)

    the current value of addr2



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def addr2
  @addr2
end

#cityObject

Returns the value of attribute city

Returns:

  • (Object)

    the current value of city



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def city
  @city
end

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def country
  @country
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def name
  @name
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def state
  @state
end

#zipObject

Returns the value of attribute zip

Returns:

  • (Object)

    the current value of zip



39
40
41
# File 'lib/whitehouse/order.rb', line 39

def zip
  @zip
end

Instance Method Details

#to_hashObject



40
41
42
43
44
45
46
47
48
49
# File 'lib/whitehouse/order.rb', line 40

def to_hash
  {"Name" => name,
   "Addr1" => addr1,
   "Addr2" => addr2,
   "City" => city,
   "State" => state,
   "Zip" => zip,
   "Country" => country || 'US'
  }
end