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.
63662 63663 63664 63665 63666 63667 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63662 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.
63660 63661 63662 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63660 def numbers @numbers end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
63660 63661 63662 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63660 def sort @sort end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
63673 63674 63675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63673 def copy(incoming={}) SolidusVariantExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
63677 63678 63679 63680 63681 63682 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63677 def subtype_to_hash { :numbers => numbers.nil? ? nil : numbers, :sort => sort } end |
#to_json ⇒ Object
63669 63670 63671 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63669 def to_json JSON.dump(to_hash) end |