Class: Io::Flow::V0::Models::DutyItemApprovalStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::DutyItemApprovalStatus
- 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 DutyItemApprovalStatus for this value, creating a new instance for an unknown value.
- .certified ⇒ Object
- .decertified ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of DutyItemApprovalStatus for this value, or nil if not found.
- .pending ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ DutyItemApprovalStatus
constructor
A new instance of DutyItemApprovalStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ DutyItemApprovalStatus
Returns a new instance of DutyItemApprovalStatus.
19039 19040 19041 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19039 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19037 19038 19039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19037 def value @value end |
Class Method Details
.ALL ⇒ Object
19059 19060 19061 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19059 def DutyItemApprovalStatus.ALL @@all ||= [DutyItemApprovalStatus.pending, DutyItemApprovalStatus.certified, DutyItemApprovalStatus.decertified] end |
.apply(value) ⇒ Object
Returns the instance of DutyItemApprovalStatus for this value, creating a new instance for an unknown value
19044 19045 19046 19047 19048 19049 19050 19051 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19044 def DutyItemApprovalStatus.apply(value) if value.instance_of?(DutyItemApprovalStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || DutyItemApprovalStatus.new(value)) end end |
.certified ⇒ Object
19067 19068 19069 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19067 def DutyItemApprovalStatus.certified @@_certified ||= DutyItemApprovalStatus.new('certified') end |
.decertified ⇒ Object
19071 19072 19073 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19071 def DutyItemApprovalStatus.decertified @@_decertified ||= DutyItemApprovalStatus.new('decertified') end |
.from_string(value) ⇒ Object
Returns the instance of DutyItemApprovalStatus for this value, or nil if not found
19054 19055 19056 19057 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19054 def DutyItemApprovalStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) DutyItemApprovalStatus.ALL.find { |v| v.value == value } end |
.pending ⇒ Object
19063 19064 19065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19063 def DutyItemApprovalStatus.pending @@_pending ||= DutyItemApprovalStatus.new('pending') end |
Instance Method Details
#to_hash ⇒ Object
19075 19076 19077 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19075 def to_hash value end |