Class: TowerdataEmail::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token = nil, timeout = 5, headers = { 'Content-Type' => 'application/json' }) ⇒ Config

TowerdataEmail::Config must provide a valid API toke (set an environment variable to your credentials) token = ENV Arguments:

token: (String)

headers: (Hash)



156
157
158
159
160
161
162
163
# File 'lib/towerdata_email.rb', line 156

def initialize(token = nil, timeout = 5, headers =  { 'Content-Type' => 'application/json' } )
  @token = token
  @headers = headers
  @show_corrections = true
  @auto_accept_corrections = false
  @only_validate_on_change = false
  @timeout = timeout
end

Instance Attribute Details

#auto_accept_correctionsObject

Returns the value of attribute auto_accept_corrections.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def auto_accept_corrections
  @auto_accept_corrections
end

#headersObject

Returns the value of attribute headers.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def headers
  @headers
end

#only_validate_on_changeObject

Returns the value of attribute only_validate_on_change.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def only_validate_on_change
  @only_validate_on_change
end

#show_correctionsObject

Returns the value of attribute show_corrections.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def show_corrections
  @show_corrections
end

#timeoutObject

Returns the value of attribute timeout.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def timeout
  @timeout
end

#tokenObject

Returns the value of attribute token.



149
150
151
# File 'lib/towerdata_email.rb', line 149

def token
  @token
end