Class: Onfido::WebhookEventObjectStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/onfido/models/webhook_event_object_status.rb

Constant Summary collapse

PROCESSING =
"processing".freeze
AWAITING_INPUT =
"awaiting_input".freeze
AWAITING_CLIENT_INPUT =
"awaiting_client_input".freeze
APPROVED =
"approved".freeze
DECLINED =
"declined".freeze
REVIEW =
"review".freeze
ABANDONED =
"abandoned".freeze
ERROR =
"error".freeze
STARTED =
"started".freeze
CANCELLED =
"cancelled".freeze
COMPLETED =
"completed".freeze
AWAITING_DATA =
"awaiting_data".freeze
AWAITING_APPROVAL =
"awaiting_approval".freeze
COMPLETE =
"complete".freeze
WITHDRAWN =
"withdrawn".freeze
IN_PROGRESS =
"in_progress".freeze
AWAITING_APPLICANT =
"awaiting_applicant".freeze
PAUSED =
"paused".freeze
REOPENED =
"reopened".freeze
UNKNOWN_DEFAULT_OPEN_API =
"unknown_default_open_api".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



39
40
41
# File 'lib/onfido/models/webhook_event_object_status.rb', line 39

def self.all_vars
  @all_vars ||= [PROCESSING, AWAITING_INPUT, AWAITING_CLIENT_INPUT, APPROVED, DECLINED, REVIEW, ABANDONED, ERROR, STARTED, CANCELLED, COMPLETED, AWAITING_DATA, AWAITING_APPROVAL, COMPLETE, WITHDRAWN, IN_PROGRESS, AWAITING_APPLICANT, PAUSED, REOPENED, UNKNOWN_DEFAULT_OPEN_API].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



46
47
48
# File 'lib/onfido/models/webhook_event_object_status.rb', line 46

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



53
54
55
56
# File 'lib/onfido/models/webhook_event_object_status.rb', line 53

def build_from_hash(value)
  return value if WebhookEventObjectStatus.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #WebhookEventObjectStatus"
end