<?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\Analytics\Services;

class AnalyticsService extends \DTS\eBaySDK\Analytics\Services\AnalyticsBaseService
{
    const API_VERSION = 'v1';

    /**
     * @property array $operations Associative array of operations provided by the service.
     */
    protected static $operations = [
        'GetASpecificSellerProfile' => [
            'method' => 'GET',
            'resource' => 'seller_standards_profile/{program}/{cycle}',
            'responseClass' => '\DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestResponse',
            'params' => [
                'cycle' => [
                    'valid' => ['string'],
                    'required' => true
                ],
                'program' => [
                    'valid' => ['string'],
                    'required' => true
                ]
            ]
        ],
        'GetAllSellerProfiles' => [
            'method' => 'GET',
            'resource' => 'seller_standards_profile',
            'responseClass' => '\DTS\eBaySDK\Analytics\Types\GetAllSellerProfilesRestResponse',
            'params' => [
            ]
        ],
        'GetTrafficReport' => [
            'method' => 'GET',
            'resource' => 'traffic_report',
            'responseClass' => '\DTS\eBaySDK\Analytics\Types\GetTrafficReportRestResponse',
            'params' => [
                'dimension' => [
                    'valid' => ['string'],
                    'required' => true
                ],
                'filter' => [
                    'valid' => ['string']
                ],
                'metric' => [
                    'valid' => ['string'],
                    'required' => true
                ]
            ]
        ]
    ];

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

    /**
     * @param \DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestRequest $request
     * @return \DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestResponse
     */
    public function getASpecificSellerProfile(\DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestRequest $request)
    {
        return $this->getASpecificSellerProfileAsync($request)->wait();
    }

    /**
     * @param \DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestRequest $request
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getASpecificSellerProfileAsync(\DTS\eBaySDK\Analytics\Types\GetASpecificSellerProfileRestRequest $request)
    {
        return $this->callOperationAsync('GetASpecificSellerProfile', $request);
    }

    /**
     * @return \DTS\eBaySDK\Analytics\Types\GetAllSellerProfilesRestResponse
     */
    public function getAllSellerProfiles()
    {
        return $this->getAllSellerProfilesAsync()->wait();
    }

    /**
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getAllSellerProfilesAsync()
    {
        return $this->callOperationAsync('GetAllSellerProfiles');
    }

    /**
     * @param \DTS\eBaySDK\Analytics\Types\GetTrafficReportRestRequest $request
     * @return \DTS\eBaySDK\Analytics\Types\GetTrafficReportRestResponse
     */
    public function getTrafficReport(\DTS\eBaySDK\Analytics\Types\GetTrafficReportRestRequest $request)
    {
        return $this->getTrafficReportAsync($request)->wait();
    }

    /**
     * @param \DTS\eBaySDK\Analytics\Types\GetTrafficReportRestRequest $request
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getTrafficReportAsync(\DTS\eBaySDK\Analytics\Types\GetTrafficReportRestRequest $request)
    {
        return $this->callOperationAsync('GetTrafficReport', $request);
    }
}
