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.
13056 13057 13058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13056 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13054 13055 13056 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13054 def value @value end |
Class Method Details
.ALL ⇒ Object
13076 13077 13078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13076 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
13061 13062 13063 13064 13065 13066 13067 13068 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13061 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.
13091 13092 13093 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13091 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
13071 13072 13073 13074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13071 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
13081 13082 13083 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13081 def FulfillmentItemQuantityStatus.new @@_new ||= FulfillmentItemQuantityStatus.new('new') end |
.shipped ⇒ Object
Item has been packaged for shipment; can no longer be cancelled.
13086 13087 13088 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13086 def FulfillmentItemQuantityStatus.shipped @@_shipped ||= FulfillmentItemQuantityStatus.new('shipped') end |
Instance Method Details
#to_hash ⇒ Object
13095 13096 13097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13095 def to_hash value end |