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.
15104 15105 15106 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15104 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15102 15103 15104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15102 def value @value end |
Class Method Details
.active ⇒ Object
15128 15129 15130 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15128 def AbandonedOrderPromotionStatus.active @@_active ||= AbandonedOrderPromotionStatus.new('active') end |
.ALL ⇒ Object
15124 15125 15126 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15124 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
15109 15110 15111 15112 15113 15114 15115 15116 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15109 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
15119 15120 15121 15122 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15119 def AbandonedOrderPromotionStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AbandonedOrderPromotionStatus.ALL.find { |v| v.value == value } end |
.inactive ⇒ Object
15132 15133 15134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15132 def AbandonedOrderPromotionStatus.inactive @@_inactive ||= AbandonedOrderPromotionStatus.new('inactive') end |
Instance Method Details
#to_hash ⇒ Object
15136 15137 15138 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15136 def to_hash value end |