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.
13029 13030 13031 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13029 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13027 13028 13029 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13027 def value @value end |
Class Method Details
.ALL ⇒ Object
13049 13050 13051 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13049 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
13034 13035 13036 13037 13038 13039 13040 13041 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13034 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.
13064 13065 13066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13064 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
13044 13045 13046 13047 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13044 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
13054 13055 13056 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13054 def FulfillmentItemQuantityStatus.new @@_new ||= FulfillmentItemQuantityStatus.new('new') end |
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
13059 13060 13061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13059 def FulfillmentItemQuantityStatus.shipped @@_shipped ||= FulfillmentItemQuantityStatus.new('shipped') end |
Instance Method Details
#to_hash ⇒ Object
13068 13069 13070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13068 def to_hash value end |