Class: Io::Flow::V0::Models::HarmonizationOverviewExportType

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

Overview

Exports HS10 code overview details

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

Returns a new instance of HarmonizationOverviewExportType.



41308
41309
41310
41311
41312
41313
41314
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41308

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

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



41306
41307
41308
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41306

def destination
  @destination
end

#originObject (readonly)

Returns the value of attribute origin.



41306
41307
41308
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41306

def origin
  @origin
end

#sortObject (readonly)

Returns the value of attribute sort.



41306
41307
41308
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41306

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41320
41321
41322
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41320

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

#subtype_to_hashObject



41324
41325
41326
41327
41328
41329
41330
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41324

def subtype_to_hash
  {
    :origin => origin,
    :destination => destination,
    :sort => sort
  }
end

#to_jsonObject



41316
41317
41318
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41316

def to_json
  JSON.dump(to_hash)
end