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.
25034 25035 25036 25037 25038 25039 25040 25041 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25034 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.
25032 25033 25034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25032 def destination @destination end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
25032 25033 25034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25032 def number @number end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
25032 25033 25034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25032 def origin @origin end |
#rate ⇒ Object (readonly)
Returns the value of attribute rate.
25032 25033 25034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25032 def rate @rate end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25047 25048 25049 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25047 def copy(incoming={}) HarmonizedItemDutyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
25051 25052 25053 25054 25055 25056 25057 25058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25051 def to_hash { :number => number, :origin => origin, :destination => destination, :rate => rate } end |
#to_json ⇒ Object
25043 25044 25045 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25043 def to_json JSON.dump(to_hash) end |