Class: Io::Flow::V0::Models::FieldValidationMin
- Inherits:
-
FieldValidationRule
- Object
- FieldValidationRule
- Io::Flow::V0::Models::FieldValidationMin
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Attributes inherited from FieldValidationRule
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FieldValidationMin
constructor
A new instance of FieldValidationMin.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FieldValidationRule
Constructor Details
#initialize(incoming = {}) ⇒ FieldValidationMin
Returns a new instance of FieldValidationMin.
43128 43129 43130 43131 43132 43133 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43128 def initialize(incoming={}) super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_MIN) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:length], 'FieldValidationMin') @length = HttpClient::Preconditions.assert_class('length', opts.delete(:length), Integer) end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
43126 43127 43128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43126 def length @length end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
43139 43140 43141 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43139 def copy(incoming={}) FieldValidationMin.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
43143 43144 43145 43146 43147 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43143 def subtype_to_hash { :length => length } end |
#to_json ⇒ Object
43135 43136 43137 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43135 def to_json JSON.dump(to_hash) end |