Class: Pickpoint::Config
- Inherits:
-
Object
- Object
- Pickpoint::Config
- Defined in:
- lib/pickpoint/config.rb
Overview
Public-api client config. Provide exactly one of api_key / client_auth / access_token.
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#client_auth ⇒ Object
Returns the value of attribute client_auth.
-
#concurrency ⇒ Object
Returns the value of attribute concurrency.
-
#http_adapter ⇒ Object
Returns the value of attribute http_adapter.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#retry_base ⇒ Object
Returns the value of attribute retry_base.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(api_key: nil, client_auth: nil, access_token: nil, base_url: nil, max_retries: nil, retry_base: nil, timeout: nil, concurrency: nil, http_adapter: nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(api_key: nil, client_auth: nil, access_token: nil, base_url: nil, max_retries: nil, retry_base: nil, timeout: nil, concurrency: nil, http_adapter: nil) ⇒ Config
Returns a new instance of Config.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/pickpoint/config.rb', line 21 def initialize( api_key: nil, client_auth: nil, access_token: nil, base_url: nil, max_retries: nil, retry_base: nil, timeout: nil, concurrency: nil, http_adapter: nil ) @api_key = api_key @client_auth = client_auth @access_token = access_token @base_url = base_url @max_retries = max_retries @retry_base = retry_base @timeout = timeout @concurrency = concurrency # Optional callable: call(method, url, headers, body) -> [status, body] @http_adapter = http_adapter end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def access_token @access_token end |
#api_key ⇒ Object
Returns the value of attribute api_key.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def base_url @base_url end |
#client_auth ⇒ Object
Returns the value of attribute client_auth.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def client_auth @client_auth end |
#concurrency ⇒ Object
Returns the value of attribute concurrency.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def concurrency @concurrency end |
#http_adapter ⇒ Object
Returns the value of attribute http_adapter.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def http_adapter @http_adapter end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def max_retries @max_retries end |
#retry_base ⇒ Object
Returns the value of attribute retry_base.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def retry_base @retry_base end |
#timeout ⇒ Object
Returns the value of attribute timeout.
18 19 20 |
# File 'lib/pickpoint/config.rb', line 18 def timeout @timeout end |