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
The user has chosen to exclude the item from the associated subcatalog.
-
.from_string(value) ⇒ Object
Returns the instance of SubcatalogItemStatus for this value, or nil if not found.
-
.included ⇒ Object
The item is included in the associated subcatalog.
-
.restricted ⇒ Object
Item is not allowed to be sold in the market associated with the given subcatalog.
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.
20670 20671 20672 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20670 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20668 20669 20670 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20668 def value @value end |
Class Method Details
.ALL ⇒ Object
20690 20691 20692 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20690 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
20675 20676 20677 20678 20679 20680 20681 20682 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20675 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
The user has chosen to exclude the item from the associated subcatalog.
20695 20696 20697 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20695 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
20685 20686 20687 20688 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20685 def SubcatalogItemStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SubcatalogItemStatus.ALL.find { |v| v.value == value } end |
.included ⇒ Object
The item is included in the associated subcatalog.
20700 20701 20702 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20700 def SubcatalogItemStatus.included @@_included ||= SubcatalogItemStatus.new('included') end |
.restricted ⇒ Object
Item is not allowed to be sold in the market associated with the given subcatalog.
20706 20707 20708 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20706 def SubcatalogItemStatus.restricted @@_restricted ||= SubcatalogItemStatus.new('restricted') end |
Instance Method Details
#to_hash ⇒ Object
20710 20711 20712 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20710 def to_hash value end |