Exception: WhatsAppCloudApi::Errors::KapsoProxyRequiredError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feature) ⇒ KapsoProxyRequiredError

Returns a new instance of KapsoProxyRequiredError.



316
317
318
319
320
321
322
323
324
# File 'lib/whatsapp_cloud_api/errors.rb', line 316

def initialize(feature)
  @feature = feature
  @help_url = 'https://kapso.ai/'
  
  message = "#{feature} is only available via the Kapso Proxy. " \
            "Set base_url to https://app.kapso.ai/api/meta and provide kapso_api_key. " \
            "Create a free account at #{help_url}"
  super(message)
end

Instance Attribute Details

#featureObject (readonly)

Returns the value of attribute feature.



314
315
316
# File 'lib/whatsapp_cloud_api/errors.rb', line 314

def feature
  @feature
end

#help_urlObject (readonly)

Returns the value of attribute help_url.



314
315
316
# File 'lib/whatsapp_cloud_api/errors.rb', line 314

def help_url
  @help_url
end