Class: Io::Flow::V0::Models::SolidusVariantExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::SolidusVariantExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Exports variant level data for import into solidus
Instance Attribute Summary collapse
-
#numbers ⇒ Object
readonly
Returns the value of attribute numbers.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Attributes inherited from ExportType
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SolidusVariantExportType
constructor
A new instance of SolidusVariantExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ SolidusVariantExportType
Returns a new instance of SolidusVariantExportType.
68660 68661 68662 68663 68664 68665 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68660 def initialize(incoming={}) super(:discriminator => ExportType::Types::SOLIDUS_VARIANT_EXPORT_TYPE) opts = HttpClient::Helper.symbolize_keys(incoming) @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) }) @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String)) end |
Instance Attribute Details
#numbers ⇒ Object (readonly)
Returns the value of attribute numbers.
68658 68659 68660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68658 def numbers @numbers end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
68658 68659 68660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68658 def sort @sort end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
68671 68672 68673 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68671 def copy(incoming={}) SolidusVariantExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
68675 68676 68677 68678 68679 68680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68675 def subtype_to_hash { :numbers => numbers.nil? ? nil : numbers, :sort => sort } end |
#to_json ⇒ Object
68667 68668 68669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68667 def to_json JSON.dump(to_hash) end |