Class: Restforce::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/restforce/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



63
64
65
66
# File 'lib/restforce/config.rb', line 63

def initialize
  @api_version ||= '24.0'
  @host        ||= 'login.salesforce.com'
end

Instance Attribute Details

#api_versionObject

Returns the value of attribute api_version.



40
41
42
# File 'lib/restforce/config.rb', line 40

def api_version
  @api_version
end

#cacheObject

Set this to an object that responds to read, write and fetch and all GET requests will be cached.



61
62
63
# File 'lib/restforce/config.rb', line 61

def cache
  @cache
end

#client_idObject

The OAuth client id



48
49
50
# File 'lib/restforce/config.rb', line 48

def client_id
  @client_id
end

#client_secretObject

The OAuth client secret



50
51
52
# File 'lib/restforce/config.rb', line 50

def client_secret
  @client_secret
end

#hostObject

Set this to true if you’re authenticating with a Sandbox instance. Defaults to false.



53
54
55
# File 'lib/restforce/config.rb', line 53

def host
  @host
end

#instance_urlObject

Returns the value of attribute instance_url.



57
58
59
# File 'lib/restforce/config.rb', line 57

def instance_url
  @instance_url
end

#oauth_tokenObject

Returns the value of attribute oauth_token.



55
56
57
# File 'lib/restforce/config.rb', line 55

def oauth_token
  @oauth_token
end

#passwordObject

The password to use during login.



44
45
46
# File 'lib/restforce/config.rb', line 44

def password
  @password
end

#refresh_tokenObject

Returns the value of attribute refresh_token.



56
57
58
# File 'lib/restforce/config.rb', line 56

def refresh_token
  @refresh_token
end

#security_tokenObject

The security token to use during login.



46
47
48
# File 'lib/restforce/config.rb', line 46

def security_token
  @security_token
end

#usernameObject

The username to use during login.



42
43
44
# File 'lib/restforce/config.rb', line 42

def username
  @username
end

Instance Method Details

#loggerObject



68
69
70
# File 'lib/restforce/config.rb', line 68

def logger
  @logger ||= ::Logger.new STDOUT
end