Class: Postmen::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Address

Returns a new instance of Address.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/postmen/address.rb', line 21

def initialize(options)
  @country = options[:country]
  @contact_name = options[:contact_name]
  @phone = options[:phone]
  @fax = options[:fax]
  @email = options[:email]
  @company_name = options[:company_name]
  @street1 = options[:street1]
  @street2 = options[:street2]
  @street3 = options[:street3]
  @city = options[:city]
  @state = options[:state]
  @type = options[:type]
  @postal_code = options[:postal_code]
  @type = options[:type]
  @tax_id = options[:tax_id]
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#company_nameObject (readonly)

Returns the value of attribute company_name.



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

def company_name
  @company_name
end

#contact_nameObject (readonly)

Returns the value of attribute contact_name.



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

def contact_name
  @contact_name
end

#countryObject (readonly)

Returns the value of attribute country.



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

def country
  @country
end

#emailObject (readonly)

Returns the value of attribute email.



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

def email
  @email
end

#faxObject (readonly)

Returns the value of attribute fax.



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

def fax
  @fax
end

#phoneObject (readonly)

Returns the value of attribute phone.



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

def phone
  @phone
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



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

def postal_code
  @postal_code
end

#stateObject (readonly)

Returns the value of attribute state.



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

def state
  @state
end

#street1Object (readonly)

Returns the value of attribute street1.



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

def street1
  @street1
end

#street2Object (readonly)

Returns the value of attribute street2.



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

def street2
  @street2
end

#street3Object (readonly)

Returns the value of attribute street3.



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

def street3
  @street3
end

#tax_idObject (readonly)

Returns the value of attribute tax_id.



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

def tax_id
  @tax_id
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end