Class: ElasticEmail::ContactHistEventType

Inherits:
Object
  • Object
show all
Defined in:
lib/ElasticEmail/models/contact_hist_event_type.rb

Constant Summary collapse

OPENED =
"Opened".freeze
CLICKED =
"Clicked".freeze
BOUNCED =
"Bounced".freeze
UNSUBSCRIBED =
"Unsubscribed".freeze
COMPLAINED =
"Complained".freeze
ACTIVATED =
"Activated".freeze
TRANSACTIONAL_UNSUBSCRIBED =
"TransactionalUnsubscribed".freeze
MANUAL_STATUS_CHANGE =
"ManualStatusChange".freeze
"ManualConsentTrackingChange".freeze
ACTIVATION_SENT =
"ActivationSent".freeze
JOURNEY_STARTED =
"JourneyStarted".freeze
JOURNEY_STEP_PROCESSED =
"JourneyStepProcessed".freeze
JOURNEY_FINISHED =
"JourneyFinished".freeze
DELETED =
"Deleted".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



36
37
38
# File 'lib/ElasticEmail/models/contact_hist_event_type.rb', line 36

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



43
44
45
46
47
# File 'lib/ElasticEmail/models/contact_hist_event_type.rb', line 43

def build_from_hash(value)
  constantValues = ContactHistEventType.constants.select { |c| ContactHistEventType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #ContactHistEventType" if constantValues.empty?
  value
end