Class: Zernio::TrackingTagInstallBlockedReason

Inherits:
Object
  • Object
show all
Defined in:
lib/zernio-sdk/models/tracking_tag_install_blocked_reason.rb

Constant Summary collapse

INSUFFICIENT_PERMISSIONS =
"insufficient_permissions".freeze
SCRIPTS_STRIPPED =
"scripts_stripped".freeze
WORDPRESS_COM_PLAN =
"wordpress_com_plan".freeze
NO_WIDGET_AREAS =
"no_widget_areas".freeze
WIDGETS_API_UNAVAILABLE =
"widgets_api_unavailable".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_vars ⇒ Object



24
25
26
# File 'lib/zernio-sdk/models/tracking_tag_install_blocked_reason.rb', line 24

def self.all_vars
  @all_vars ||= [INSUFFICIENT_PERMISSIONS, SCRIPTS_STRIPPED, WORDPRESS_COM_PLAN, NO_WIDGET_AREAS, WIDGETS_API_UNAVAILABLE].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



31
32
33
# File 'lib/zernio-sdk/models/tracking_tag_install_blocked_reason.rb', line 31

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



38
39
40
41
# File 'lib/zernio-sdk/models/tracking_tag_install_blocked_reason.rb', line 38

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