class Io::Flow::V0::Models::DeliveryWindowComponents
Components and information taken into account when calculating a final delivery window.
Attributes
shipment_estimate[R]
transit_estimate[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 39333 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:shipment_estimate, :transit_estimate], 'DeliveryWindowComponents') @shipment_estimate = (x = opts.delete(:shipment_estimate); x.is_a?(::Io::Flow::V0::Models::DeliveryWindowComponent) ? x : ::Io::Flow::V0::Models::DeliveryWindowComponent.new(x)) @transit_estimate = (x = opts.delete(:transit_estimate); x.is_a?(::Io::Flow::V0::Models::DeliveryWindowComponent) ? x : ::Io::Flow::V0::Models::DeliveryWindowComponent.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 39344 def copy(incoming={}) DeliveryWindowComponents.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 39348 def to_hash { :shipment_estimate => shipment_estimate.to_hash, :transit_estimate => transit_estimate.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 39340 def to_json JSON.dump(to_hash) end