Class: Io::Flow::V0::Models::FieldValidationRequired
- Inherits:
-
FieldValidationRule
- Object
- FieldValidationRule
- Io::Flow::V0::Models::FieldValidationRequired
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Indicates a field is required
Instance Attribute Summary collapse
-
#placeholder ⇒ Object
readonly
Returns the value of attribute placeholder.
Attributes inherited from FieldValidationRule
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FieldValidationRequired
constructor
A new instance of FieldValidationRequired.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FieldValidationRule
Constructor Details
#initialize(incoming = {}) ⇒ FieldValidationRequired
Returns a new instance of FieldValidationRequired.
43183 43184 43185 43186 43187 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43183 def initialize(incoming={}) super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED) opts = HttpClient::Helper.symbolize_keys(incoming) @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String)) end |
Instance Attribute Details
#placeholder ⇒ Object (readonly)
Returns the value of attribute placeholder.
43181 43182 43183 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43181 def placeholder @placeholder end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
43193 43194 43195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43193 def copy(incoming={}) FieldValidationRequired.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
43197 43198 43199 43200 43201 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43197 def subtype_to_hash { :placeholder => placeholder } end |
#to_json ⇒ Object
43189 43190 43191 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43189 def to_json JSON.dump(to_hash) end |