Class: Io::Flow::V0::Models::ItemFormOverlayForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ItemFormOverlayForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#dimensions ⇒ Object
readonly
Returns the value of attribute dimensions.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ItemFormOverlayForm
constructor
A new instance of ItemFormOverlayForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ItemFormOverlayForm
Returns a new instance of ItemFormOverlayForm.
26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26378 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number], 'ItemFormOverlayForm') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer)) @categories = (x = opts.delete(:categories); x.nil? ? nil : HttpClient::Preconditions.assert_class('categories', x, Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) }) @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }) @dimensions = (x = opts.delete(:dimensions); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x))) @images = (x = opts.delete(:images); x.nil? ? nil : HttpClient::Preconditions.assert_class('images', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ImageForm) ? x : ::Io::Flow::V0::Models::ImageForm.new(x)) }) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def attributes @attributes end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def categories @categories end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def description @description end |
#dimensions ⇒ Object (readonly)
Returns the value of attribute dimensions.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def dimensions @dimensions end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def images @images end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def number @number end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
26376 26377 26378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26376 def position @position end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26394 26395 26396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26394 def copy(incoming={}) ItemFormOverlayForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26398 def to_hash { :number => number, :position => position, :categories => categories.nil? ? nil : categories, :description => description, :attributes => attributes.nil? ? nil : attributes, :dimensions => dimensions.nil? ? nil : dimensions.to_hash, :images => images.nil? ? nil : images.map { |o| o.to_hash } } end |
#to_json ⇒ Object
26390 26391 26392 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26390 def to_json JSON.dump(to_hash) end |