Class: Worldline::Acquiring::SDK::V1::Domain::TerminalData

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#allow_single_taptrue/false

Returns the current value of allow_single_tap.

Returns:

  • (true/false)

    the current value of allow_single_tap



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def allow_single_tap
  @allow_single_tap
end

#card_reading_capabilitiesArray<String>

Returns the current value of card_reading_capabilities.

Returns:

  • (Array<String>)

    the current value of card_reading_capabilities



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def card_reading_capabilities
  @card_reading_capabilities
end

#cardholder_activated_terminal_levelString

Returns the current value of cardholder_activated_terminal_level.

Returns:

  • (String)

    the current value of cardholder_activated_terminal_level



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def cardholder_activated_terminal_level
  @cardholder_activated_terminal_level
end

#is_attended_terminaltrue/false

Returns the current value of is_attended_terminal.

Returns:

  • (true/false)

    the current value of is_attended_terminal



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def is_attended_terminal
  @is_attended_terminal
end

#pin_entry_capabilityString

Returns the current value of pin_entry_capability.

Returns:

  • (String)

    the current value of pin_entry_capability



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def pin_entry_capability
  @pin_entry_capability
end

#terminal_idString

Returns the current value of terminal_id.

Returns:

  • (String)

    the current value of terminal_id



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def terminal_id
  @terminal_id
end

#terminal_locationString

Returns the current value of terminal_location.

Returns:

  • (String)

    the current value of terminal_location



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 18

def terminal_location
  @terminal_location
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
71
72
73
74
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 47

def from_hash(hash)
  super
  if hash.has_key? 'allowSingleTap'
    @allow_single_tap = hash['allowSingleTap']
  end
  if hash.has_key? 'cardReadingCapabilities'
    raise TypeError, "value '%s' is not an Array" % [hash['cardReadingCapabilities']] unless hash['cardReadingCapabilities'].is_a? Array
    @card_reading_capabilities = []
    hash['cardReadingCapabilities'].each do |e|
      @card_reading_capabilities << e
    end
  end
  if hash.has_key? 'cardholderActivatedTerminalLevel'
    @cardholder_activated_terminal_level = hash['cardholderActivatedTerminalLevel']
  end
  if hash.has_key? 'isAttendedTerminal'
    @is_attended_terminal = hash['isAttendedTerminal']
  end
  if hash.has_key? 'pinEntryCapability'
    @pin_entry_capability = hash['pinEntryCapability']
  end
  if hash.has_key? 'terminalId'
    @terminal_id = hash['terminalId']
  end
  if hash.has_key? 'terminalLocation'
    @terminal_location = hash['terminalLocation']
  end
end

#to_hHash

Returns:

  • (Hash)


35
36
37
38
39
40
41
42
43
44
45
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 35

def to_h
  hash = super
  hash['allowSingleTap'] = @allow_single_tap unless @allow_single_tap.nil?
  hash['cardReadingCapabilities'] = @card_reading_capabilities unless @card_reading_capabilities.nil?
  hash['cardholderActivatedTerminalLevel'] = @cardholder_activated_terminal_level unless @cardholder_activated_terminal_level.nil?
  hash['isAttendedTerminal'] = @is_attended_terminal unless @is_attended_terminal.nil?
  hash['pinEntryCapability'] = @pin_entry_capability unless @pin_entry_capability.nil?
  hash['terminalId'] = @terminal_id unless @terminal_id.nil?
  hash['terminalLocation'] = @terminal_location unless @terminal_location.nil?
  hash
end