Class: Io::Flow::V0::Models::FieldValidationPattern
- Inherits:
-
FieldValidationRule
- Object
- FieldValidationRule
- Io::Flow::V0::Models::FieldValidationPattern
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from FieldValidationRule
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FieldValidationPattern
constructor
A new instance of FieldValidationPattern.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FieldValidationRule
Constructor Details
#initialize(incoming = {}) ⇒ FieldValidationPattern
Returns a new instance of FieldValidationPattern.
32748 32749 32750 32751 32752 32753 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32748 def initialize(incoming={}) super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_PATTERN) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:pattern], 'FieldValidationPattern') @pattern = HttpClient::Preconditions.assert_class('pattern', opts.delete(:pattern), String) end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
32746 32747 32748 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32746 def pattern @pattern end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32759 32760 32761 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32759 def copy(incoming={}) FieldValidationPattern.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
32763 32764 32765 32766 32767 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32763 def subtype_to_hash { :pattern => pattern } end |
#to_json ⇒ Object
32755 32756 32757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32755 def to_json JSON.dump(to_hash) end |