Class: Io::Flow::V0::Models::ExclusionRuleForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExclusionRuleForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
-
#regions ⇒ Object
readonly
Returns the value of attribute regions.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExclusionRuleForm
constructor
A new instance of ExclusionRuleForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExclusionRuleForm
Returns a new instance of ExclusionRuleForm.
29715 29716 29717 29718 29719 29720 29721 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29715 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:q, :regions], 'ExclusionRuleForm') @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String) @regions = HttpClient::Preconditions.assert_class('regions', opts.delete(:regions), Array).map { |v| HttpClient::Preconditions.assert_class('regions', v, String) } @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
29713 29714 29715 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29713 def description @description end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
29713 29714 29715 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29713 def q @q end |
#regions ⇒ Object (readonly)
Returns the value of attribute regions.
29713 29714 29715 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29713 def regions @regions end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29727 29728 29729 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29727 def copy(incoming={}) ExclusionRuleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29731 29732 29733 29734 29735 29736 29737 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29731 def to_hash { :q => q, :regions => regions, :description => description } end |
#to_json ⇒ Object
29723 29724 29725 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29723 def to_json JSON.dump(to_hash) end |