Class: Io::Flow::V0::Models::WebhookStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::WebhookStatus
- 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 WebhookStatus for this value, creating a new instance for an unknown value.
- .failure ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of WebhookStatus for this value, or nil if not found.
- .pending ⇒ Object
- .success ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ WebhookStatus
constructor
A new instance of WebhookStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ WebhookStatus
Returns a new instance of WebhookStatus.
15573 15574 15575 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15573 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15571 15572 15573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15571 def value @value end |
Class Method Details
.ALL ⇒ Object
15593 15594 15595 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15593 def WebhookStatus.ALL @@all ||= [WebhookStatus.pending, WebhookStatus.success, WebhookStatus.failure] end |
.apply(value) ⇒ Object
Returns the instance of WebhookStatus for this value, creating a new instance for an unknown value
15578 15579 15580 15581 15582 15583 15584 15585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15578 def WebhookStatus.apply(value) if value.instance_of?(WebhookStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || WebhookStatus.new(value)) end end |
.failure ⇒ Object
15605 15606 15607 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15605 def WebhookStatus.failure @@_failure ||= WebhookStatus.new('failure') end |
.from_string(value) ⇒ Object
Returns the instance of WebhookStatus for this value, or nil if not found
15588 15589 15590 15591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15588 def WebhookStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) WebhookStatus.ALL.find { |v| v.value == value } end |
.pending ⇒ Object
15597 15598 15599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15597 def WebhookStatus.pending @@_pending ||= WebhookStatus.new('pending') end |
.success ⇒ Object
15601 15602 15603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15601 def WebhookStatus.success @@_success ||= WebhookStatus.new('success') end |
Instance Method Details
#to_hash ⇒ Object
15609 15610 15611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15609 def to_hash value end |