class Beaver::TerminalResp
TerminalResp
Model.
Attributes
Owner structure to be used in any resource where an account is the owner @return [String]
Unique identifier of the terminal used by our payment gateway @return [String]
TODO: Write general description for this method @return [String]
The epoch timestamp of the last time this terminal called home. @return [Integer]
The serial number of the terminal. @return [ModelEnum]
Owner structure to be used in any resource where an account is the owner @return [OwnerIsAccount]
TODO: Write general description for this method @return [String]
The serial number of the terminal. @return [String]
TODO: Write general description for this method @return [String]
The serial number of the terminal. @return [String]
The status of the terminal. Active means the terminal is able to accept authorizations. Inactive means the terminal has been deactivated and is unable to accept payments (this can occur for risk and fraud related reasons). @return [TerminalsStatusEnum]
The version of the application running on the terminal. @return [String]
The version of the application running on the terminal. @return [TerminalConfiguration]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/terminal_resp.rb, line 112 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash['id'] resource = hash['resource'] path = hash['path'] owner = OwnerIsAccount.from_hash(hash['owner']) if hash['owner'] api_version = hash['api_version'] status = hash['status'] serial_number = hash['serial_number'] model = hash['model'] last_call_home = hash['last_call_home'] terminal_application_version = hash['terminal_application_version'] if hash['terminal_configuration'] terminal_configuration = TerminalConfiguration.from_hash(hash['terminal_configuration']) end reference_id = hash['reference_id'] gateway_id = hash['gateway_id'] # Create object from extracted values. TerminalResp.new(id, resource, path, owner, api_version, status, serial_number, model, last_call_home, terminal_application_version, terminal_configuration, reference_id, gateway_id) end
A mapping from model property names to API property names.
# File lib/beaver/models/terminal_resp.rb, line 65 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['resource'] = 'resource' @_hash['path'] = 'path' @_hash['owner'] = 'owner' @_hash['api_version'] = 'api_version' @_hash['status'] = 'status' @_hash['serial_number'] = 'serial_number' @_hash['model'] = 'model' @_hash['reference_id'] = 'reference_id' @_hash['last_call_home'] = 'last_call_home' @_hash['terminal_application_version'] = 'terminal_application_version' @_hash['terminal_configuration'] = 'terminal_configuration' @_hash['gateway_id'] = 'gateway_id' @_hash end
# File lib/beaver/models/terminal_resp.rb, line 83 def initialize(id = nil, resource = nil, path = nil, owner = nil, api_version = nil, status = nil, serial_number = nil, model = nil, last_call_home = nil, terminal_application_version = nil, terminal_configuration = nil, reference_id = nil, gateway_id = nil) @id = id @resource = resource @path = path @owner = owner @api_version = api_version @status = status @serial_number = serial_number @model = model @reference_id = reference_id @last_call_home = last_call_home @terminal_application_version = terminal_application_version @terminal_configuration = terminal_configuration @gateway_id = gateway_id end