class Io::Flow::V0::Models::OrderServiceChange
Manual change for a shipping method used for an order. Currently only available to orders with a single calculated delivery.
Attributes
from[R]
id[R]
to[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54027 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :from, :to], 'OrderServiceChange') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @from = (x = opts.delete(:from); x.is_a?(::Io::Flow::V0::Models::CarrierService) ? x : ::Io::Flow::V0::Models::CarrierService.new(x)) @to = (x = opts.delete(:to); x.is_a?(::Io::Flow::V0::Models::CarrierService) ? x : ::Io::Flow::V0::Models::CarrierService.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54039 def copy(incoming={}) OrderServiceChange.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 54043 def to_hash { :id => id, :from => from.to_hash, :to => to.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54035 def to_json JSON.dump(to_hash) end