class Beaver::TerminalsRequest
TerminalsRequest
Model.
Attributes
account_id[RW]
TODO: Write general description for this method @return [String]
model[RW]
The model of the physical terminal. @return [Model1Enum]
reference_id[RW]
A reference ID that can be used to identify the terminals resource in WePay's system. Searching capabilities are supported on this field. @return [String]
serial_number[RW]
The serial number of the physical terminal. @return [String]
terminal_configuration[RW]
A reference ID that can be used to identify the terminals resource in WePay's system. Searching capabilities are supported on this field. @return [TerminalConfiguration1]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/terminals_request.rb, line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash['account_id'] serial_number = hash['serial_number'] model = hash['model'] if hash['terminal_configuration'] terminal_configuration = TerminalConfiguration1.from_hash(hash['terminal_configuration']) end reference_id = hash['reference_id'] # Create object from extracted values. TerminalsRequest.new(account_id, serial_number, model, terminal_configuration, reference_id) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/terminals_request.rb, line 32 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['serial_number'] = 'serial_number' @_hash['model'] = 'model' @_hash['reference_id'] = 'reference_id' @_hash['terminal_configuration'] = 'terminal_configuration' @_hash end
new(account_id = nil, serial_number = nil, model = nil, terminal_configuration = nil, reference_id = nil)
click to toggle source
# File lib/beaver/models/terminals_request.rb, line 42 def initialize(account_id = nil, serial_number = nil, model = nil, terminal_configuration = nil, reference_id = nil) @account_id = account_id @serial_number = serial_number @model = model @reference_id = reference_id @terminal_configuration = terminal_configuration end