Class: Io::Flow::V0::Models::OrderBuilderSelectionsForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderBuilderSelectionsForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#selections ⇒ Object
readonly
Returns the value of attribute selections.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderBuilderSelectionsForm
constructor
A new instance of OrderBuilderSelectionsForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderBuilderSelectionsForm
Returns a new instance of OrderBuilderSelectionsForm.
51522 51523 51524 51525 51526 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51522 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:selections], 'OrderBuilderSelectionsForm') @selections = HttpClient::Preconditions.assert_class('selections', opts.delete(:selections), Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) } end |
Instance Attribute Details
#selections ⇒ Object (readonly)
Returns the value of attribute selections.
51520 51521 51522 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51520 def selections @selections end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51532 51533 51534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51532 def copy(incoming={}) OrderBuilderSelectionsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51536 51537 51538 51539 51540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51536 def to_hash { :selections => selections } end |
#to_json ⇒ Object
51528 51529 51530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51528 def to_json JSON.dump(to_hash) end |