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
32600 32601 32602 32603 32604 32605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32600 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.
32598 32599 32600 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32598 def pattern @pattern end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32611 32612 32613 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32611 def copy(incoming={}) FieldValidationPattern.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
32615 32616 32617 32618 32619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32615 def subtype_to_hash { :pattern => pattern } end |
#to_json ⇒ Object
32607 32608 32609 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32607 def to_json JSON.dump(to_hash) end |