class Io::Flow::Reference::V0::Models::Carrier
Partner that actually takes a shipment between places (ex: FedEx, DHL, SF Express)
Attributes
id[R]
name[R]
tracking_url[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_reference_v0_client.rb, line 412 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :name, :tracking_url], 'Carrier') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @tracking_url = HttpClient::Preconditions.assert_class('tracking_url', opts.delete(:tracking_url), String) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_reference_v0_client.rb, line 424 def copy(incoming={}) Carrier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_reference_v0_client.rb, line 428 def to_hash { :id => id, :name => name, :tracking_url => tracking_url } end
to_json()
click to toggle source
# File lib/flow_reference_v0_client.rb, line 420 def to_json JSON.dump(to_hash) end