Class: Freemium::Address
- Inherits:
-
Object
- Object
- Freemium::Address
- Defined in:
- lib/freemium/address.rb
Overview
eventually, this should mimic ActiveMerchant’s credit card object, with validation and errors, etc. for now it’s just a dumb (and therefore untested) data structure.
Instance Attribute Summary collapse
-
#address1 ⇒ Object
(also: #street)
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#email ⇒ Object
Returns the value of attribute email.
-
#ip_address ⇒ Object
Returns the value of attribute ip_address.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#state ⇒ Object
Returns the value of attribute state.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(options = {}) ⇒ Address
Returns a new instance of Address.
11 12 13 14 15 16 |
# File 'lib/freemium/address.rb', line 11 def initialize( = {}) .each do |key, value| setter = "#{key}=" self.send(setter, value) if self.respond_to? setter end end |
Instance Attribute Details
#address1 ⇒ Object Also known as: street
Returns the value of attribute address1.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def address2 @address2 end |
#city ⇒ Object
Returns the value of attribute city.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def country @country end |
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def email @email end |
#ip_address ⇒ Object
Returns the value of attribute ip_address.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def ip_address @ip_address end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def phone_number @phone_number end |
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def state @state end |
#zip ⇒ Object
Returns the value of attribute zip.
5 6 7 |
# File 'lib/freemium/address.rb', line 5 def zip @zip end |