Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release-17.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
David T. Sadler committed Jun 12, 2018
2 parents 1d9eeae + c511fd1 commit fefee1b
Show file tree
Hide file tree
Showing 126 changed files with 6,061 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG

## 17.0.0 - 2018-06-12

### Features

* Support Catalog API version v1_beta.2.0.

## 16.0.0 - 2018-05-12

### Features
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -99,6 +99,10 @@ sync_bus:
rsync -rtvu --delete --exclude *BaseService.php ../ebay-api-sdk-php/dist/BusinessPoliciesManagement/src/BusinessPoliciesManagement/ src/BusinessPoliciesManagement/
rsync -rtvu --delete --exclude /Mocks/ --exclude /Services/ ../ebay-api-sdk-php/dist/BusinessPoliciesManagement/test/BusinessPoliciesManagement/ test/BusinessPoliciesManagement/

sync_catalog:
rsync -rtvu --delete --exclude *BaseService.php ../ebay-api-sdk-php/dist/Catalog/src/Catalog/ src/Catalog/
rsync -rtvu --delete --exclude /Mocks/ --exclude /Services/ ../ebay-api-sdk-php/dist/Catalog/test/Catalog/ test/Catalog/

sync_feed:
rsync -rtvu --delete --exclude *BaseService.php ../ebay-api-sdk-php/dist/Feed/src/Feed/ src/Feed/
rsync -rtvu --delete --exclude /Mocks/ --exclude /Services/ ../ebay-api-sdk-php/dist/Feed/test/Feed/ test/Feed/
Expand Down Expand Up @@ -190,6 +194,7 @@ sync_all: sync_account \
sync_browse \
sync_bulk \
sync_bus \
sync_catalog \
sync_feedback \
sync_file \
sync_finding \
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/configuration.rst
Expand Up @@ -93,7 +93,7 @@ authorization
~~~~~~~~~~~~~

:Type: ``string``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Trading``, ``Taxonomy``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Catalog``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Trading``, ``Taxonomy``
:Required: true, except for the Trading service.

All eBay RESTful services use OAuth 2.0 access tokens for application authentication and user authorization. The token passed via ``authorization`` can be either an User or Application token. You must ensure that the token has the require scope for the operation that you are calling.
Expand Down Expand Up @@ -441,7 +441,7 @@ marketplaceId
~~~~~~~~~~~~~

:Type: ``string``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Catalog``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``

The string identifier for the eBay site your API requests are to be sent to. For example, you would pass the value ``EBAY-UK`` to specify the eBay UK site.

Expand All @@ -467,15 +467,15 @@ requestLanguage
~~~~~~~~~~~~~~~

:Type: ``string``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Catalog``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``

This configuration option will set the ``Content-Language`` HTTP header for the request.

responseLanguage
~~~~~~~~~~~~~~~~

:Type: ``string``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``
:Services: ``Account``, ``Analytics``, ``Browse``, ``Catalog``, ``Feed``, ``Fulfillment``, ``Inventory``, ``Marketing``, ``Metadata``, ``Order``, ``Taxonomy``

This configuration option will set the ``Accept-Language`` HTTP header for the request.

