Class: Io::Flow::V0::Models::FulfillmentItemQuantityStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FulfillmentItemQuantityStatus
- 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 FulfillmentItemQuantityStatus for this value, creating a new instance for an unknown value.
-
.cancelled ⇒ Object
Item will not be fulfilled.
-
.from_string(value) ⇒ Object
Returns the instance of FulfillmentItemQuantityStatus for this value, or nil if not found.
-
.new ⇒ Object
Item may be shipped or cancelled.
-
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
Instance Method Summary collapse
-
#initialize(value) ⇒ FulfillmentItemQuantityStatus
constructor
A new instance of FulfillmentItemQuantityStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FulfillmentItemQuantityStatus
Returns a new instance of FulfillmentItemQuantityStatus.
15406 15407 15408 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15406 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15404 15405 15406 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15404 def value @value end |
Class Method Details
.ALL ⇒ Object
15426 15427 15428 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15426 def FulfillmentItemQuantityStatus.ALL @@all ||= [FulfillmentItemQuantityStatus.new, FulfillmentItemQuantityStatus.shipped, FulfillmentItemQuantityStatus.cancelled] end |
.apply(value) ⇒ Object
Returns the instance of FulfillmentItemQuantityStatus for this value, creating a new instance for an unknown value
15411 15412 15413 15414 15415 15416 15417 15418 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15411 def FulfillmentItemQuantityStatus.apply(value) if value.instance_of?(FulfillmentItemQuantityStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FulfillmentItemQuantityStatus.new(value)) end end |
.cancelled ⇒ Object
Item will not be fulfilled.
15441 15442 15443 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15441 def FulfillmentItemQuantityStatus.cancelled @@_cancelled ||= FulfillmentItemQuantityStatus.new('cancelled') end |
.from_string(value) ⇒ Object
Returns the instance of FulfillmentItemQuantityStatus for this value, or nil if not found
15421 15422 15423 15424 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15421 def FulfillmentItemQuantityStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FulfillmentItemQuantityStatus.ALL.find { |v| v.value == value } end |
.new ⇒ Object
Item may be shipped or cancelled
15431 15432 15433 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15431 def FulfillmentItemQuantityStatus.new @@_new ||= FulfillmentItemQuantityStatus.new('new') end |
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
15436 15437 15438 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15436 def FulfillmentItemQuantityStatus.shipped @@_shipped ||= FulfillmentItemQuantityStatus.new('shipped') end |
Instance Method Details
#to_hash ⇒ Object
15445 15446 15447 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15445 def to_hash value end |