Class: Worldline::Connect::SDK::V1::Domain::LengthValidator
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::LengthValidator
- Defined in:
- lib/worldline/connect/sdk/v1/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 Domain::DataObject
Instance Attribute Details
#max_length ⇒ Integer
Returns the current value of max_length.
14 15 16 |
# File 'lib/worldline/connect/sdk/v1/domain/length_validator.rb', line 14 def max_length @max_length end |
#min_length ⇒ Integer
Returns the current value of min_length.
14 15 16 |
# File 'lib/worldline/connect/sdk/v1/domain/length_validator.rb', line 14 def min_length @min_length end |
Instance Method Details
#from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/worldline/connect/sdk/v1/domain/length_validator.rb', line 28 def from_hash(hash) super if hash.has_key? 'maxLength' @max_length = hash['maxLength'] end if hash.has_key? 'minLength' @min_length = hash['minLength'] end end |
#to_h ⇒ Hash
21 22 23 24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/length_validator.rb', line 21 def to_h hash = super hash['maxLength'] = @max_length unless @max_length.nil? hash['minLength'] = @min_length unless @min_length.nil? hash end |