Class: Ingenico::Direct::SDK::Domain::RangeValidator
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::RangeValidator
- Defined in:
- lib/ingenico/direct/sdk/domain/range_validator.rb
Instance Attribute Summary collapse
-
#max_value ⇒ Integer
The current value of max_value.
-
#min_value ⇒ Integer
The current value of min_value.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#max_value ⇒ Integer
Returns the current value of max_value.
12 13 14 |
# File 'lib/ingenico/direct/sdk/domain/range_validator.rb', line 12 def max_value @max_value end |
#min_value ⇒ Integer
Returns the current value of min_value.
12 13 14 |
# File 'lib/ingenico/direct/sdk/domain/range_validator.rb', line 12 def min_value @min_value end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 |
# File 'lib/ingenico/direct/sdk/domain/range_validator.rb', line 24 def from_hash(hash) super @max_value = hash['maxValue'] if hash.key? 'maxValue' @min_value = hash['minValue'] if hash.key? 'minValue' end |
#to_h ⇒ Hash
17 18 19 20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/range_validator.rb', line 17 def to_h hash = super hash['maxValue'] = @max_value unless @max_value.nil? hash['minValue'] = @min_value unless @min_value.nil? hash end |