This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
6,061 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
Oops, something went wrong.