Class: Io::Flow::V0::Models::HarmonizationHs10ExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::HarmonizationHs10ExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Exports harmonization HS10 codes
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#has_codes ⇒ Object
readonly
Returns the value of attribute has_codes.
-
#has_origins ⇒ Object
readonly
Returns the value of attribute has_origins.
-
#numbers ⇒ Object
readonly
Returns the value of attribute numbers.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Attributes inherited from ExportType
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ HarmonizationHs10ExportType
constructor
A new instance of HarmonizationHs10ExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ HarmonizationHs10ExportType
Returns a new instance of HarmonizationHs10ExportType.
41240 41241 41242 41243 41244 41245 41246 41247 41248 41249 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41240 def initialize(incoming={}) super(:discriminator => ExportType::Types::HARMONIZATION_HS10_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)) @numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) }) @has_codes = (x = opts.delete(:has_codes); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_codes', x)) @has_origins = (x = opts.delete(:has_origins); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_origins', x)) @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String)) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def destination @destination end |
#has_codes ⇒ Object (readonly)
Returns the value of attribute has_codes.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def has_codes @has_codes end |
#has_origins ⇒ Object (readonly)
Returns the value of attribute has_origins.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def has_origins @has_origins end |
#numbers ⇒ Object (readonly)
Returns the value of attribute numbers.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def numbers @numbers end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def origin @origin end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
41238 41239 41240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41238 def sort @sort end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41255 41256 41257 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41255 def copy(incoming={}) HarmonizationHs10ExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
41259 41260 41261 41262 41263 41264 41265 41266 41267 41268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41259 def subtype_to_hash { :origin => origin, :destination => destination, :numbers => numbers.nil? ? nil : numbers, :has_codes => has_codes, :has_origins => has_origins, :sort => sort } end |
#to_json ⇒ Object
41251 41252 41253 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41251 def to_json JSON.dump(to_hash) end |