Class: Repull::WebhookEventType

Inherits:
Object
  • Object
show all
Defined in:
lib/repull/models/webhook_event_type.rb

Constant Summary collapse

RESERVATION_CREATED =
"reservation.created".freeze
RESERVATION_UPDATED =
"reservation.updated".freeze
RESERVATION_CANCELLED =
"reservation.cancelled".freeze
RESERVATION_MESSAGE_RECEIVED =
"reservation.message.received".freeze
LISTING_CREATED =
"listing.created".freeze
LISTING_UPDATED =
"listing.updated".freeze
LISTING_DELETED =
"listing.deleted".freeze
CALENDAR_UPDATED =
"calendar.updated".freeze
ACCOUNT_CREATED =
"account.created".freeze
ACCOUNT_DISCONNECTED =
"account.disconnected".freeze
AI_OPERATION_COMPLETED =
"ai.operation.completed".freeze
AI_OPERATION_FAILED =
"ai.operation.failed".freeze
PAYMENT_COMPLETED =
"payment.completed".freeze
PAYMENT_REFUNDED =
"payment.refunded".freeze
REPULL_PING =
"repull.ping".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class 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



41
42
43
# File 'lib/repull/models/webhook_event_type.rb', line 41

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



48
49
50
51
# File 'lib/repull/models/webhook_event_type.rb', line 48

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