Class: Salesforce::Configuration

Inherits:
Common::Client::Configuration::REST show all
Defined in:
lib/salesforce/configuration.rb

Direct Known Subclasses

Gibft::Configuration

Instance Attribute Summary

Attributes inherited from Common::Client::Configuration::Base

#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent

Instance Method Summary collapse

Methods inherited from Common::Client::Configuration::Base

#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception, #service_name

Instance Method Details

#base_pathObject



5
6
7
# File 'lib/salesforce/configuration.rb', line 5

def base_path
  "#{self.class::SALESFORCE_INSTANCE_URL}/services/oauth2/token"
end

#connectionObject



9
10
11
12
13
14
15
16
17
# File 'lib/salesforce/configuration.rb', line 9

def connection
  @conn ||= Faraday.new(base_path) do |faraday|
    faraday.use :breakers
    faraday.request :url_encoded
    faraday.response :json
    faraday.response :betamocks if mock_enabled?
    faraday.adapter Faraday.default_adapter
  end
end

#mock_enabled?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/salesforce/configuration.rb', line 19

def mock_enabled?
  false
end