Class: Repull::WebhookEventType
- Inherits:
-
Object
- Object
- Repull::WebhookEventType
- 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
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
34 35 36 |
# File 'lib/repull/models/webhook_event_type.rb', line 34 def self.all_vars @all_vars ||= [RESERVATION_CREATED, RESERVATION_UPDATED, RESERVATION_CANCELLED, RESERVATION_MESSAGE_RECEIVED, LISTING_CREATED, LISTING_UPDATED, LISTING_DELETED, CALENDAR_UPDATED, ACCOUNT_CREATED, ACCOUNT_DISCONNECTED, AI_OPERATION_COMPLETED, AI_OPERATION_FAILED, PAYMENT_COMPLETED, PAYMENT_REFUNDED, REPULL_PING].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
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
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 |