Class: Io::Flow::V0::Models::ReturnItemStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ReturnItemStatus
- 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 ReturnItemStatus for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of ReturnItemStatus for this value, or nil if not found.
-
.non_returnable ⇒ Object
The item in the catalog cannot be returned.
-
.returnable ⇒ Object
The item in the catalog can be returned.
Instance Method Summary collapse
-
#initialize(value) ⇒ ReturnItemStatus
constructor
A new instance of ReturnItemStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ReturnItemStatus
Returns a new instance of ReturnItemStatus.
25907 25908 25909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25907 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25905 25906 25907 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25905 def value @value end |
Class Method Details
.ALL ⇒ Object
25927 25928 25929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25927 def ReturnItemStatus.ALL @@all ||= [ReturnItemStatus.returnable, ReturnItemStatus.non_returnable] end |
.apply(value) ⇒ Object
Returns the instance of ReturnItemStatus for this value, creating a new instance for an unknown value
25912 25913 25914 25915 25916 25917 25918 25919 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25912 def ReturnItemStatus.apply(value) if value.instance_of?(ReturnItemStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ReturnItemStatus.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of ReturnItemStatus for this value, or nil if not found
25922 25923 25924 25925 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25922 def ReturnItemStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ReturnItemStatus.ALL.find { |v| v.value == value } end |
.non_returnable ⇒ Object
The item in the catalog cannot be returned
25937 25938 25939 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25937 def ReturnItemStatus.non_returnable @@_non_returnable ||= ReturnItemStatus.new('non-returnable') end |
.returnable ⇒ Object
The item in the catalog can be returned
25932 25933 25934 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25932 def ReturnItemStatus.returnable @@_returnable ||= ReturnItemStatus.new('returnable') end |
Instance Method Details
#to_hash ⇒ Object
25941 25942 25943 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25941 def to_hash value end |