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.
31516 31517 31518 31519 31520 31521 31522 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31516 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.
31514 31515 31516 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31514 def description @description end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
31514 31515 31516 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31514 def q @q end |
#regions ⇒ Object (readonly)
Returns the value of attribute regions.
31514 31515 31516 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31514 def regions @regions end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31528 31529 31530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31528 def copy(incoming={}) ExclusionRuleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31532 31533 31534 31535 31536 31537 31538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31532 def to_hash { :q => q, :regions => regions, :description => description } end |
#to_json ⇒ Object
31524 31525 31526 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31524 def to_json JSON.dump(to_hash) end |