class Io::Flow::V0::Models::WebhookStatus

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28480
def WebhookStatus.ALL
  @@all ||= [WebhookStatus.pending, WebhookStatus.success, WebhookStatus.failure]
end
apply(value) click to toggle source

Returns the instance of WebhookStatus for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 28465
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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28492
def WebhookStatus.failure
  @@_failure ||= WebhookStatus.new('failure')
end
from_string(value) click to toggle source

Returns the instance of WebhookStatus for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 28475
def WebhookStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  WebhookStatus.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28460
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
pending() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28484
def WebhookStatus.pending
  @@_pending ||= WebhookStatus.new('pending')
end
success() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28488
def WebhookStatus.success
  @@_success ||= WebhookStatus.new('success')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28496
def to_hash
  value
end