Class: Io::Flow::V0::Models::UnharmonizedItemExportType

Inherits:
ExportType
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Export for items that require harmonization.

Instance Attribute Summary collapse

Attributes inherited from ExportType

#discriminator

Instance Method Summary collapse

Methods inherited from ExportType

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ UnharmonizedItemExportType

Returns a new instance of UnharmonizedItemExportType.



28823
28824
28825
28826
28827
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28823

def initialize(incoming={})
  super(:discriminator => ExportType::Types::UNHARMONIZED_ITEM_EXPORT_TYPE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
end

Instance Attribute Details

#sortObject (readonly)

Returns the value of attribute sort.



28821
28822
28823
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28821

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



28833
28834
28835
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28833

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

#subtype_to_hashObject



28837
28838
28839
28840
28841
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28837

def subtype_to_hash
  {
    :sort => sort
  }
end

#to_jsonObject



28829
28830
28831
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28829

def to_json
  JSON.dump(to_hash)
end