Class: Pay::Asaas::ApiClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/asaas/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
# File 'lib/pay/asaas/client.rb', line 12

def initialize
  @api_key = Pay::Asaas.api_key
  @base_url = Pay::Asaas.api_url || "https://sandbox.asaas.com/api/v3"
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



10
11
12
# File 'lib/pay/asaas/client.rb', line 10

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



10
11
12
# File 'lib/pay/asaas/client.rb', line 10

def base_url
  @base_url
end

Instance Method Details

#validate!Object

Raises:



17
18
19
# File 'lib/pay/asaas/client.rb', line 17

def validate!
  raise ConfigurationError, "API key is required" unless api_key
end