Class: Io::Flow::V0::Models::FieldValidationRequiredIfPresent
- Inherits:
-
FieldValidationRule
- Object
- FieldValidationRule
- Io::Flow::V0::Models::FieldValidationRequiredIfPresent
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Indicates a field is required if it is presented in the user interface
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 = {}) ⇒ FieldValidationRequiredIfPresent
constructor
A new instance of FieldValidationRequiredIfPresent.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FieldValidationRule
Constructor Details
#initialize(incoming = {}) ⇒ FieldValidationRequiredIfPresent
Returns a new instance of FieldValidationRequiredIfPresent.
39991 39992 39993 39994 39995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39991 def initialize(incoming={}) super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED_IF_PRESENT) 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.
39989 39990 39991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39989 def placeholder @placeholder end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40001 40002 40003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40001 def copy(incoming={}) FieldValidationRequiredIfPresent.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
40005 40006 40007 40008 40009 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40005 def subtype_to_hash { :placeholder => placeholder } end |
#to_json ⇒ Object
39997 39998 39999 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39997 def to_json JSON.dump(to_hash) end |