Class: Io::Flow::V0::Models::FieldValidationMax
- Inherits:
-
FieldValidationRule
- Object
- FieldValidationRule
- Io::Flow::V0::Models::FieldValidationMax
- 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 = {}) ⇒ FieldValidationMax
constructor
A new instance of FieldValidationMax.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FieldValidationRule
Constructor Details
#initialize(incoming = {}) ⇒ FieldValidationMax
Returns a new instance of FieldValidationMax.
32645 32646 32647 32648 32649 32650 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32645 def initialize(incoming={}) super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_MAX) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:length], 'FieldValidationMax') @length = HttpClient::Preconditions.assert_class('length', opts.delete(:length), Integer) end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
32643 32644 32645 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32643 def length @length end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32656 32657 32658 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32656 def copy(incoming={}) FieldValidationMax.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
32660 32661 32662 32663 32664 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32660 def subtype_to_hash { :length => length } end |
#to_json ⇒ Object
32652 32653 32654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32652 def to_json JSON.dump(to_hash) end |