Class: Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#delivered_duty ⇒ Object
readonly
Returns the value of attribute delivered_duty.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderBuilderDeliveredDutyForm
constructor
A new instance of OrderBuilderDeliveredDutyForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderBuilderDeliveredDutyForm
Returns a new instance of OrderBuilderDeliveredDutyForm.
25396 25397 25398 25399 25400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25396 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:delivered_duty], 'OrderBuilderDeliveredDutyForm') @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x)) end |
Instance Attribute Details
#delivered_duty ⇒ Object (readonly)
Returns the value of attribute delivered_duty.
25394 25395 25396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25394 def delivered_duty @delivered_duty end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25406 25407 25408 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25406 def copy(incoming={}) OrderBuilderDeliveredDutyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
25410 25411 25412 25413 25414 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25410 def to_hash { :delivered_duty => delivered_duty.value } end |
#to_json ⇒ Object
25402 25403 25404 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25402 def to_json JSON.dump(to_hash) end |