- A
- B
- C
- H
- N
- U
- V
- ActiveModel::Validations
Constants
| HUMAN_ATTRIBUTE_NAMES | = | { username: "Subdomain", custom_domain: "Custom Domain", api_key: "API key" }.freeze |
| VERSION | = | "1".freeze |
Attributes
| [R] | integration |
Class Public methods
human_attribute_name(attr, options = {}) Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 14 def human_attribute_name(attr, options = {}) HUMAN_ATTRIBUTE_NAMES[attr.to_sym] || super end
new(integration) Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 34 def initialize(integration) @integration = integration end
Instance Public methods
after_validation() Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 55 def after_validation if custom_domain.present? set_configuration(:custom_domain, Util::Url.to_url(custom_domain)) end end
api_key() Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 47 def api_key get_authentication(:api_key) end
before_validation() Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 61 def before_validation username.try(:strip!) end
connected?() Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 43 def connected? api_key.present? end
custom_domain() Link
Source: show
# File app/lib/integration_provider/website_toolbox.rb, line 65 def custom_domain @custom_domain ||= get_configuration(:custom_domain) &.gsub(%r{[^-0-9A-Za-z:/.]}, "") &.downcase &.strip end