Expand Down
19 changes: 19 additions & 0 deletions src/Catalog/Enums/AspectDataTypeEnum.php
@@ -0,0 +1,19 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class AspectDataTypeEnum
{
const C_DATE = 'DATE';
const C_NUMBER = 'NUMBER';
const C_STRING = 'STRING';
const C_STRING_ARRAY = 'STRING_ARRAY';
}
17 changes: 17 additions & 0 deletions src/Catalog/Enums/AspectModeEnum.php
@@ -0,0 +1,17 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class AspectModeEnum
{
const C_FREE_TEXT = 'FREE_TEXT';
const C_SELECTION_ONLY = 'SELECTION_ONLY';
}
21 changes: 21 additions & 0 deletions src/Catalog/Enums/ChangeRequestStatus.php
@@ -0,0 +1,21 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class ChangeRequestStatus
{
const C_APPROVED = 'APPROVED';
const C_APPROVED_WITH_MODIFICATIONS = 'APPROVED_WITH_MODIFICATIONS';
const C_REJECTED = 'REJECTED';
const C_SUBMITTED = 'SUBMITTED';
const C_UNDER_EXTENDED_REVIEW = 'UNDER_EXTENDED_REVIEW';
const C_UNDER_REVIEW = 'UNDER_REVIEW';
}
17 changes: 17 additions & 0 deletions src/Catalog/Enums/ChangeRequestType.php
@@ -0,0 +1,17 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class ChangeRequestType
{
const C_PRODUCT_CREATION = 'PRODUCT_CREATION';
const C_PRODUCT_UPDATE = 'PRODUCT_UPDATE';
}
17 changes: 17 additions & 0 deletions src/Catalog/Enums/ItemToAspectCardinalityEnum.php
@@ -0,0 +1,17 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class ItemToAspectCardinalityEnum
{
const C_MULTI = 'MULTI';
const C_SINGLE = 'SINGLE';
}
26 changes: 26 additions & 0 deletions src/Catalog/Enums/ProductAttributeName.php
@@ -0,0 +1,26 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class ProductAttributeName
{
const C_ASPECT_NAME = 'ASPECT_NAME';
const C_BRAND = 'BRAND';
const C_CATEGORY = 'CATEGORY';
const C_DESCRIPTION = 'DESCRIPTION';
const C_EAN = 'EAN';
const C_GENERAL = 'GENERAL';
const C_IMAGE = 'IMAGE';
const C_ISBN = 'ISBN';
const C_MPN = 'MPN';
const C_TITLE = 'TITLE';
const C_UPC = 'UPC';
}
18 changes: 18 additions & 0 deletions src/Catalog/Enums/ReferenceType.php
@@ -0,0 +1,18 @@
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/

namespace DTS\eBaySDK\Catalog\Enums;

class ReferenceType
{
const C_INVENTORY_ITEM = 'INVENTORY_ITEM';
const C_LISTING = 'LISTING';
const C_LISTING_DRAFT = 'LISTING_DRAFT';
}
79 changes: 79 additions & 0 deletions src/Catalog/Services/CatalogBaseService.php
@@ -0,0 +1,79 @@
<?php
namespace DTS\eBaySDK\Catalog\Services;

/**
* Base class for the Catalog service.
*/
class CatalogBaseService extends \DTS\eBaySDK\Services\BaseRestService
{
/**
* @var array $endPoints The API endpoints.
*/
protected static $endPoints = [
'sandbox' => 'https://api.sandbox.ebay.com/commerce/catalog',
'production' => 'https://api.ebay.com/commerce/catalog'
];

/**
* HTTP header constant. The Authentication Token that is used to validate the caller has permission to access the eBay servers.
*/
const HDR_AUTHORIZATION = 'Authorization';

/**
* HTTP header constant. The global ID of the eBay site on which the transaction took place.
*/
const HDR_MARKETPLACE_ID = 'X-EBAY-C-MARKETPLACE-ID';

/**
* @param array $config Configuration option values.
*/
public function __construct(array $config)
{
parent::__construct($config);
}

/**
* Returns definitions for each configuration option that is supported.
*
* @return array An associative array of configuration definitions.
*/
public static function getConfigDefinitions()
{
$definitions = parent::getConfigDefinitions();

return $definitions + [
'apiVersion' => [
'valid' => ['string'],
'default' => \DTS\eBaySDK\Catalog\Services\CatalogService::API_VERSION,
'required' => true
],
'authorization' => [
'valid' => ['string'],
'required' => true
],
'marketplaceId' => [
'valid' => ['string']
]
];
}

/**
* Builds the needed eBay HTTP headers.
*
* @return array An associative array of eBay HTTP headers.
*/
protected function getEbayHeaders()
{
$headers = [];

// Add required headers first.
$headers[self::HDR_AUTHORIZATION] = 'Bearer '.$this->getConfig('authorization');

// Add optional headers.
if ($this->getConfig('marketplaceId')) {
$headers[self::HDR_MARKETPLACE_ID] = $this->getConfig('marketplaceId');
}

return $headers;
}
}

0 comments on commit fefee1b

Please sign in to comment.