Skip to content

trollandtoad/ebay-commerce-notification

Repository files navigation

OpenAPIClient-php

The eBay Notification API enables management of the entire end-to-end eBay notification experience by allowing users to:

  • Browse for supported notification topics and retrieve topic details
  • Create, configure, and manage notification destination endpionts
  • Configure, manage, and test notification subscriptions
  • Process eBay notifications and verify the integrity of the message payload

Installation & Usage

Requirements

PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?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;
}

API Endpoints

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

Class Method HTTP request Description
ConfigApi getConfig GET /config
ConfigApi updateConfig PUT /config
DestinationApi createDestination POST /destination
DestinationApi deleteDestination DELETE /destination/{destination_id}
DestinationApi getDestination GET /destination/{destination_id}
DestinationApi getDestinations GET /destination
DestinationApi updateDestination PUT /destination/{destination_id}
PublicKeyApi getPublicKey GET /public_key/{public_key_id}
SubscriptionApi createSubscription POST /subscription
SubscriptionApi deleteSubscription DELETE /subscription/{subscription_id}
SubscriptionApi disableSubscription POST /subscription/{subscription_id}/disable
SubscriptionApi enableSubscription POST /subscription/{subscription_id}/enable
SubscriptionApi getSubscription GET /subscription/{subscription_id}
SubscriptionApi getSubscriptions GET /subscription
SubscriptionApi test POST /subscription/{subscription_id}/test
SubscriptionApi updateSubscription PUT /subscription/{subscription_id}
TopicApi getTopic GET /topic/{topic_id}
TopicApi getTopics GET /topic

Models

Authorization

api_auth

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.1.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published