Exception: WhatsappSdk::Resource::Errors::InvalidLanguageError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/whatsapp_sdk/resource/errors.rb

Constant Summary collapse

URL_AVAILABLE_LANGUAGES =
"https://developers.facebook.com/docs/whatsapp/api/messages/message-templates"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(language:) ⇒ InvalidLanguageError

Returns a new instance of InvalidLanguageError.



32
33
34
35
36
# File 'lib/whatsapp_sdk/resource/errors.rb', line 32

def initialize(language:)
  @language = language

  super("Invalid language. Check the available languages in #{URL_AVAILABLE_LANGUAGES}.")
end

Instance Attribute Details

#languageObject (readonly)

Returns the value of attribute language.



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

def language
  @language
end