class Io::Flow::V0::Models::OrderPlacedDetails
Order
is submitted, allocations are generated and the total value of the order is accounted for by discounts, subsidies, credits and authorized payments – but may not ready to fulfill (e.g. pending assignment of a DC or fraud review).
Attributes
allocation[R]
id[R]
order[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52699 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :order, :allocation], 'OrderPlacedDetails') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::Order) ? x : ::Io::Flow::V0::Models::Order.new(x)) @allocation = (x = opts.delete(:allocation); x.is_a?(::Io::Flow::V0::Models::AllocationV2) ? x : ::Io::Flow::V0::Models::AllocationV2.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52711 def copy(incoming={}) OrderPlacedDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52715 def to_hash { :id => id, :order => order.to_hash, :allocation => allocation.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52707 def to_json JSON.dump(to_hash) end