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.



41339
41340
41341
41342
41343
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41339

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.



41337
41338
41339
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41337

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41349
41350
41351
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41349

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

#subtype_to_hashObject



41353
41354
41355
41356
41357
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41353

def subtype_to_hash
  {
    :sort => sort
  }
end

#to_jsonObject



41345
41346
41347
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41345

def to_json
  JSON.dump(to_hash)
end