Class: OnlinePayments::SDK::Domain::DecryptedPaymentData

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/decrypted_payment_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::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



14
15
16
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14

def cardholder_name
  @cardholder_name
end

#cryptogramString

Returns the current value of cryptogram.

Returns:

  • (String)

    the current value of cryptogram



14
15
16
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14

def cryptogram
  @cryptogram
end

#dpanString

Returns the current value of dpan.

Returns:

  • (String)

    the current value of dpan



14
15
16
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14

def dpan
  @dpan
end

#eciInteger

Returns the current value of eci.

Returns:

  • (Integer)

    the current value of eci



14
15
16
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14

def eci
  @eci
end

#expiry_dateString

Returns the current value of expiry_date.

Returns:

  • (String)

    the current value of expiry_date



14
15
16
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 14

def expiry_date
  @expiry_date
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 32

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

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
28
29
30
# File 'lib/onlinepayments/sdk/domain/decrypted_payment_data.rb', line 22

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
end