Class: Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#cardholder_nameString

Returns the current value of cardholder_name.

Returns:

  • (String)

    the current value of cardholder_name



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def cardholder_name
  @cardholder_name
end

#cryptogramString

Returns the current value of cryptogram.

Returns:

  • (String)

    the current value of cryptogram



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def cryptogram
  @cryptogram
end

#dpanString

Returns the current value of dpan.

Returns:

  • (String)

    the current value of dpan



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def dpan
  @dpan
end

#eciInteger

Returns the current value of eci.

Returns:

  • (Integer)

    the current value of eci



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def eci
  @eci
end

#expiry_dateString

Returns the current value of expiry_date.

Returns:

  • (String)

    the current value of expiry_date



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def expiry_date
  @expiry_date
end

#panString

Returns the current value of pan.

Returns:

  • (String)

    the current value of pan



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def pan
  @pan
end

#payment_methodString

Returns the current value of payment_method.

Returns:

  • (String)

    the current value of payment_method



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 18

def payment_method
  @payment_method
end

Instance Method Details

#from_hash(hash) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 47

def from_hash(hash)
  super
  if hash.has_key? 'cardholderName'
    @cardholder_name = hash['cardholderName']
  end
  if hash.has_key? 'cryptogram'
    @cryptogram = hash['cryptogram']
  end
  if hash.has_key? 'dpan'
    @dpan = hash['dpan']
  end
  if hash.has_key? 'eci'
    @eci = hash['eci']
  end
  if hash.has_key? 'expiryDate'
    @expiry_date = hash['expiryDate']
  end
  if hash.has_key? 'pan'
    @pan = hash['pan']
  end
  if hash.has_key? 'paymentMethod'
    @payment_method = hash['paymentMethod']
  end
end

#to_hHash

Returns:

  • (Hash)


35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb', line 35

def to_h
  hash = super
  hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
  hash['cryptogram'] = @cryptogram unless @cryptogram.nil?
  hash['dpan'] = @dpan unless @dpan.nil?
  hash['eci'] = @eci unless @eci.nil?
  hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
  hash['pan'] = @pan unless @pan.nil?
  hash['paymentMethod'] = @payment_method unless @payment_method.nil?
  hash
end