Class: Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OrderBuilderDeliveredDutyForm

Returns a new instance of OrderBuilderDeliveredDutyForm.



24993
24994
24995
24996
24997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24993

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_dutyObject (readonly)

Returns the value of attribute delivered_duty.



24991
24992
24993
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24991

def delivered_duty
  @delivered_duty
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25003
25004
25005
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25003

def copy(incoming={})
  OrderBuilderDeliveredDutyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



25007
25008
25009
25010
25011
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25007

def to_hash
  {
    :delivered_duty => delivered_duty.value
  }
end

#to_jsonObject



24999
25000
25001
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24999

def to_json
  JSON.dump(to_hash)
end