Class: Io::Flow::V0::Models::HarmonizedItemDutyForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::HarmonizedItemDutyForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ HarmonizedItemDutyForm
constructor
A new instance of HarmonizedItemDutyForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ HarmonizedItemDutyForm
Returns a new instance of HarmonizedItemDutyForm.
19469 19470 19471 19472 19473 19474 19475 19476 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19469 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number, :origin, :destination, :rate], 'HarmonizedItemDutyForm') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @origin = HttpClient::Preconditions.assert_class('origin', opts.delete(:origin), String) @destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String) @rate = HttpClient::Preconditions.assert_class('rate', HttpClient::Helper.to_big_decimal(opts.delete(:rate)), BigDecimal) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
19467 19468 19469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19467 def destination @destination end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
19467 19468 19469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19467 def number @number end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
19467 19468 19469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19467 def origin @origin end |
#rate ⇒ Object (readonly)
Returns the value of attribute rate.
19467 19468 19469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19467 def rate @rate end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
19482 19483 19484 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19482 def copy(incoming={}) HarmonizedItemDutyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
19486 19487 19488 19489 19490 19491 19492 19493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19486 def to_hash { :number => number, :origin => origin, :destination => destination, :rate => rate } end |
#to_json ⇒ Object
19478 19479 19480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19478 def to_json JSON.dump(to_hash) end |