<?php

namespace Tops\AmazonSellingPartnerAPI\Api;

class VendorTransactionStatusApi extends BaseApi
{
    /**
    * Get Transaction
    *
    * @param $transactionId
    *
    * @return Json
    *
    * @author Jignesh Kapadia <jignesh@topsinfosolutions.com>
    *
    * About more Ref:- https://developer-docs.amazon.com/sp-api/docs/vendor-transaction-status-api-v1-reference#get-vendortransactionsv1transactionstransactionid
    */

    public function getTransaction($transactionId)
    {
        $resource_path = '/vendor/transactions/v1/transactions/'.$transactionId;
       
        $url = $this->config->getHost() . $resource_path;
        $http_body = '';
        $query_params = [];
        $method = 'GET';

        $curl_headers = $this->generateRequest($resource_path, $query_params, $http_body, $this->config, $method);

        return $this->sendRequest($url, $query_params, $http_body, $curl_headers, $method);
    }
}
