Class: Io::Flow::V0::Models::OrderBuilderSelectionsForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OrderBuilderSelectionsForm

Returns a new instance of OrderBuilderSelectionsForm.



45549
45550
45551
45552
45553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45549

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

#selectionsObject (readonly)

Returns the value of attribute selections.



45547
45548
45549
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45547

def selections
  @selections
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



45559
45560
45561
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45559

def copy(incoming={})
  OrderBuilderSelectionsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



45563
45564
45565
45566
45567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45563

def to_hash
  {
    :selections => selections
  }
end

#to_jsonObject



45555
45556
45557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45555

def to_json
  JSON.dump(to_hash)
end