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

class FileTransferService extends \DTS\eBaySDK\FileTransfer\Services\FileTransferBaseService
{
    const API_VERSION = '1.1.0';

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

    /**
     * @param \DTS\eBaySDK\FileTransfer\Types\UploadFileRequest $request
     * @return \DTS\eBaySDK\FileTransfer\Types\UploadFileResponse
     */
    public function uploadFile(\DTS\eBaySDK\FileTransfer\Types\UploadFileRequest $request)
    {
        return $this->uploadFileAsync($request)->wait();
    }

    /**
     * @param \DTS\eBaySDK\FileTransfer\Types\UploadFileRequest $request
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function uploadFileAsync(\DTS\eBaySDK\FileTransfer\Types\UploadFileRequest $request)
    {
        return $this->callOperationAsync(
            'uploadFile',
            $request,
            '\DTS\eBaySDK\FileTransfer\Types\UploadFileResponse'
        );
    }

    /**
     * @param \DTS\eBaySDK\FileTransfer\Types\DownloadFileRequest $request
     * @return \DTS\eBaySDK\FileTransfer\Types\DownloadFileResponse
     */
    public function downloadFile(\DTS\eBaySDK\FileTransfer\Types\DownloadFileRequest $request)
    {
        return $this->downloadFileAsync($request)->wait();
    }

    /**
     * @param \DTS\eBaySDK\FileTransfer\Types\DownloadFileRequest $request
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function downloadFileAsync(\DTS\eBaySDK\FileTransfer\Types\DownloadFileRequest $request)
    {
        return $this->callOperationAsync(
            'downloadFile',
            $request,
            '\DTS\eBaySDK\FileTransfer\Types\DownloadFileResponse'
        );
    }
}
