<?php

namespace Tops\AmazonSellingPartnerAPI\Api;

class VendorInvoicesApi extends BaseApi
{
    /**
    * Operation submit Invoices
    *
    * @param array $body required
    *
    * @return json
    *
    * @author Jignesh Kapadia <jignesh@topsinfosolutions.com>
    *
    * About more Ref :- https://developer-docs.amazon.com/sp-api/docs/vendor-invoices-api-v1-reference#post-vendorpaymentsv1invoices
    */
    public function submitInvoices($body)
    {
        $resource_path = '/vendor/payments/v1/invoices';
        $http_body = $body;
        $query_params = [];
        $method = 'POST';

        $url = $this->config->getHost() . $resource_path;

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

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