Class: Io::Flow::V0::Models::HarmonizationTariffCodesExportType

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

Overview

Exports harmonization tariff codes for all destinations

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 = {}) ⇒ HarmonizationTariffCodesExportType

Returns a new instance of HarmonizationTariffCodesExportType.



44558
44559
44560
44561
44562
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44558

def initialize(incoming={})
  super(:discriminator => ExportType::Types::HARMONIZATION_TARIFF_CODES_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.



44556
44557
44558
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44556

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



44568
44569
44570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44568

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

#subtype_to_hashObject



44572
44573
44574
44575
44576
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44572

def subtype_to_hash
  {
    :sort => sort
  }
end

#to_jsonObject



44564
44565
44566
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44564

def to_json
  JSON.dump(to_hash)
end