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.
11 12 13 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 11 def billing_address @billing_address end |
#cust_type ⇒ Object
Returns the value of attribute cust_type.
11 12 13 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 11 def cust_type @cust_type end |
#customer_payment_profile_id ⇒ Object
Returns the value of attribute customer_payment_profile_id.
11 12 13 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 11 def customer_payment_profile_id @customer_payment_profile_id end |
#payment_method ⇒ Object
Returns the value of attribute payment_method.
11 12 13 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 11 def payment_method @payment_method end |
Instance Method Details
#to_hash ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/authorize_net/cim/payment_profile.rb', line 24 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 |