Class: AuthorizeNet::Address
- Inherits:
-
Object
- Object
- AuthorizeNet::Address
- Includes:
- Model
- Defined in:
- lib/authorize_net/addresses/address.rb
Overview
Models an address.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#company ⇒ Object
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#customer_address_id ⇒ Object
Returns the value of attribute customer_address_id.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street_address ⇒ Object
Returns the value of attribute street_address.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def city @city end |
#company ⇒ Object
Returns the value of attribute company.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def country @country end |
#customer_address_id ⇒ Object
Returns the value of attribute customer_address_id.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def customer_address_id @customer_address_id end |
#fax ⇒ Object
Returns the value of attribute fax.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def fax @fax end |
#first_name ⇒ Object
Returns the value of attribute first_name.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def last_name @last_name end |
#phone ⇒ Object
Returns the value of attribute phone.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def phone @phone end |
#state ⇒ Object
Returns the value of attribute state.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def state @state end |
#street_address ⇒ Object
Returns the value of attribute street_address.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def street_address @street_address end |
#zip ⇒ Object
Returns the value of attribute zip.
8 9 10 |
# File 'lib/authorize_net/addresses/address.rb', line 8 def zip @zip end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/authorize_net/addresses/address.rb', line 10 def to_hash hash = { :first_name => @first_name, :last_name => @last_name, :company => @company, :address => @street_address, :city => @city, :state => @state, :zip => @zip, :country => @country, :phone => @phone, :fax => @fax, :customer_address_id => @customer_address_id } hash.delete_if {|k, v| v.nil?} end |