class Io::Flow::V0::Models::FulfillmentCompleteCancellationForm
Changing an order for the purpose of completely cancelling all remaining uncancelled, unshipped lines of an order.
Attributes
change_source[R]
reason[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 44027 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:reason], 'FulfillmentCompleteCancellationForm') @change_source = (x = (x = opts.delete(:change_source); x.nil? ? "fulfillment" : x); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x)) @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::CancelReason) ? x : ::Io::Flow::V0::Models::CancelReason.apply(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 44038 def copy(incoming={}) FulfillmentCompleteCancellationForm.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 44042 def to_hash { :change_source => change_source.value, :reason => reason.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 44034 def to_json JSON.dump(to_hash) end