Get the customers.

@param Get\RequestData|null $requestData The request data.
@return Get\ApiResponse
551486
public function getCustomers(Get\RequestData $requestData = null)
    {
        $request = new Get\Request($requestData);

        $apiResponse = $this->sendRequest($request, Get\ApiResponse::class);

        /** @var Get\Response $response */
        $response = $apiResponse->getResponse();
        foreach ($response->getCustomers() as $customer) {
            if ($customer->getBirthday() instanceof \DateTime) {
                $customer->getBirthday()->setTime(0, 0, 0);
            }
        }

        return $apiResponse;
    }
899401
public function getCallByRequestId($requestId)
    {
        /** @var Call $call */
        foreach ($this->calls as $call) {
            if ($call->getInvocationMessage()->getRequestId() === $requestId) {
                return $call;
            }
        }

        return false;
    }
179189
protected function getData(Request $request)
    {
        $data = null;
        if ($request->query->has('dataId')) {
            $data = $this->get(DataRepository::class)->find($request->query->get('dataId'));
        }

        return $data;
    }
1343432
public function get($url, $queries = null, callable $callback = null)
    {
        if ( is_array($queries) )
        {
            $queries = '?' . http_build_query($queries);
        }

        return $this->send($url . $queries, self::GET, [], $callback);
    }
838347
public function get($params = null)
    {
        $curlHandle = $this->prepareGet($params);
        return $this->curlGetResponse($curlHandle);
    }
324930
public function request($url, $requestData) {
        if(!class_exists('GuzzleHttp\Client')) {
            throw new RuntimeException('The guzzle client is not installed. Please install guzzlehttp/guzzle');
        }

        $client = new Client();

        //We do not care exceptions, this will handled by the user
        $response = $client->request('POST', $url, ['form_params' => $requestData]);

        return $response->getBody()->getContents();
    }
455531
public function getCustomer($customerId)
    {
        $requestData = new Get\RequestData();
        $requestData->setCustomerId($customerId);

        $customers = $this->getCustomers($requestData)->getResponse()->getCustomers();

        return isset($customers[0]) ? $customers[0] : null;
    }
629121
public function getUpcomingAmount(GetUpcomingAmount\RequestData $requestData = null)
    {
        if ($requestData === null) {
            $requestData = new GetUpcomingAmount\RequestData();
        }

        $request = new GetUpcomingAmount\Request($requestData);

        return $this->sendRequest($request, GetUpcomingAmount\ApiResponse::class);
    }
265271
protected function processRequest($requestData)
    {
        $responseData = ['jsonrpc' => '2.0'];

        try {
            $method = ArrayHelper::getValue($requestData, 'method', '-');
            \Yii::trace('Running JSON-RPC 2.0 method: ' . $method, 'jsonrpc\Action::processRequest');

            \Yii::beginProfile('jsonrpc.controller.rpc.' . $method);

            $requestModel = $this->getRequestModel($requestData);
            $responseData['id'] = $requestModel->id;

            $reflectionMethod = $this->getControllerMethod($requestModel->method);
            $methodParams = $this->getMethodParams($reflectionMethod, $requestModel->params);

            $responseData['result'] = $this->runControllerAction($reflectionMethod->getName(), $methodParams);

            \Yii::endProfile('jsonrpc.controller.rpc.' . ArrayHelper::getValue($requestData, 'method', '-'));
        } catch (\Exception $ex) {
            unset($responseData['result']);

            $responseData['error'] = [
                'code' => $ex->getCode(),
                'message' => $ex->getMessage(),
                'data' => ($ex instanceof ValidationException) 
                    ? $ex->getData()
                    : null,
            ];
        }

        return $responseData;
    }
907525
public function getCustomers($limit = 100, $offset = 0)
    {
        /** @var CustomerFbApi $response */
        $response = $this->call(new Request('customer.get', array(), $limit, $offset), 'DVelopment\FastBill\Model\CustomerFbApi');

        return $response->getResponse()->getCustomers();
    }
125165
public function getRequest()
    {
        if (isset($_SERVER['REQUEST_METHOD'])) {
            return new PhpRequest(
                empty($_SESSION) ? [] : $_SESSION,
                empty($_COOKIE) ? [] : $_COOKIE,
                getallheaders(),
                $_SERVER,
                static::getInputParams($_SERVER, $_POST)
            );
        }

        return new NullRequest();
    }
1315606
public function getById($clientId, array $queryParams = [])
    {
        $response = $this->api->oauth2()->clients()->getById($clientId, $queryParams);

        return new ClientResponse($response);
    }
292937
public function getCustomerByExtUid($customerExtUid)
    {
        /** @var CustomerFbApi $response */
        $response = $this->call(new Request('customer.get', array('customer_ext_uid' => $customerExtUid)), 'DVelopment\FastBill\Model\CustomerFbApi');
        $customers = $response->getResponse()->getCustomers();

        return reset($customers);
    }
902223
protected function getResponse($requestUrl)
    {
        $response = $this->getHttpClient()->get($requestUrl);
        return json_decode($response->getBody()->getContents(), true);
    }
979965
public function get(int $id, CustomerRequest $customerRequest = null): Customer
    {
        $customerResource = $this->restClient->getResource(
            Customer::class,
            sprintf('/v2/customers/%d', $id)
        );

        return $this->hydrateCustomerWithSubEntities(
            $customerResource,
            $customerRequest ?: new CustomerRequest()
        );
    }
833919
public function retrieveOrder($requestParams)
    {
        $requiredParams = array("id");
        return $this->client->request($requestParams, $this->_mainTransactionEndpoint . "/" . self::ORDER, "get", $requiredParams, $options = NULL);
    }
1165605
public function createSubscription(Create\RequestData $requestData)
    {
        $request = new Create\Request($requestData);

        return $this->sendRequest($request, Create\ApiResponse::class);
    }