Module: WhatsappSdk::Resource::Template::Category

Defined in:
lib/whatsapp_sdk/resource/template.rb

Constant Summary collapse

AUTHENTICATION =
"AUTHENTICATION"
MARKETING =
"MARKETING"
UTILITY =
"UTILITY"
CATEGORIES =
[AUTHENTICATION, MARKETING, UTILITY].freeze

Class Method Summary collapse

Class Method Details

.serialize(category) ⇒ Object



34
35
36
# File 'lib/whatsapp_sdk/resource/template.rb', line 34

def self.serialize(category)
  CATEGORIES.include?(category) ? category : nil
end

.valid?(category) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/whatsapp_sdk/resource/template.rb', line 30

def self.valid?(category)
  CATEGORIES.include?(category)
end