Class: Vindi::Configuration
- Inherits:
-
Object
- Object
- Vindi::Configuration
- Defined in:
- lib/vindi/configuration.rb
Constant Summary collapse
- DEFAULT_API_URL =
"https://sandbox-gp.vindi.com.br/api/v1"
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#cache_ttl ⇒ Object
Returns the value of attribute cache_ttl.
-
#cached_resources ⇒ Object
Returns the value of attribute cached_resources.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#retry_backoff_factor ⇒ Object
Returns the value of attribute retry_backoff_factor.
-
#retry_base_delay ⇒ Object
Returns the value of attribute retry_base_delay.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vindi/configuration.rb', line 10 def initialize @api_key = nil @api_url = DEFAULT_API_URL @cache_store = nil @cache_ttl = 300 @cached_resources = %i[plans products discounts payment_methods] @max_retries = 3 @retry_backoff_factor = 2 @retry_base_delay = 1.0 end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def api_key @api_key end |
#api_url ⇒ Object
Returns the value of attribute api_url.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def api_url @api_url end |
#cache_store ⇒ Object
Returns the value of attribute cache_store.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def cache_store @cache_store end |
#cache_ttl ⇒ Object
Returns the value of attribute cache_ttl.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def cache_ttl @cache_ttl end |
#cached_resources ⇒ Object
Returns the value of attribute cached_resources.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def cached_resources @cached_resources end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def max_retries @max_retries end |
#retry_backoff_factor ⇒ Object
Returns the value of attribute retry_backoff_factor.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def retry_backoff_factor @retry_backoff_factor end |
#retry_base_delay ⇒ Object
Returns the value of attribute retry_base_delay.
5 6 7 |
# File 'lib/vindi/configuration.rb', line 5 def retry_base_delay @retry_base_delay end |