code: public function getPaymentsReport($paymentsReport)
      {
          if (!($paymentsReport instanceof PaymentsReportRequest)) {
              $paymentsReport = RequestCreator::create(PaymentsReportRequest::class, $paymentsReport);
          }
  
          ObjectRecursiveValidator::validate($paymentsReport);
          $paymentsReportSerializer = new PaymentsReportSerializer($paymentsReport);
          $paymentsReportTransport = new PaymentsReportTransport($paymentsReportSerializer);
  
          $filename = [];
          $filename[] = 'payments_report';
          $filename[] = $paymentsReport->getDatetimeFrom()->format('Y-m-d-H-i-s');
          $filename[] = '_';
          $filename[] = $paymentsReport->getDatetimeTo()->format('Y-m-d-H-i-s');
          $filename[] = '.csv';
  
          return $this->download($paymentsReportTransport, join($filename));
      }
docs: @param array|PaymentsReportRequest $paymentsReport
  
  @return $this|Psr7\MessageTrait
  
  @throws TransportException