Class: Io::Flow::V0::Models::AbandonedOrderPromotionStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AbandonedOrderPromotionStatus
- 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
- .active ⇒ Object
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of AbandonedOrderPromotionStatus for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of AbandonedOrderPromotionStatus for this value, or nil if not found.
- .inactive ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ AbandonedOrderPromotionStatus
constructor
A new instance of AbandonedOrderPromotionStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ AbandonedOrderPromotionStatus
Returns a new instance of AbandonedOrderPromotionStatus.
16317 16318 16319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16317 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16315 16316 16317 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16315 def value @value end |
Class Method Details
.active ⇒ Object
16341 16342 16343 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16341 def AbandonedOrderPromotionStatus.active @@_active ||= AbandonedOrderPromotionStatus.new('active') end |
.ALL ⇒ Object
16337 16338 16339 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16337 def AbandonedOrderPromotionStatus.ALL @@all ||= [AbandonedOrderPromotionStatus.active, AbandonedOrderPromotionStatus.inactive] end |
.apply(value) ⇒ Object
Returns the instance of AbandonedOrderPromotionStatus for this value, creating a new instance for an unknown value
16322 16323 16324 16325 16326 16327 16328 16329 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16322 def AbandonedOrderPromotionStatus.apply(value) if value.instance_of?(AbandonedOrderPromotionStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || AbandonedOrderPromotionStatus.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of AbandonedOrderPromotionStatus for this value, or nil if not found
16332 16333 16334 16335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16332 def AbandonedOrderPromotionStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AbandonedOrderPromotionStatus.ALL.find { |v| v.value == value } end |
.inactive ⇒ Object
16345 16346 16347 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16345 def AbandonedOrderPromotionStatus.inactive @@_inactive ||= AbandonedOrderPromotionStatus.new('inactive') end |
Instance Method Details
#to_hash ⇒ Object
16349 16350 16351 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16349 def to_hash value end |