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.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def address @address end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def description @description end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def email @email end |
#fax ⇒ Object
Returns the value of attribute fax.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def fax @fax end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def id @id end |
#ip ⇒ Object
Returns the value of attribute ip.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def ip @ip end |
#phone ⇒ Object
Returns the value of attribute phone.
7 8 9 |
# File 'lib/authorize_net/customer.rb', line 7 def phone @phone end |
Instance Method Details
#to_hash ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/authorize_net/customer.rb', line 9 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 |