https://github.com/michabbb/sdk-ebay-rest-negotiation
A PHP SDK for the eBay Negotiation REST API
https://github.com/michabbb/sdk-ebay-rest-negotiation
api ebay negotiation rest-api sdk
Last synced: 3 months ago
JSON representation
A PHP SDK for the eBay Negotiation REST API
- Host: GitHub
- URL: https://github.com/michabbb/sdk-ebay-rest-negotiation
- Owner: michabbb
- Created: 2023-06-27T10:19:01.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T14:59:33.000Z (almost 2 years ago)
- Last Synced: 2023-12-14T23:16:22.394Z (over 1 year ago)
- Topics: api, ebay, negotiation, rest-api, sdk
- Language: PHP
- Homepage: https://developer.ebay.com/api-docs/sell/negotiation/overview.html
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sdk-ebay-rest-negotiation
The Negotiations API gives sellers the ability to proactively send discount offers to buyers who have shown an \"interest\" in their listings.
By sending buyers discount offers on listings where they have shown an interest, sellers can increase the velocity of their sales.
There are various ways for a buyer to show interest in a listing. For example, if a buyer adds the listing to their Watch list, or if they add the listing to their shopping cart and later abandon the cart, they are deemed to have shown an interest in the listing.
In the offers that sellers send, they can discount their listings by either a percentage off the listing price, or they can set a new discounted price that is lower than the original listing price.
For details about how seller offers work, see Sending offers to buyers.## Created via
```bash
docker run --rm -v ${PWD}:/app -w /app openapitools/openapi-generator-cli:v6.6.0 generate -i /app/sell_negotiation_v1_oas3.yaml -g php -o /app --config /app/openapi-config.php.ebay.negotiation.json
```## Installation & Usage
### Requirements
PHP 7.4 and later.
Should also work with PHP 8.0.### Composer
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/macropage/sdk-ebay-rest-negotiation.git"
}
],
"require": {
"macropage/sdk-ebay-rest-negotiation": "*@dev"
}
}
```Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
setAccessToken('YOUR_ACCESS_TOKEN');$apiInstance = new macropage\SDKs\ebay\rest\negotiation\Api\OfferApi(
// 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
);
$xEBAYCMARKETPLACEID = 'xEBAYCMARKETPLACEID_example'; // string | The eBay marketplace on which you want to search for eligible listings.
For a complete list of supported marketplaces, see Negotiation API requirements and restrictions.
$limit = 'limit_example'; // string | This query parameter specifies the maximum number of items to return from the result set on a page in the paginated response.Minimum: 1 Maximum: 200
Default: 10
$offset = 'offset_example'; // string | This query parameter specifies the number of results to skip in the result set before returning the first result in the paginated response.
Combine offset with the limit query parameter to control the items returned in the response. For example, if you supply an offset of0
and a limit of10
, the first page of the response contains the first 10 results from the complete list of items retrieved by the call. If offset is10
and limit is20
, the first page of the response contains items 11-30 from the complete result set.
Default: 0try {
$result = $apiInstance->findEligibleItems($xEBAYCMARKETPLACEID, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OfferApi->findEligibleItems: ', $e->getMessage(), PHP_EOL;
}```
## API Endpoints
All URIs are relative to *https://api.ebay.com/sell/negotiation/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*OfferApi* | [**findEligibleItems**](docs/Api/OfferApi.md#findeligibleitems) | **GET** /find_eligible_items |
*OfferApi* | [**sendOfferToInterestedBuyers**](docs/Api/OfferApi.md#sendoffertointerestedbuyers) | **POST** /send_offer_to_interested_buyers |## Models
- [Amount](docs/Model/Amount.md)
- [CreateOffersRequest](docs/Model/CreateOffersRequest.md)
- [EligibleItem](docs/Model/EligibleItem.md)
- [Error](docs/Model/Error.md)
- [ErrorParameter](docs/Model/ErrorParameter.md)
- [Offer](docs/Model/Offer.md)
- [OfferedItem](docs/Model/OfferedItem.md)
- [PagedEligibleItemCollection](docs/Model/PagedEligibleItemCollection.md)
- [SendOfferToInterestedBuyersCollectionResponse](docs/Model/SendOfferToInterestedBuyersCollectionResponse.md)
- [TimeDuration](docs/Model/TimeDuration.md)
- [User](docs/Model/User.md)## Authorization
Authentication schemes defined for the API:
### api_auth- **Type**: `OAuth`
- **Flow**: `accessCode`
- **Authorization URL**: `https://auth.ebay.com/oauth2/authorize`
- **Scopes**:
- **https://api.ebay.com/oauth/api_scope/sell.inventory**: View and manage your inventory and offers
- **https://api.ebay.com/oauth/api_scope/sell.inventory.readonly**: View your inventory and offers## Tests
To run the tests, use:
```bash
composer install
vendor/bin/phpunit
```## Author
## About this package
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `v1.1.0`
- Package version: `1.9.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`