Qore SalesforceRestClient Module Reference  1.5.1
SalesforceRestClient::SalesforceRestConnection Class Reference

class for Salesforce.com REST connections; returns SalesforceRestClient::SalesforceRestClient objects More...

Inheritance diagram for SalesforceRestClient::SalesforceRestConnection:

Public Member Methods

 constructor (string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
 creates the SalesforceRestConnection connection object More...
 
DataProvider::AbstractDataProvider getDataProvider ()
 returns a data provider object for this connection More...
 
string getType ()
 returns "sfrests"
 
bool hasDataProvider ()
 returns True as this connection returns a data provider with the getDataProvider() method More...
 

Public Attributes

const ConnectionScheme = ...
 Connection entry info.
 

Private Member Methods

hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl ()
 Returns the ConnectionSchemeInfo hash for this object.
 
SalesforceRestClient getImpl (bool connect=True, *hash< auto > rtopts)
 returns a SalesforceRestClient::SalesforceRestClient object More...
 

Detailed Description

class for Salesforce.com REST connections; returns SalesforceRestClient::SalesforceRestClient objects

supports all RestClient options as well as the following options:

  • api: the Salesforce.com API to use; use "auto" (the default) to use the latest API version
  • client_id: (required) the Salesforce.com "consumer key" for the Connected App
  • client_secret: (required) the Salesforce.com "consumer secret" for the Connected App
  • oauth_url_auth: default value "https://login.salesforce.com/services/oauth2/authorize"
  • oauth_url_token: default value "https://login.salesforce.com/services/oauth2/token" (used for logging in to Salesforce.com)
  • oauth_url_revoke: default value "https://login.salesforce.com/services/oauth2/revoke"
See also
SalesforceRestClient::constructor() for more information on the above options
Since
SalesforceRestConnection 1.1

Member Function Documentation

◆ constructor()

SalesforceRestClient::SalesforceRestConnection::constructor ( string  name,
string  description,
string  url,
hash< auto >  attributes = {},
hash< auto >  options = {} 
)

creates the SalesforceRestConnection connection object

Parameters
namethe name of the connection
descriptionconnection description
urlconnection URL (potentially with password info)
attributesvarious attributes. See below
optionsconnection options

See AbstractConnection::constructor() for attributes and options reference.

◆ getDataProvider()

DataProvider::AbstractDataProvider SalesforceRestClient::SalesforceRestConnection::getDataProvider ( )

returns a data provider object for this connection

Returns
a data provider object for this connection
Exceptions
DATA-PROVIDER-ERRORthis object does not support the data provider API

◆ getImpl()

SalesforceRestClient SalesforceRestClient::SalesforceRestConnection::getImpl ( bool  connect = True,
*hash< auto >  rtopts 
)
privatevirtual

returns a SalesforceRestClient::SalesforceRestClient object

Parameters
connectif True, then the connection is returned already connected
rtoptsthis connection type does not accept any runtime options, so this parameter is ignored
Returns
a SalesforceRestClient object

Reimplemented from RestClient::RestConnection.

◆ hasDataProvider()

bool SalesforceRestClient::SalesforceRestConnection::hasDataProvider ( )

returns True as this connection returns a data provider with the getDataProvider() method

Returns
True as this connection returns a data provider with the getDataProvider() method
See also
getDataProvider()