Class: AuthorizeNet::CIM::PaymentProfile

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Model

#initialize, #to_a

Instance Attribute Details

#billing_addressObject

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_typeObject

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_idObject

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_methodObject

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_hashObject



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