src/Commerce/Charity/V1/README.md
# brandon14/ebay-commerce-charity-v1
The Charity API allows third-party developers to search for and access details on supported charitable organizations.
## 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](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/brandon14/ebay-commerce-charity-v1.git"
}
],
"require": {
"brandon14/ebay-commerce-charity-v1": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/brandon14/ebay-commerce-charity-v1/vendor/autoload.php');
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = TNT\Ebay\Commerce\Charity\V1\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new TNT\Ebay\Commerce\Charity\V1\Api\CharityOrgApi(
// 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
);
$charity_org_id = 'charity_org_id_example'; // string | The unique ID of the charitable organization.
$x_ebay_c_marketplace_id = 'x_ebay_c_marketplace_id_example'; // string | A header used to specify the eBay marketplace ID.<br /><br /><b>Valid Values:</b> <code>EBAY_GB</code> and <code>EBAY_US</code>
try {
$result = $apiInstance->getCharityOrg($charity_org_id, $x_ebay_c_marketplace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CharityOrgApi->getCharityOrg: ', $e->getMessage(), PHP_EOL;
}
```
## API Endpoints
All URIs are relative to *https://api.ebay.com/commerce/charity/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CharityOrgApi* | [**getCharityOrg**](docs/Api/CharityOrgApi.md#getcharityorg) | **GET** /charity_org/{charity_org_id} |
*CharityOrgApi* | [**getCharityOrgByLegacyId**](docs/Api/CharityOrgApi.md#getcharityorgbylegacyid) | **GET** /charity_org/get_charity_org_by_legacy_id |
*CharityOrgApi* | [**getCharityOrgs**](docs/Api/CharityOrgApi.md#getcharityorgs) | **GET** /charity_org |
## Models
- [Address](docs/Model/Address.md)
- [CharityOrg](docs/Model/CharityOrg.md)
- [CharitySearchResponse](docs/Model/CharitySearchResponse.md)
- [Error](docs/Model/Error.md)
- [ErrorParameter](docs/Model/ErrorParameter.md)
- [GeoCoordinates](docs/Model/GeoCoordinates.md)
- [Image](docs/Model/Image.md)
- [Location](docs/Model/Location.md)
## Authorization
### api_auth
- **Type**: `OAuth`
- **Flow**: `application`
- **Authorization URL**: ``
- **Scopes**:
- **https://api.ebay.com/oauth/api_scope**: View public data from eBay
## 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.2.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`