Skip to content

Commit

Permalink
Initial generation from OpenAPI Spec v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Caffe1neAdd1ct committed Jul 29, 2021
0 parents commit b9ae583
Show file tree
Hide file tree
Showing 54 changed files with 8,531 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore

composer.phar
/vendor/

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

# php-cs-fixer cache
.php_cs.cache

# PHPUnit cache
.phpunit.result.cache
23 changes: 23 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
52 changes: 52 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.gitignore
.openapi-generator-ignore
.php_cs
.travis.yml
README.md
composer.json
docs/Api/ListingViolationApi.md
docs/Api/ListingViolationSummaryApi.md
docs/Model/AspectRecommendations.md
docs/Model/ComplianceDetail.md
docs/Model/ComplianceSummary.md
docs/Model/ComplianceSummaryInfo.md
docs/Model/ComplianceViolation.md
docs/Model/CorrectiveRecommendations.md
docs/Model/NameValueList.md
docs/Model/PagedComplianceViolationCollection.md
docs/Model/ProductRecommendation.md
docs/Model/SuppressViolationRequest.md
docs/Model/VariationDetails.md
git_push.sh
lib/ApiException.php
lib/Compliance/ListingViolationApi.php
lib/Compliance/ListingViolationSummaryApi.php
lib/Compliance/Model/AspectRecommendations.php
lib/Compliance/Model/ComplianceDetail.php
lib/Compliance/Model/ComplianceSummary.php
lib/Compliance/Model/ComplianceSummaryInfo.php
lib/Compliance/Model/ComplianceViolation.php
lib/Compliance/Model/CorrectiveRecommendations.php
lib/Compliance/Model/ModelInterface.php
lib/Compliance/Model/NameValueList.php
lib/Compliance/Model/PagedComplianceViolationCollection.php
lib/Compliance/Model/ProductRecommendation.php
lib/Compliance/Model/SuppressViolationRequest.php
lib/Compliance/Model/VariationDetails.php
lib/Configuration.php
lib/HeaderSelector.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/ListingViolationApiTest.php
test/Api/ListingViolationSummaryApiTest.php
test/Model/AspectRecommendationsTest.php
test/Model/ComplianceDetailTest.php
test/Model/ComplianceSummaryInfoTest.php
test/Model/ComplianceSummaryTest.php
test/Model/ComplianceViolationTest.php
test/Model/CorrectiveRecommendationsTest.php
test/Model/NameValueListTest.php
test/Model/PagedComplianceViolationCollectionTest.php
test/Model/ProductRecommendationTest.php
test/Model/SuppressViolationRequestTest.php
test/Model/VariationDetailsTest.php
1 change: 1 addition & 0 deletions .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.1
23 changes: 23 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRules([
'@PSR2' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('test')
->exclude('tests')
->in(__DIR__)
);
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.2
- 7.3
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"
130 changes: 130 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# OpenAPIClient-php

Service for providing information to sellers about their listings being non-compliant, or at risk for becoming non-compliant, against eBay listing policies.


## Installation & Usage

### Requirements

PHP 7.2 and later.

### Composer

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github/zvps/ebay-sell-compliance-php-client.git"
}
],
"require": {
"zvps/ebay-sell-compliance-php-client": "*@dev"
}
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
<?php
require_once('/path/to/OpenAPIClient-php/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: Authorization Code
$config = Ebay\Sell\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Ebay\Sell\Api\ListingViolationApi(
// 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
);
$x_ebay_c_marketplace_id = 'x_ebay_c_marketplace_id_example'; // string | This header is required and is used to specify the eBay marketplace identifier. Supported values for this header can be found in the MarketplaceIdEnum type definition. Note that Version 1.4.0 of the Compliance API is only supported on the US, UK, Australia, Canada {English), and Germany sites.
$compliance_type = 'compliance_type_example'; // string | A seller uses this query parameter to retrieve listing violations of a specific compliance type. Only one compliance type value should be passed in here. See ComplianceTypeEnum for more information on the compliance types that can be passed in here. If the listing_id query parameter is used, the compliance_type query parameter {if passed in) will be ignored. This is because all of a listing's policy violations {each compliance type) will be returned if a listing_id is provided. Either the listing_id or a compliance_type query parameter must be used, and if the seller only wants to view listing violations of a specific compliance type, both of these parameters can be used. Note: The listing_id query parameter is not yet available for use, so the seller does not have the ability to retrieve listing violations for one or more specific listings. Until the listing_id query parameter becomes available, the compliance_type query parameter is required with each getListingViolations call.
$offset = 56; // int | The integer value input into this field controls the first listing violation in the result set that will be displayed at the top of the response. The offset and limit query parameters are used to control the pagination of the output. For example, if offset is set to 10 and limit is set to 10, the call retrieves listing violations 11 thru 20 from the resulting set of violations. Note: This feature employs a zero-based index, where the first item in the list has an offset of 0. If the listing_id parameter is included in the request, this parameter will be ignored. Default: 0 {zero)
$listing_id = 'listing_id_example'; // string | Note: This query parameter is not yet supported for the Compliance API. Please note that until this query parameter becomes available, the compliance_type query parameter is required with each getListingViolations call. This query parameter is used if the user wants to view all listing violations for one or more eBay listings. The string value passed into this field is the unique identifier of the listing, sometimes referred to as the Item ID. Either the listing_id or a compliance_type query parameter must be used, and if the seller only wants to view listing violations of a specific compliance type, both of these parameters can be used. Up to 50 listing IDs can be specified with this query parameter, and each unique listing ID is separated with a comma.
$limit = 56; // int | This query parameter is used if the user wants to set a limit on the number of listing violations that are returned on one page of the result set. This parameter is used in conjunction with the offset parameter to control the pagination of the output. For example, if offset is set to 10 and limit is set to 10, the call retrieves listing violations 11 thru 20 from the collection of listing violations that match the value set in the compliance_type parameter. Note: This feature employs a zero-based index, where the first item in the list has an offset of 0. If the listing_id parameter is included in the request, this parameter will be ignored. Default: 100 Maximum: 200
$filter = 'filter_example'; // string | This filter allows a user to retrieve only listings that are currently out of compliance, or only listings that are at risk of becoming out of compliance. Although other filters may be added in the future, complianceState is the only supported filter type at this time. The two compliance 'states' are OUT_OF_COMPLIANCE and AT_RISK. Below is an example of how to set up this compliance state filter. Notice that the filter type and filter value are separated with a colon (:) character, and the filter value is wrapped with curly brackets. filter=complianceState:{OUT_OF_COMPLIANCE}

try {
$result = $apiInstance->getListingViolations($x_ebay_c_marketplace_id, $compliance_type, $offset, $listing_id, $limit, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListingViolationApi->getListingViolations: ', $e->getMessage(), PHP_EOL;
}

```

## API Endpoints

All URIs are relative to *https://api.ebay.com/sell/compliance/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ListingViolationApi* | [**getListingViolations**](docs/Api/ListingViolationApi.md#getlistingviolations) | **GET** /listing_violation |
*ListingViolationApi* | [**suppressViolation**](docs/Api/ListingViolationApi.md#suppressviolation) | **POST** /suppress_listing_violation |
*ListingViolationSummaryApi* | [**getListingViolationsSummary**](docs/Api/ListingViolationSummaryApi.md#getlistingviolationssummary) | **GET** /listing_violation_summary |

## Models

- [AspectRecommendations](docs/Model/AspectRecommendations.md)
- [ComplianceDetail](docs/Model/ComplianceDetail.md)
- [ComplianceSummary](docs/Model/ComplianceSummary.md)
- [ComplianceSummaryInfo](docs/Model/ComplianceSummaryInfo.md)
- [ComplianceViolation](docs/Model/ComplianceViolation.md)
- [CorrectiveRecommendations](docs/Model/CorrectiveRecommendations.md)
- [NameValueList](docs/Model/NameValueList.md)
- [PagedComplianceViolationCollection](docs/Model/PagedComplianceViolationCollection.md)
- [ProductRecommendation](docs/Model/ProductRecommendation.md)
- [SuppressViolationRequest](docs/Model/SuppressViolationRequest.md)
- [VariationDetails](docs/Model/VariationDetails.md)

## Authorization

### Authorization Code

- **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

## 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: `1.4.1`
- Package version: `5.0.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
43 changes: 43 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "zvps\/ebay-sell-compliance-php-client",
"version": "5.0.0",
"description": "Service for providing information to sellers about their listings being non-compliant, or at risk for becoming non-compliant, against eBay listing policies.",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https:\/\/openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"homepage": "https:\/\/openapi-generator.tech"
}
],
"require": {
"php": ">=5.6",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp\/guzzle": "^6.2"
},
"require-dev": {
"phpunit\/phpunit": "^8.0 || ^9.0",
"friendsofphp\/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": {
"Ebay\\Sell\\": "lib\/"
}
},
"autoload-dev": {
"psr-4": {
"Ebay\\Sell\\Test\\": "test\/"
}
}
}
Loading

0 comments on commit b9ae583

Please sign in to comment.