[ 'valid' => ['string'], 'default' => \DTS\eBaySDK\ProductMetadata\Services\ProductMetadataService::API_VERSION ], 'globalId' => [ 'valid' => ['string'] ] ]; } /** * Builds the needed eBay HTTP headers. * * @param string $operationName The name of the operation been called. * * @return array An associative array of eBay http headers. */ protected function getEbayHeaders($operationName) { $headers = []; // Add required headers first. $headers[self::HDR_APP_ID] = $this->getConfig('credentials')->getAppId(); $headers[self::HDR_OPERATION_NAME] = $operationName; // Add optional headers. if ($this->getConfig('apiVersion')) { $headers[self::HDR_API_VERSION] = $this->getConfig('apiVersion'); } if ($this->getConfig('globalId')) { $headers[self::HDR_GLOBAL_ID] = $this->getConfig('globalId'); } return $headers; } }