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.



72080
72081
72082
72083
72084
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72080

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.



72078
72079
72080
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72078

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



72090
72091
72092
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72090

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

#subtype_to_hashObject



72094
72095
72096
72097
72098
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72094

def subtype_to_hash
  {
    :sort => sort
  }
end

#to_jsonObject



72086
72087
72088
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72086

def to_json
  JSON.dump(to_hash)
end