class Io::Flow::V0::Models::CancelReason
Attributes
Public Class Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 17456 def CancelReason.ALL @@all ||= [CancelReason.out_of_stock, CancelReason.consumer_requested, CancelReason.flow_cancel] end
Returns the instance of CancelReason
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 17441 def CancelReason.apply(value) if value.instance_of?(CancelReason) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CancelReason.new(value)) end end
A consumer requested cancellation of an item qty and the fulfillment party has acknowledged that the qty will not be shipped. This is a cancel of the ordered quantity and will reduce or refund the consumer’s payment
# File lib/flow_commerce/flow_api_v0_client.rb, line 17470 def CancelReason.consumer_requested @@_consumer_requested ||= CancelReason.new('consumer_requested') end
Flow
has had to cancel an order, possibly due to fraud activity or inability to collect payment. This will cancel the ordered quantity. All known parties will be notified.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17477 def CancelReason.flow_cancel @@_flow_cancel ||= CancelReason.new('flow_cancel') end
Returns the instance of CancelReason
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 17451 def CancelReason.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CancelReason.ALL.find { |v| v.value == value } end
# File lib/flow_commerce/flow_api_v0_client.rb, line 17436 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
Out of stock is a permanent cancel of the fulfillment of an item qty. If no other fulfillment parties exist, this will cancel the ordered quantity and reduce or refund the consumer’s payment.
# File lib/flow_commerce/flow_api_v0_client.rb, line 17463 def CancelReason.out_of_stock @@_out_of_stock ||= CancelReason.new('out_of_stock') end
Public Instance Methods
# File lib/flow_commerce/flow_api_v0_client.rb, line 17481 def to_hash value end