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.
12077 12078 12079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12077 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12075 12076 12077 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12075 def value @value end |
Class Method Details
.ALL ⇒ Object
12097 12098 12099 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12097 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
12082 12083 12084 12085 12086 12087 12088 12089 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12082 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.
12112 12113 12114 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12112 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
12092 12093 12094 12095 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12092 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
12102 12103 12104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12102 def FulfillmentItemQuantityStatus.new @@_new ||= FulfillmentItemQuantityStatus.new('new') end |
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
12107 12108 12109 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12107 def FulfillmentItemQuantityStatus.shipped @@_shipped ||= FulfillmentItemQuantityStatus.new('shipped') end |
Instance Method Details
#to_hash ⇒ Object
12116 12117 12118 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12116 def to_hash value end |