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.



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

#selectionsObject (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_hashObject



51536
51537
51538
51539
51540
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51536

def to_hash
  {
    :selections => selections
  }
end

#to_jsonObject



51528
51529
51530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51528

def to_json
  JSON.dump(to_hash)
end