Class: OnlinePayments::SDK::Domain::CrmToken

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#unique_account_identifierString

Returns the current value of unique_account_identifier.

Returns:

  • (String)

    the current value of unique_account_identifier



11
12
13
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 11

def 
  @unique_account_identifier
end

#unique_card_identifierString

Returns the current value of unique_card_identifier.

Returns:

  • (String)

    the current value of unique_card_identifier



11
12
13
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 11

def unique_card_identifier
  @unique_card_identifier
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 25

def from_hash(hash)
  super
  if hash.has_key? 'uniqueAccountIdentifier'
    @unique_account_identifier = hash['uniqueAccountIdentifier']
  end
  if hash.has_key? 'uniqueCardIdentifier'
    @unique_card_identifier = hash['uniqueCardIdentifier']
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/crm_token.rb', line 18

def to_h
  hash = super
  hash['uniqueAccountIdentifier'] = @unique_account_identifier unless @unique_account_identifier.nil?
  hash['uniqueCardIdentifier'] = @unique_card_identifier unless @unique_card_identifier.nil?
  hash
end