Class: Io::Flow::V0::Models::SyncRecordFailureReason
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncRecordFailureReason
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .address ⇒ Object
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of SyncRecordFailureReason for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of SyncRecordFailureReason for this value, or nil if not found.
- .inventory ⇒ Object
- .other ⇒ Object
- .promotion ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ SyncRecordFailureReason
constructor
A new instance of SyncRecordFailureReason.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ SyncRecordFailureReason
Returns a new instance of SyncRecordFailureReason.
26972 26973 26974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26972 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
26970 26971 26972 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26970 def value @value end |
Class Method Details
.address ⇒ Object
27000 27001 27002 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27000 def SyncRecordFailureReason.address @@_address ||= SyncRecordFailureReason.new('address') end |
.ALL ⇒ Object
26992 26993 26994 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26992 def SyncRecordFailureReason.ALL @@all ||= [SyncRecordFailureReason.inventory, SyncRecordFailureReason.address, SyncRecordFailureReason.promotion, SyncRecordFailureReason.other] end |
.apply(value) ⇒ Object
Returns the instance of SyncRecordFailureReason for this value, creating a new instance for an unknown value
26977 26978 26979 26980 26981 26982 26983 26984 |
# 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) ⇒ Object
Returns the instance of SyncRecordFailureReason for this value, or nil if not found
26987 26988 26989 26990 |
# 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 ⇒ Object
26996 26997 26998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26996 def SyncRecordFailureReason.inventory @@_inventory ||= SyncRecordFailureReason.new('inventory') end |
.other ⇒ Object
27008 27009 27010 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27008 def SyncRecordFailureReason.other @@_other ||= SyncRecordFailureReason.new('other') end |
.promotion ⇒ Object
27004 27005 27006 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27004 def SyncRecordFailureReason.promotion @@_promotion ||= SyncRecordFailureReason.new('promotion') end |
Instance Method Details
#to_hash ⇒ Object
27012 27013 27014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27012 def to_hash value end |