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.
19433 19434 19435 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19433 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19431 19432 19433 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19431 def value @value end |
Class Method Details
.ALL ⇒ Object
19453 19454 19455 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19453 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
19438 19439 19440 19441 19442 19443 19444 19445 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19438 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.
19458 19459 19460 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19458 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
19448 19449 19450 19451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19448 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.
19463 19464 19465 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19463 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.
19469 19470 19471 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19469 def SubcatalogItemStatus.restricted @@_restricted ||= SubcatalogItemStatus.new('restricted') end |
Instance Method Details
#to_hash ⇒ Object
19473 19474 19475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19473 def to_hash value end |