Skip to content

Latest commit

 

History

History
125 lines (80 loc) · 3.25 KB

ConfigApi.md

File metadata and controls

125 lines (80 loc) · 3.25 KB

eBay\Commerce\Notification\ConfigApi

All URIs are relative to https://api.ebay.com/commerce/notification/v1.

Method HTTP request Description
getConfig() GET /config
updateConfig() PUT /config

getConfig()

getConfig(): \eBay\Commerce\Notification\Model\Config

This method allows applications to retrieve a previously created configuration.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: api_auth
$config = eBay\Commerce\Notification\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new eBay\Commerce\Notification\Api\ConfigApi(
    // 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
);

try {
    $result = $apiInstance->getConfig();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->getConfig: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\eBay\Commerce\Notification\Model\Config

Authorization

api_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateConfig()

updateConfig($config)

This method allows applications to create a new configuration or update an existing configuration. This app-level configuration allows developers to set up alerts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: api_auth
$config = eBay\Commerce\Notification\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new eBay\Commerce\Notification\Api\ConfigApi(
    // 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
);
$config = new \eBay\Commerce\Notification\Model\Config(); // \eBay\Commerce\Notification\Model\Config | The configurations for this application.

try {
    $apiInstance->updateConfig($config);
} catch (Exception $e) {
    echo 'Exception when calling ConfigApi->updateConfig: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
config \eBay\Commerce\Notification\Model\Config The configurations for this application. [optional]

Return type

void (empty response body)

Authorization

api_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]