Class: Docuseal::Configuration
- Inherits:
-
Object
- Object
- Docuseal::Configuration
- Defined in:
- lib/docuseal.rb
Constant Summary collapse
- DEFAULT_BASE_URI =
"https://api.docuseal.co/".freeze
- DEFAULT_REQUEST_TIMEOUT =
120
Instance Attribute Summary collapse
- #api_key ⇒ Object
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#global_headers ⇒ Object
Returns the value of attribute global_headers.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_key ⇒ Object
29 30 31 |
# File 'lib/docuseal.rb', line 29 def api_key @api_key || (raise ConfigurationError, "Docuseal api_key missing!") end |
#base_uri ⇒ Object
Returns the value of attribute base_uri.
16 17 18 |
# File 'lib/docuseal.rb', line 16 def base_uri @base_uri end |
#global_headers ⇒ Object
Returns the value of attribute global_headers.
16 17 18 |
# File 'lib/docuseal.rb', line 16 def global_headers @global_headers end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
16 17 18 |
# File 'lib/docuseal.rb', line 16 def request_timeout @request_timeout end |