class Io::Flow::V0::Models::ShippingLaneSummary
Attributes
centers[R]
region[R]
shipping_lane_id[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66867 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:shipping_lane_id, :region, :centers], 'ShippingLaneSummary') @shipping_lane_id = HttpClient::Preconditions.assert_class('shipping_lane_id', opts.delete(:shipping_lane_id), String) @region = HttpClient::Preconditions.assert_class('region', opts.delete(:region), String) @centers = HttpClient::Preconditions.assert_class('centers', opts.delete(:centers), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExpandableCenter) ? x : ::Io::Flow::V0::Models::ExpandableCenter.from_json(x)) } end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66879 def copy(incoming={}) ShippingLaneSummary.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 66883 def to_hash { :shipping_lane_id => shipping_lane_id, :region => region, :centers => centers.map { |o| o.to_hash } } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 66875 def to_json JSON.dump(to_hash) end