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.



11
12
13
# File 'lib/authorize_net/cim/payment_profile.rb', line 11

def billing_address
  @billing_address
end

#cust_typeObject

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_idObject

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_methodObject

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_hashObject



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