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.
19766 19767 19768 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19766 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19764 19765 19766 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19764 def value @value end |
Class Method Details
.address ⇒ Object
19794 19795 19796 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19794 def SyncRecordFailureReason.address @@_address ||= SyncRecordFailureReason.new('address') end |
.ALL ⇒ Object
19786 19787 19788 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19786 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
19771 19772 19773 19774 19775 19776 19777 19778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19771 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
19781 19782 19783 19784 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19781 def SyncRecordFailureReason.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SyncRecordFailureReason.ALL.find { |v| v.value == value } end |
.inventory ⇒ Object
19790 19791 19792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19790 def SyncRecordFailureReason.inventory @@_inventory ||= SyncRecordFailureReason.new('inventory') end |
.other ⇒ Object
19802 19803 19804 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19802 def SyncRecordFailureReason.other @@_other ||= SyncRecordFailureReason.new('other') end |
.promotion ⇒ Object
19798 19799 19800 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19798 def SyncRecordFailureReason.promotion @@_promotion ||= SyncRecordFailureReason.new('promotion') end |
Instance Method Details
#to_hash ⇒ Object
19806 19807 19808 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19806 def to_hash value end |