Class: Docuseal::Configuration

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

Constant Summary collapse

DEFAULT_BASE_URI =
"https://api.docuseal.co/".freeze
DEFAULT_REQUEST_TIMEOUT =
120

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
27
# File 'lib/docuseal.rb', line 22

def initialize
  @api_key = ENV["DOCUSEAL_API_KEY"]
  @request_timeout = DEFAULT_REQUEST_TIMEOUT
  @base_uri = ENV.fetch("DOCUSEAL_BASE_URI", DEFAULT_BASE_URI)
  @global_headers = {}
end

Instance Attribute Details

#api_keyObject



29
30
31
# File 'lib/docuseal.rb', line 29

def api_key
  @api_key || (raise ConfigurationError, "Docuseal api_key missing!")
end

#base_uriObject

Returns the value of attribute base_uri.



16
17
18
# File 'lib/docuseal.rb', line 16

def base_uri
  @base_uri
end

#global_headersObject

Returns the value of attribute global_headers.



16
17
18
# File 'lib/docuseal.rb', line 16

def global_headers
  @global_headers
end

#request_timeoutObject

Returns the value of attribute request_timeout.



16
17
18
# File 'lib/docuseal.rb', line 16

def request_timeout
  @request_timeout
end