| @@ 32-48 (lines=17) @@ | ||
| 29 | * @return Contracts\IntencaoVenda\GetByFiltrosResponse |
|
| 30 | * @throws \Exception |
|
| 31 | */ |
|
| 32 | public function getByFiltros(Contracts\IntencaoVenda\GetByFiltrosRequest $getByFiltrosRequest) |
|
| 33 | { |
|
| 34 | try{ |
|
| 35 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 36 | 'body' => json_encode($getByFiltrosRequest), |
|
| 37 | ]); |
|
| 38 | ||
| 39 | return SerializerHelper::denormalize( |
|
| 40 | $this->response->json(), |
|
| 41 | Contracts\IntencaoVenda\GetByFiltrosResponse::class |
|
| 42 | ); |
|
| 43 | }catch (RequestException $ex) { |
|
| 44 | $this->requestException($ex); |
|
| 45 | }catch (\Exception $ex){ |
|
| 46 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @param integer $intencaoVendaId |
|
| @@ 32-48 (lines=17) @@ | ||
| 29 | * @return Contracts\Login\LoginResponse |
|
| 30 | * @throws \Exception |
|
| 31 | */ |
|
| 32 | public function login(Contracts\Login\LoginRequest $loginRequest) |
|
| 33 | { |
|
| 34 | try{ |
|
| 35 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 36 | 'body' => json_encode($loginRequest) |
|
| 37 | ]); |
|
| 38 | ||
| 39 | return SerializerHelper::denormalize( |
|
| 40 | $this->response->json(), |
|
| 41 | Contracts\Login\LoginResponse::class |
|
| 42 | ); |
|
| 43 | }catch (RequestException $ex) { |
|
| 44 | $this->requestException($ex); |
|
| 45 | }catch (\Exception $ex){ |
|
| 46 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @return Contracts\Login\LoginResponse |
|
| @@ 72-88 (lines=17) @@ | ||
| 69 | * @return Contracts\Login\ConsultaLoginResponse |
|
| 70 | * @throws \Exception |
|
| 71 | */ |
|
| 72 | public function consultaLogin(Contracts\Login\ConsultaLoginRequest $consultaLoginRequest) |
|
| 73 | { |
|
| 74 | try{ |
|
| 75 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 76 | 'body' => json_encode($consultaLoginRequest) |
|
| 77 | ]); |
|
| 78 | ||
| 79 | return SerializerHelper::denormalize( |
|
| 80 | $this->response->json(), |
|
| 81 | Contracts\Login\ConsultaLoginResponse::class |
|
| 82 | ); |
|
| 83 | }catch (RequestException $ex) { |
|
| 84 | $this->requestException($ex); |
|
| 85 | }catch (\Exception $ex){ |
|
| 86 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | } |
|
| @@ 31-47 (lines=17) @@ | ||
| 28 | * @return Contracts\PagamentoExterno\GetByFiltrosResponse |
|
| 29 | * @throws \Exception |
|
| 30 | */ |
|
| 31 | public function getByFiltros(Contracts\PagamentoExterno\GetByFiltrosRequest $getByFiltrosRequest) |
|
| 32 | { |
|
| 33 | try{ |
|
| 34 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 35 | 'body' => json_encode($getByFiltrosRequest), |
|
| 36 | ]); |
|
| 37 | ||
| 38 | return SerializerHelper::denormalize( |
|
| 39 | $this->response->json(), |
|
| 40 | Contracts\PagamentoExterno\GetByFiltrosResponse::class |
|
| 41 | ); |
|
| 42 | }catch (RequestException $ex) { |
|
| 43 | $this->requestException($ex); |
|
| 44 | }catch (\Exception $ex){ |
|
| 45 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||
| 49 | } |
|
| @@ 63-79 (lines=17) @@ | ||
| 60 | * @return Pedido\GetByFiltrosResponse |
|
| 61 | * @throws \Exception |
|
| 62 | */ |
|
| 63 | public function getByFiltros(Pedido\GetByFiltrosRequest $getByFiltrosRequest) |
|
| 64 | { |
|
| 65 | try{ |
|
| 66 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 67 | 'body' => json_encode($getByFiltrosRequest), |
|
| 68 | ]); |
|
| 69 | ||
| 70 | return SerializerHelper::denormalize( |
|
| 71 | $this->response->json(), |
|
| 72 | Pedido\GetByFiltrosResponse::class |
|
| 73 | ); |
|
| 74 | }catch (RequestException $ex) { |
|
| 75 | $this->requestException($ex); |
|
| 76 | }catch (\Exception $ex){ |
|
| 77 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * @param $pessoaId |
|
| @@ 81-97 (lines=17) @@ | ||
| 78 | * @return Contracts\Terminal\GetByIdResponse |
|
| 79 | * @throws \Exception |
|
| 80 | */ |
|
| 81 | public function insert(Contracts\Terminal\InsertRequest $insertRequest) |
|
| 82 | { |
|
| 83 | try{ |
|
| 84 | $this->response = $this->_httpClient->post(__FUNCTION__,[ |
|
| 85 | 'body' => json_encode($insertRequest) |
|
| 86 | ]); |
|
| 87 | ||
| 88 | return SerializerHelper::denormalize( |
|
| 89 | $this->response->json(), |
|
| 90 | Contracts\Terminal\InsertResponse::class |
|
| 91 | ); |
|
| 92 | }catch (RequestException $ex) { |
|
| 93 | $this->requestException($ex); |
|
| 94 | }catch (\Exception $ex){ |
|
| 95 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
|
| 96 | } |
|
| 97 | } |
|
| 98 | ||
| 99 | } |
|