src/Client.php
public function getPayoutsReport($payoutsReport)
    {
        if (!($payoutsReport instanceof PayoutsReportRequest)) {
            $payoutsReport = RequestCreator::create(PayoutsReportRequest::class, $payoutsReport);
        }

        ObjectRecursiveValidator::validate($payoutsReport);
        $payoutsReportSerializer = new PayoutsReportSerializer($payoutsReport);
        $payoutsReportTransport = new PayoutsReportTransport($payoutsReportSerializer);

        $filename = [];
        $filename[] = '$payouts_report';
        $filename[] = $payoutsReport->getDatetimeFrom()->format('Y-m-d-H-i-s');
        $filename[] = '_';
        $filename[] = $payoutsReport->getDatetimeTo()->format('Y-m-d-H-i-s');
        $filename[] = '.csv';

        return $this->download($payoutsReportTransport, join($filename));
    }
public function getPayoutsReport($payoutsReport)
    {
        if (!($payoutsReport instanceof PayoutsReportRequest)) {
            $payoutsReport = RequestCreator::create(PayoutsReportRequest::class, $payoutsReport);
        }

        ObjectRecursiveValidator::validate($payoutsReport);
        $payoutsReportSerializer = new PayoutsReportSerializer($payoutsReport);
        $payoutsReportTransport = new PayoutsReportTransport($payoutsReportSerializer);

        $filename = [];
        $filename[] = '$payouts_report';
        $filename[] = $payoutsReport->getDatetimeFrom()->format('Y-m-d-H-i-s');
        $filename[] = '_';
        $filename[] = $payoutsReport->getDatetimeTo()->format('Y-m-d-H-i-s');
        $filename[] = '.csv';

        return $this->download($payoutsReportTransport, join($filename));
    }
@param array|PayoutsReportRequest $payoutsReport

@return Psr7\MessageTrait
@throws TransportException