Class: Paymill::Address
- Inherits:
-
Object
- Object
- Paymill::Address
- Defined in:
- lib/paymill/models/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street_address ⇒ Object
Returns the value of attribute street_address.
-
#street_address_addition ⇒ Object
Returns the value of attribute street_address_addition.
Instance Method Summary collapse
-
#initialize(arguments = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(arguments = {}) ⇒ Address
Returns a new instance of Address.
5 6 7 8 9 10 |
# File 'lib/paymill/models/address.rb', line 5 def initialize( arguments = {} ) arguments.each do |key, value| raise ArgumentError.new( "parameter #{key} is not allowed" ) unless Address.instance_methods( false ).include? key instance_variable_set( "@#{key}", ( Integer( value ) rescue value ) ) end end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def country @country end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def state @state end |
#street_address ⇒ Object
Returns the value of attribute street_address.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def street_address @street_address end |
#street_address_addition ⇒ Object
Returns the value of attribute street_address_addition.
3 4 5 |
# File 'lib/paymill/models/address.rb', line 3 def street_address_addition @street_address_addition end |