Class: AuthorizeNet::CIM::PaymentProfile
- Inherits:
-
Object
- Object
- AuthorizeNet::CIM::PaymentProfile
- Includes:
- Model
- Defined in:
- lib/authorize_net/cim/payment_profile.rb
Overview
Models a payment profile.
Defined Under Namespace
Modules: CustomerType
Instance Attribute Summary collapse
-
#billing_address ⇒ Object
Returns the value of attribute billing_address.
-
#cust_type ⇒ Object
Returns the value of attribute cust_type.
-
#customer_payment_profile_id ⇒ Object
Returns the value of attribute customer_payment_profile_id.
-
#payment_method ⇒ Object
Returns the value of attribute payment_method.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#billing_address ⇒ Object
Returns the value of attribute billing_address.
12 13 14 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 12 def billing_address @billing_address end |
#cust_type ⇒ Object
Returns the value of attribute cust_type.
12 13 14 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 12 def cust_type @cust_type end |
#customer_payment_profile_id ⇒ Object
Returns the value of attribute customer_payment_profile_id.
12 13 14 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 12 def customer_payment_profile_id @customer_payment_profile_id end |
#payment_method ⇒ Object
Returns the value of attribute payment_method.
12 13 14 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 12 def payment_method @payment_method end |
Instance Method Details
#to_hash ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 25 def to_hash hash = { :cust_type => @cust_type, :customer_payment_profile_id => @customer_payment_profile_id } hash.delete_if {|k, v| v.nil?} hash.merge!(@billing_address.to_hash) unless @billing_address.nil? hash.merge!(@payment_method.to_hash) unless @payment_method.nil? hash end |