class Ingenico::Direct::SDK::Domain::FixedListValidator
@attr [Array<String>] allowed_values
Attributes
allowed_values[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/fixed_list_validator.rb, line 21 def from_hash(hash) super if hash.key? 'allowedValues' raise TypeError, "value '%s' is not an Array" % [hash['allowedValues']] unless hash['allowedValues'].is_a? Array @allowed_values = [] hash['allowedValues'].each do |e| @allowed_values << e end end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/fixed_list_validator.rb, line 15 def to_h hash = super hash['allowedValues'] = @allowed_values unless @allowed_values.nil? hash end