Class: Worldline::Acquiring::SDK::V1::Domain::TerminalData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::TerminalData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb
Instance Attribute Summary collapse
-
#allow_single_tap ⇒ true/false
The current value of allow_single_tap.
-
#card_reading_capabilities ⇒ Array<String>
The current value of card_reading_capabilities.
-
#cardholder_activated_terminal_level ⇒ String
The current value of cardholder_activated_terminal_level.
-
#is_attended_terminal ⇒ true/false
The current value of is_attended_terminal.
-
#pin_entry_capability ⇒ String
The current value of pin_entry_capability.
-
#terminal_id ⇒ String
The current value of terminal_id.
-
#terminal_location ⇒ String
The current value of terminal_location.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#allow_single_tap ⇒ true/false
Returns 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_capabilities ⇒ Array<String>
Returns 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_level ⇒ String
Returns 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_terminal ⇒ true/false
Returns 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_capability ⇒ String
Returns 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_id ⇒ String
Returns 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_location ⇒ String
Returns 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_h ⇒ 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 |