Class: Io::Flow::V0::Models::WebhookRequestStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::WebhookRequestStatus
- 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 WebhookRequestStatus for this value, creating a new instance for an unknown value.
- .failure ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of WebhookRequestStatus for this value, or nil if not found.
- .pending ⇒ Object
- .success ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ WebhookRequestStatus
constructor
A new instance of WebhookRequestStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ WebhookRequestStatus
Returns a new instance of WebhookRequestStatus.
5891 5892 5893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5891 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5889 5890 5891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5889 def value @value end |
Class Method Details
.ALL ⇒ Object
5911 5912 5913 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5911 def WebhookRequestStatus.ALL @@all ||= [WebhookRequestStatus.pending, WebhookRequestStatus.success, WebhookRequestStatus.failure] end |
.apply(value) ⇒ Object
Returns the instance of WebhookRequestStatus for this value, creating a new instance for an unknown value
5896 5897 5898 5899 5900 5901 5902 5903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5896 def WebhookRequestStatus.apply(value) if value.instance_of?(WebhookRequestStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || WebhookRequestStatus.new(value)) end end |
.failure ⇒ Object
5923 5924 5925 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5923 def WebhookRequestStatus.failure @@_failure ||= WebhookRequestStatus.new('failure') end |
.from_string(value) ⇒ Object
Returns the instance of WebhookRequestStatus for this value, or nil if not found
5906 5907 5908 5909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5906 def WebhookRequestStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) WebhookRequestStatus.ALL.find { |v| v.value == value } end |
.pending ⇒ Object
5915 5916 5917 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5915 def WebhookRequestStatus.pending @@_pending ||= WebhookRequestStatus.new('pending') end |
.success ⇒ Object
5919 5920 5921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5919 def WebhookRequestStatus.success @@_success ||= WebhookRequestStatus.new('success') end |
Instance Method Details
#to_hash ⇒ Object
5927 5928 5929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5927 def to_hash value end |