All URIs are relative to https://api.digitalriver.com
Method | HTTP request | Description |
---|---|---|
createSources | POST /sources | Posts a source |
retrieveSources | GET /sources/{id} | Gets a source by identifier |
\DigitalRiver\ApiSdk\Model\Source createSources($credit_source)
Posts a source
Create a secondary source.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = DigitalRiver\ApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new DigitalRiver\ApiSdk\Api\SourcesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$credit_source = new \DigitalRiver\ApiSdk\Model\CreditSource(); // \DigitalRiver\ApiSdk\Model\CreditSource |
// Refer \DigitalRiver\ApiSdk\Model\CreditSource::$setters in digital-river-php/lib/Model/CreditSource.php to set the properties.
try {
$result = $apiInstance->createSources($credit_source);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SourcesApi->createSources: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
credit_source | \DigitalRiver\ApiSdk\Model\CreditSource | [optional] |
\DigitalRiver\ApiSdk\Model\Source
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\DigitalRiver\ApiSdk\Model\Source retrieveSources($id)
Gets a source by identifier
Retrieve the details of a source by supplying its unique identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = DigitalRiver\ApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new DigitalRiver\ApiSdk\Api\SourcesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Source identifier
try {
$result = $apiInstance->retrieveSources($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SourcesApi->retrieveSources: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | Source identifier |
\DigitalRiver\ApiSdk\Model\Source
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]