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