Class: Api::EventType
- Inherits:
-
Object
- Object
- Api::EventType
- Defined in:
- lib/jamm/api/models/v1_event_type.rb
Constant Summary collapse
- UNSPECIFIED =
'EVENT_TYPE_UNSPECIFIED'- CHARGE_CREATED =
'EVENT_TYPE_CHARGE_CREATED'- CHARGE_UPDATED =
'EVENT_TYPE_CHARGE_UPDATED'- CHARGE_SUCCESS =
'EVENT_TYPE_CHARGE_SUCCESS'- CHARGE_FAIL =
'EVENT_TYPE_CHARGE_FAIL'- CHARGE_CANCEL =
'EVENT_TYPE_CHARGE_CANCEL'- CONTRACT_ACTIVATED =
'EVENT_TYPE_CONTRACT_ACTIVATED'- TESTING =
'EVENT_TYPE_TESTING'
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
27 28 29 |
# File 'lib/jamm/api/models/v1_event_type.rb', line 27 def self.all_vars @all_vars ||= [UNSPECIFIED, CHARGE_CREATED, CHARGE_UPDATED, CHARGE_SUCCESS, CHARGE_FAIL, CHARGE_CANCEL, CONTRACT_ACTIVATED, TESTING].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
34 35 36 |
# File 'lib/jamm/api/models/v1_event_type.rb', line 34 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
41 42 43 44 45 |
# File 'lib/jamm/api/models/v1_event_type.rb', line 41 def build_from_hash(value) return value if EventType.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #EventType" end |