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.
20254 20255 20256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20254 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20252 20253 20254 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20252 def value @value end |
Class Method Details
.address ⇒ Object
20282 20283 20284 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20282 def SyncRecordFailureReason.address @@_address ||= SyncRecordFailureReason.new('address') end |
.ALL ⇒ Object
20274 20275 20276 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20274 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
20259 20260 20261 20262 20263 20264 20265 20266 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20259 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
20269 20270 20271 20272 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20269 def SyncRecordFailureReason.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SyncRecordFailureReason.ALL.find { |v| v.value == value } end |
.inventory ⇒ Object
20278 20279 20280 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20278 def SyncRecordFailureReason.inventory @@_inventory ||= SyncRecordFailureReason.new('inventory') end |
.other ⇒ Object
20290 20291 20292 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20290 def SyncRecordFailureReason.other @@_other ||= SyncRecordFailureReason.new('other') end |
.promotion ⇒ Object
20286 20287 20288 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20286 def SyncRecordFailureReason.promotion @@_promotion ||= SyncRecordFailureReason.new('promotion') end |
Instance Method Details
#to_hash ⇒ Object
20294 20295 20296 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20294 def to_hash value end |