Class: Io::Flow::V0::Models::SubcatalogFunctionForm

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 = {}) ⇒ SubcatalogFunctionForm

Returns a new instance of SubcatalogFunctionForm.



27285
27286
27287
27288
27289
27290
27291
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27285

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:item_function_id], 'SubcatalogFunctionForm')
  @item_function_id = HttpClient::Preconditions.assert_class('item_function_id', opts.delete(:item_function_id), String)
  @q = (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String))
  @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
end

Instance Attribute Details

#item_function_idObject (readonly)

Returns the value of attribute item_function_id.



27283
27284
27285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27283

def item_function_id
  @item_function_id
end

#positionObject (readonly)

Returns the value of attribute position.



27283
27284
27285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27283

def position
  @position
end

#qObject (readonly)

Returns the value of attribute q.



27283
27284
27285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27283

def q
  @q
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



27297
27298
27299
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27297

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

#to_hashObject



27301
27302
27303
27304
27305
27306
27307
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27301

def to_hash
  {
    :item_function_id => item_function_id,
    :q => q,
    :position => position
  }
end

#to_jsonObject



27293
27294
27295
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27293

def to_json
  JSON.dump(to_hash)
end