class Io::Flow::V0::Models::SyncRecordFailureReason

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26992
def SyncRecordFailureReason.ALL
  @@all ||= [SyncRecordFailureReason.inventory, SyncRecordFailureReason.address, SyncRecordFailureReason.promotion, SyncRecordFailureReason.other]
end
address() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27000
def SyncRecordFailureReason.address
  @@_address ||= SyncRecordFailureReason.new('address')
end
apply(value) click to toggle source

Returns the instance of SyncRecordFailureReason for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 26977
def SyncRecordFailureReason.apply(value)
  if value.instance_of?(SyncRecordFailureReason)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || SyncRecordFailureReason.new(value))
  end
end
from_string(value) click to toggle source

Returns the instance of SyncRecordFailureReason for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 26987
def SyncRecordFailureReason.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  SyncRecordFailureReason.ALL.find { |v| v.value == value }
end
inventory() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26996
def SyncRecordFailureReason.inventory
  @@_inventory ||= SyncRecordFailureReason.new('inventory')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26972
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
other() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27008
def SyncRecordFailureReason.other
  @@_other ||= SyncRecordFailureReason.new('other')
end
promotion() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27004
def SyncRecordFailureReason.promotion
  @@_promotion ||= SyncRecordFailureReason.new('promotion')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27012
def to_hash
  value
end