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.



44527
44528
44529
44530
44531
44532
44533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44527

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.



44525
44526
44527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44525

def destination
  @destination
end

#originObject (readonly)

Returns the value of attribute origin.



44525
44526
44527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44525

def origin
  @origin
end

#sortObject (readonly)

Returns the value of attribute sort.



44525
44526
44527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44525

def sort
  @sort
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



44539
44540
44541
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44539

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

#subtype_to_hashObject



44543
44544
44545
44546
44547
44548
44549
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44543

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

#to_jsonObject



44535
44536
44537
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44535

def to_json
  JSON.dump(to_hash)
end