class Beaver::TerminalsTip
TerminalsTip
Model.
Attributes
mode[RW]
The way in which tip is handled by this terminal. If “disabled”, tip will not be prompted for. Otherwise, value determines if the prompt should appear on the terminal or on the receipt. Note: If set to “prompt_on_terminal” then you must provide the “terminal_display” field as well. @return [ModeEnum]
terminal_display[RW]
This configuration is required if the mode is “prompt_on_terminal”, and is responsible for configuring how the tip guide appears on the physical terminal. @return [TerminalDisplay]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/terminals_tip.rb, line 38 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mode = hash['mode'] terminal_display = TerminalDisplay.from_hash(hash['terminal_display']) if hash['terminal_display'] # Create object from extracted values. TerminalsTip.new(mode, terminal_display) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/terminals_tip.rb, line 24 def self.names @_hash = {} if @_hash.nil? @_hash['mode'] = 'mode' @_hash['terminal_display'] = 'terminal_display' @_hash end
new(mode = nil, terminal_display = nil)
click to toggle source
# File lib/beaver/models/terminals_tip.rb, line 31 def initialize(mode = nil, terminal_display = nil) @mode = mode @terminal_display = terminal_display end