Class: Io::Flow::V0::Models::SolidusProductExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::SolidusProductExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Exports product 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 = {}) ⇒ SolidusProductExportType
constructor
A new instance of SolidusProductExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ SolidusProductExportType
Returns a new instance of SolidusProductExportType.
63633 63634 63635 63636 63637 63638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63633 def initialize(incoming={}) super(:discriminator => ExportType::Types::SOLIDUS_PRODUCT_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.
63631 63632 63633 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63631 def numbers @numbers end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
63631 63632 63633 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63631 def sort @sort end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
63644 63645 63646 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63644 def copy(incoming={}) SolidusProductExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
63648 63649 63650 63651 63652 63653 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63648 def subtype_to_hash { :numbers => numbers.nil? ? nil : numbers, :sort => sort } end |
#to_json ⇒ Object
63640 63641 63642 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63640 def to_json JSON.dump(to_hash) end |