Class: Io::Flow::V0::Models::SubcatalogItemStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SubcatalogItemStatus
- 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
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of SubcatalogItemStatus for this value, creating a new instance for an unknown value.
-
.excluded ⇒ Object
Item is excluded based on targeting query.
-
.from_string(value) ⇒ Object
Returns the instance of SubcatalogItemStatus for this value, or nil if not found.
-
.included ⇒ Object
Item is included.
-
.restricted ⇒ Object
Item is restricted and will be treated as excluded.
Instance Method Summary collapse
-
#initialize(value) ⇒ SubcatalogItemStatus
constructor
A new instance of SubcatalogItemStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ SubcatalogItemStatus
Returns a new instance of SubcatalogItemStatus.
7304 7305 7306 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7304 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7302 7303 7304 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7302 def value @value end |
Class Method Details
.ALL ⇒ Object
7324 7325 7326 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7324 def SubcatalogItemStatus.ALL @@all ||= [SubcatalogItemStatus.excluded, SubcatalogItemStatus.included, SubcatalogItemStatus.restricted] end |
.apply(value) ⇒ Object
Returns the instance of SubcatalogItemStatus for this value, creating a new instance for an unknown value
7309 7310 7311 7312 7313 7314 7315 7316 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7309 def SubcatalogItemStatus.apply(value) if value.instance_of?(SubcatalogItemStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || SubcatalogItemStatus.new(value)) end end |
.excluded ⇒ Object
Item is excluded based on targeting query. This is separate from an item marked as restricted.
7330 7331 7332 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7330 def SubcatalogItemStatus.excluded @@_excluded ||= SubcatalogItemStatus.new('excluded') end |
.from_string(value) ⇒ Object
Returns the instance of SubcatalogItemStatus for this value, or nil if not found
7319 7320 7321 7322 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7319 def SubcatalogItemStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SubcatalogItemStatus.ALL.find { |v| v.value == value } end |
.included ⇒ Object
Item is included
7335 7336 7337 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7335 def SubcatalogItemStatus.included @@_included ||= SubcatalogItemStatus.new('included') end |
.restricted ⇒ Object
Item is restricted and will be treated as excluded
7340 7341 7342 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7340 def SubcatalogItemStatus.restricted @@_restricted ||= SubcatalogItemStatus.new('restricted') end |
Instance Method Details
#to_hash ⇒ Object
7344 7345 7346 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7344 def to_hash value end |