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.
10001 10002 10003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10001 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9999 10000 10001 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9999 def value @value end |
Class Method Details
.ALL ⇒ Object
10021 10022 10023 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10021 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
10006 10007 10008 10009 10010 10011 10012 10013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10006 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.
10027 10028 10029 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10027 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
10016 10017 10018 10019 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10016 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
10032 10033 10034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10032 def SubcatalogItemStatus.included @@_included ||= SubcatalogItemStatus.new('included') end |
.restricted ⇒ Object
Item is restricted and will be treated as excluded
10037 10038 10039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10037 def SubcatalogItemStatus.restricted @@_restricted ||= SubcatalogItemStatus.new('restricted') end |
Instance Method Details
#to_hash ⇒ Object
10041 10042 10043 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10041 def to_hash value end |