Class: Io::Flow::V0::Models::ShopifyVariantInventoryMetafieldStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShopifyVariantInventoryMetafieldStatus
- 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 ShopifyVariantInventoryMetafieldStatus for this value, creating a new instance for an unknown value.
- .available ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ShopifyVariantInventoryMetafieldStatus for this value, or nil if not found.
- .low ⇒ Object
- .out_of_stock ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ShopifyVariantInventoryMetafieldStatus
constructor
A new instance of ShopifyVariantInventoryMetafieldStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ShopifyVariantInventoryMetafieldStatus
Returns a new instance of ShopifyVariantInventoryMetafieldStatus.
15585 15586 15587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15585 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15583 15584 15585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15583 def value @value end |
Class Method Details
.ALL ⇒ Object
15605 15606 15607 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15605 def ShopifyVariantInventoryMetafieldStatus.ALL @@all ||= [ShopifyVariantInventoryMetafieldStatus.available, ShopifyVariantInventoryMetafieldStatus.low, ShopifyVariantInventoryMetafieldStatus.out_of_stock] end |
.apply(value) ⇒ Object
Returns the instance of ShopifyVariantInventoryMetafieldStatus for this value, creating a new instance for an unknown value
15590 15591 15592 15593 15594 15595 15596 15597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15590 def ShopifyVariantInventoryMetafieldStatus.apply(value) if value.instance_of?(ShopifyVariantInventoryMetafieldStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ShopifyVariantInventoryMetafieldStatus.new(value)) end end |
.available ⇒ Object
15609 15610 15611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15609 def ShopifyVariantInventoryMetafieldStatus.available @@_available ||= ShopifyVariantInventoryMetafieldStatus.new('available') end |
.from_string(value) ⇒ Object
Returns the instance of ShopifyVariantInventoryMetafieldStatus for this value, or nil if not found
15600 15601 15602 15603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15600 def ShopifyVariantInventoryMetafieldStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShopifyVariantInventoryMetafieldStatus.ALL.find { |v| v.value == value } end |
.low ⇒ Object
15613 15614 15615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15613 def ShopifyVariantInventoryMetafieldStatus.low @@_low ||= ShopifyVariantInventoryMetafieldStatus.new('low') end |
.out_of_stock ⇒ Object
15617 15618 15619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15617 def ShopifyVariantInventoryMetafieldStatus.out_of_stock @@_out_of_stock ||= ShopifyVariantInventoryMetafieldStatus.new('out_of_stock') end |
Instance Method Details
#to_hash ⇒ Object
15621 15622 15623 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15621 def to_hash value end |