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.
-
#is_offline_approved ⇒ true/false
The current value of is_offline_approved.
-
#offline_authorization_response_code ⇒ String
The current value of offline_authorization_response_code.
-
#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.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def allow_single_tap @allow_single_tap end |
#card_reading_capabilities ⇒ Array<String>
Returns the current value of card_reading_capabilities.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def card_reading_capabilities @card_reading_capabilities end |
#cardholder_activated_terminal_level ⇒ String
Returns the current value of cardholder_activated_terminal_level.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def cardholder_activated_terminal_level @cardholder_activated_terminal_level end |
#is_attended_terminal ⇒ true/false
Returns the current value of is_attended_terminal.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def is_attended_terminal @is_attended_terminal end |
#is_offline_approved ⇒ true/false
Returns the current value of is_offline_approved.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def is_offline_approved @is_offline_approved end |
#offline_authorization_response_code ⇒ String
Returns the current value of offline_authorization_response_code.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def @offline_authorization_response_code end |
#pin_entry_capability ⇒ String
Returns the current value of pin_entry_capability.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def pin_entry_capability @pin_entry_capability end |
#terminal_id ⇒ String
Returns the current value of terminal_id.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def terminal_id @terminal_id end |
#terminal_location ⇒ String
Returns the current value of terminal_location.
20 21 22 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 20 def terminal_location @terminal_location end |
Instance Method Details
#from_hash(hash) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 55 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? 'isOfflineApproved' @is_offline_approved = hash['isOfflineApproved'] end if hash.has_key? 'offlineAuthorizationResponseCode' @offline_authorization_response_code = hash['offlineAuthorizationResponseCode'] 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
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb', line 41 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['isOfflineApproved'] = @is_offline_approved unless @is_offline_approved.nil? hash['offlineAuthorizationResponseCode'] = @offline_authorization_response_code unless @offline_authorization_response_code.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 |