Class: Io::Flow::V0::Models::HarmonizationHs6ExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::HarmonizationHs6ExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Exports HS6 codes
Instance Attribute Summary collapse
-
#has_codes ⇒ Object
readonly
Returns the value of attribute has_codes.
-
#numbers ⇒ Object
readonly
Returns the value of attribute numbers.
-
#sort ⇒ Object
readonly
Returns the value of attribute sort.
Attributes inherited from ExportType
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ HarmonizationHs6ExportType
constructor
A new instance of HarmonizationHs6ExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ HarmonizationHs6ExportType
Returns a new instance of HarmonizationHs6ExportType.
41277 41278 41279 41280 41281 41282 41283 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41277 def initialize(incoming={}) super(:discriminator => ExportType::Types::HARMONIZATION_HS6_EXPORT_TYPE) opts = HttpClient::Helper.symbolize_keys(incoming) @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)) @sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String)) end |
Instance Attribute Details
#has_codes ⇒ Object (readonly)
Returns the value of attribute has_codes.
41275 41276 41277 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41275 def has_codes @has_codes end |
#numbers ⇒ Object (readonly)
Returns the value of attribute numbers.
41275 41276 41277 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41275 def numbers @numbers end |
#sort ⇒ Object (readonly)
Returns the value of attribute sort.
41275 41276 41277 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41275 def sort @sort end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41289 41290 41291 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41289 def copy(incoming={}) HarmonizationHs6ExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
41293 41294 41295 41296 41297 41298 41299 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41293 def subtype_to_hash { :numbers => numbers.nil? ? nil : numbers, :has_codes => has_codes, :sort => sort } end |
#to_json ⇒ Object
41285 41286 41287 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41285 def to_json JSON.dump(to_hash) end |