Class: Io::Flow::V0::Models::ReturnPolicyState
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ReturnPolicyState
- 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 ReturnPolicyState for this value, creating a new instance for an unknown value.
- .current ⇒ Object
- .deleting ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ReturnPolicyState for this value, or nil if not found.
- .updating ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ReturnPolicyState
constructor
A new instance of ReturnPolicyState.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ReturnPolicyState
Returns a new instance of ReturnPolicyState.
20014 20015 20016 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20014 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20012 20013 20014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20012 def value @value end |
Class Method Details
.ALL ⇒ Object
20034 20035 20036 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20034 def ReturnPolicyState.ALL @@all ||= [ReturnPolicyState.current, ReturnPolicyState.deleting, ReturnPolicyState.updating] end |
.apply(value) ⇒ Object
Returns the instance of ReturnPolicyState for this value, creating a new instance for an unknown value
20019 20020 20021 20022 20023 20024 20025 20026 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20019 def ReturnPolicyState.apply(value) if value.instance_of?(ReturnPolicyState) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ReturnPolicyState.new(value)) end end |
.current ⇒ Object
20038 20039 20040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20038 def ReturnPolicyState.current @@_current ||= ReturnPolicyState.new('current') end |
.deleting ⇒ Object
20042 20043 20044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20042 def ReturnPolicyState.deleting @@_deleting ||= ReturnPolicyState.new('deleting') end |
.from_string(value) ⇒ Object
Returns the instance of ReturnPolicyState for this value, or nil if not found
20029 20030 20031 20032 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20029 def ReturnPolicyState.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ReturnPolicyState.ALL.find { |v| v.value == value } end |
.updating ⇒ Object
20046 20047 20048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20046 def ReturnPolicyState.updating @@_updating ||= ReturnPolicyState.new('updating') end |
Instance Method Details
#to_hash ⇒ Object
20050 20051 20052 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20050 def to_hash value end |