Class: Io::Flow::V0::Models::PayoutStatusCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PayoutStatusCode
- 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 PayoutStatusCode for this value, creating a new instance for an unknown value.
- .cancelled ⇒ Object
- .failed ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of PayoutStatusCode for this value, or nil if not found.
- .scheduled ⇒ Object
- .sent ⇒ Object
- .succeeded ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ PayoutStatusCode
constructor
A new instance of PayoutStatusCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PayoutStatusCode
Returns a new instance of PayoutStatusCode.
22865 22866 22867 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22865 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
22863 22864 22865 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22863 def value @value end |
Class Method Details
.ALL ⇒ Object
22885 22886 22887 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22885 def PayoutStatusCode.ALL @@all ||= [PayoutStatusCode.scheduled, PayoutStatusCode.sent, PayoutStatusCode.cancelled, PayoutStatusCode.failed, PayoutStatusCode.succeeded] end |
.apply(value) ⇒ Object
Returns the instance of PayoutStatusCode for this value, creating a new instance for an unknown value
22870 22871 22872 22873 22874 22875 22876 22877 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22870 def PayoutStatusCode.apply(value) if value.instance_of?(PayoutStatusCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PayoutStatusCode.new(value)) end end |
.cancelled ⇒ Object
22897 22898 22899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22897 def PayoutStatusCode.cancelled @@_cancelled ||= PayoutStatusCode.new('cancelled') end |
.failed ⇒ Object
22901 22902 22903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22901 def PayoutStatusCode.failed @@_failed ||= PayoutStatusCode.new('failed') end |
.from_string(value) ⇒ Object
Returns the instance of PayoutStatusCode for this value, or nil if not found
22880 22881 22882 22883 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22880 def PayoutStatusCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PayoutStatusCode.ALL.find { |v| v.value == value } end |
.scheduled ⇒ Object
22889 22890 22891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22889 def PayoutStatusCode.scheduled @@_scheduled ||= PayoutStatusCode.new('scheduled') end |
.sent ⇒ Object
22893 22894 22895 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22893 def PayoutStatusCode.sent @@_sent ||= PayoutStatusCode.new('sent') end |
.succeeded ⇒ Object
22905 22906 22907 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22905 def PayoutStatusCode.succeeded @@_succeeded ||= PayoutStatusCode.new('succeeded') end |
Instance Method Details
#to_hash ⇒ Object
22909 22910 22911 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22909 def to_hash value end |