Class: ForestAdminDatasourceZendesk::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/forest_admin_datasource_zendesk/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subdomain:, username:, token:) ⇒ Configuration

Returns a new instance of Configuration.



5
6
7
8
9
10
# File 'lib/forest_admin_datasource_zendesk/configuration.rb', line 5

def initialize(subdomain:, username:, token:)
  @subdomain = subdomain
  @username  = username
  @token     = token
  validate!
end

Instance Attribute Details

#subdomainObject (readonly)

Returns the value of attribute subdomain.



3
4
5
# File 'lib/forest_admin_datasource_zendesk/configuration.rb', line 3

def subdomain
  @subdomain
end

#tokenObject (readonly)

Returns the value of attribute token.



3
4
5
# File 'lib/forest_admin_datasource_zendesk/configuration.rb', line 3

def token
  @token
end

#usernameObject (readonly)

Returns the value of attribute username.



3
4
5
# File 'lib/forest_admin_datasource_zendesk/configuration.rb', line 3

def username
  @username
end

Instance Method Details

#urlObject



12
13
14
# File 'lib/forest_admin_datasource_zendesk/configuration.rb', line 12

def url
  "https://#{@subdomain}.zendesk.com/api/v2"
end