Class: Io::Flow::V0::Models::QueryFilterStructuredForm
- Inherits:
-
QueryFilterForm
- Object
- QueryFilterForm
- Io::Flow::V0::Models::QueryFilterStructuredForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Attributes inherited from QueryFilterForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ QueryFilterStructuredForm
constructor
A new instance of QueryFilterStructuredForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from QueryFilterForm
Constructor Details
#initialize(incoming = {}) ⇒ QueryFilterStructuredForm
Returns a new instance of QueryFilterStructuredForm.
56586 56587 56588 56589 56590 56591 56592 56593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56586 def initialize(incoming={}) super(:discriminator => QueryFilterForm::Types::QUERY_FILTER_STRUCTURED_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:field, :operator, :values], 'QueryFilterStructuredForm') @field = HttpClient::Preconditions.assert_class('field', opts.delete(:field), String) @operator = HttpClient::Preconditions.assert_class('operator', opts.delete(:operator), String) @values = HttpClient::Preconditions.assert_class('values', opts.delete(:values), Array).map { |v| HttpClient::Preconditions.assert_class('values', v, String) } end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
56584 56585 56586 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56584 def field @field end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
56584 56585 56586 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56584 def operator @operator end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
56584 56585 56586 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56584 def values @values end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56599 56600 56601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56599 def copy(incoming={}) QueryFilterStructuredForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
56603 56604 56605 56606 56607 56608 56609 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56603 def subtype_to_hash { :field => field, :operator => operator, :values => values } end |
#to_json ⇒ Object
56595 56596 56597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56595 def to_json JSON.dump(to_hash) end |