Class: AuthorizeNet::Customer
- Inherits:
-
Object
- Object
- AuthorizeNet::Customer
- Includes:
- Model
- Defined in:
- lib/authorize_net/customer.rb
Overview
Models a customer.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#description ⇒ Object
Returns the value of attribute description.
-
#email ⇒ Object
Returns the value of attribute email.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#id ⇒ Object
Returns the value of attribute id.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#phone ⇒ Object
Returns the value of attribute phone.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def address @address end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def description @description end |
#email ⇒ Object
Returns the value of attribute email.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def email @email end |
#fax ⇒ Object
Returns the value of attribute fax.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def fax @fax end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def id @id end |
#ip ⇒ Object
Returns the value of attribute ip.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def ip @ip end |
#phone ⇒ Object
Returns the value of attribute phone.
8 9 10 |
# File 'lib/authorize_net/customer.rb', line 8 def phone @phone end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/authorize_net/customer.rb', line 10 def to_hash hash = { :phone => @phone, :fax => @fax, :email => @email, :cust_id => @id, :customer_ip => @ip, :description => @description, :customer_profile_id => @customer_profile_id } hash.delete_if {|k, v| v.nil?} hash.merge!(@address.to_hash) unless @address.nil? hash end |