Class: OnlinePayments::SDK::Domain::DetokenizedTokenResponse

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/detokenized_token_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#card_brandString

Returns the current value of card_brand.

Returns:

  • (String)

    the current value of card_brand



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def card_brand
  @card_brand
end

#card_expiry_dateString

Returns the current value of card_expiry_date.

Returns:

  • (String)

    the current value of card_expiry_date



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def card_expiry_date
  @card_expiry_date
end

#card_holder_nameString

Returns the current value of card_holder_name.

Returns:

  • (String)

    the current value of card_holder_name



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def card_holder_name
  @card_holder_name
end

#encrypted_card_numberString

Returns the current value of encrypted_card_number.

Returns:

  • (String)

    the current value of encrypted_card_number



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def encrypted_card_number
  @encrypted_card_number
end

#payment_idString

Returns the current value of payment_id.

Returns:

  • (String)

    the current value of payment_id



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def payment_id
  @payment_id
end

#scheme_reference_dataString

Returns the current value of scheme_reference_data.

Returns:

  • (String)

    the current value of scheme_reference_data



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def scheme_reference_data
  @scheme_reference_data
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



16
17
18
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 16

def token
  @token
end

Instance Method Details

#from_hash(hash) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 45

def from_hash(hash)
  super
  if hash.has_key? 'cardBrand'
    @card_brand = hash['cardBrand']
  end
  if hash.has_key? 'cardExpiryDate'
    @card_expiry_date = hash['cardExpiryDate']
  end
  if hash.has_key? 'cardHolderName'
    @card_holder_name = hash['cardHolderName']
  end
  if hash.has_key? 'encryptedCardNumber'
    @encrypted_card_number = hash['encryptedCardNumber']
  end
  if hash.has_key? 'paymentId'
    @payment_id = hash['paymentId']
  end
  if hash.has_key? 'schemeReferenceData'
    @scheme_reference_data = hash['schemeReferenceData']
  end
  if hash.has_key? 'token'
    @token = hash['token']
  end
end

#to_hHash

Returns:

  • (Hash)


33
34
35
36
37
38
39
40
41
42
43
# File 'lib/onlinepayments/sdk/domain/detokenized_token_response.rb', line 33

def to_h
  hash = super
  hash['cardBrand'] = @card_brand unless @card_brand.nil?
  hash['cardExpiryDate'] = @card_expiry_date unless @card_expiry_date.nil?
  hash['cardHolderName'] = @card_holder_name unless @card_holder_name.nil?
  hash['encryptedCardNumber'] = @encrypted_card_number unless @encrypted_card_number.nil?
  hash['paymentId'] = @payment_id unless @payment_id.nil?
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
  hash['token'] = @token unless @token.nil?
  hash
end