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.
16363 16364 16365 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16363 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16361 16362 16363 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16361 def value @value end |
Class Method Details
.ALL ⇒ Object
16383 16384 16385 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16383 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
16368 16369 16370 16371 16372 16373 16374 16375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16368 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.
16398 16399 16400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16398 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
16378 16379 16380 16381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16378 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
16388 16389 16390 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16388 def FulfillmentItemQuantityStatus.new @@_new ||= FulfillmentItemQuantityStatus.new('new') end |
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
16393 16394 16395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16393 def FulfillmentItemQuantityStatus.shipped @@_shipped ||= FulfillmentItemQuantityStatus.new('shipped') end |
Instance Method Details
#to_hash ⇒ Object
16402 16403 16404 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16402 def to_hash value end |