2017 © Pedro Peláez
 

library salesforce-client

WakeOnWeb Salesforce client

image

wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  • Monday, February 19, 2018
  • by steph_py
  • Repository
  • 4 Watchers
  • 0 Stars
  • 283 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 23 % Grown

The README.md

PHP Salesforce client

Build Status, (*1)

Supported technologies:, (*2)

- rest
    - oauth2 grant type: password.

Please, contribute to support other one., (*3)

Usage

use WakeOnWeb\SalesforceClient\REST;
use WakeOnWeb\SalesforceClient\ClientInterface;

$client = new REST\Client(
    new REST\Gateway('https://cs81.salesforce.com', '41.0'),
    new REST\GrantType\PasswordStrategy(
        'consumer_key',
        'consumer_secret',
        'login',
        'password',
        'security_token'
    )
);

Available exception -------------------, (*4)

  • DuplicatesDetectedException
  • EntityIsDeletedException (when try to delete an entity already deleted)
  • NotFoundException (when an object cannot be found)
  • ...

Get object

try {
    $salesforceObject = $client->getObject( 'Account', '1337ID')); // all fields
} catch (\WakeOnWeb\SalesforceClient\Exception\NotFoundException) {
    // this object does not exist, do a specifig thing.
}

//$salesforceObject->getAttributes();
//$salesforceObject->getFields();

//$client->getObject( 'Account', '1337ID', ['Name', 'OwnerId', 'CreatedAt'] )); // specific fields

Create object

// creation will be a SalesforceObjectCreationObject
$creation = $client->createObject( 'Account', ['name' => 'Chuck Norrs'] );
// $creation->getId();
// $creation->isSuccess();
// $creation->getErrors();
// $creation->getWarnings();

Edit object

$client->patchObject( 'Account', '1337ID', ['name' => 'Chuck Norris'] ));

Delete object

$client->deleteObject( 'Account', '1337ID'));

SOQL

// creation will be a SalesforceObjectCreationObjectResults
$client->searchSOQL('SELECT name from Account'); // NOT_ALL by default.
$client->searchSOQL('SELECT name from Account', ClientInterface::ALL);
// $creation->getTotalSize();
// $creation->isDone();
// $creation->getRecords();

Other

$client->getAvailableResources();
$client->getAllObjects();
$client->describeObjectMetadata('Account');

The Versions

19/02 2018

dev-master

9999999-dev https://github.com/wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  Sources   Download

MIT

The Requires

 

The Development Requires

salesforce

19/02 2018

v1.0.3

1.0.3.0 https://github.com/wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  Sources   Download

MIT

The Requires

 

The Development Requires

salesforce

07/02 2018

v1.0.2

1.0.2.0 https://github.com/wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  Sources   Download

MIT

The Requires

 

The Development Requires

salesforce

06/02 2018

v1.0.1

1.0.1.0 https://github.com/wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  Sources   Download

MIT

The Requires

 

The Development Requires

salesforce

03/01 2018

v1.0.0

1.0.0.0 https://github.com/wakeonweb/salesforce-client

WakeOnWeb Salesforce client

  Sources   Download

MIT

The Requires

 

The Development Requires

salesforce