File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed
Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Mitryusweb \Endpoints ;
4+
5+ use Mitryusweb \Classes \EndpointBase ;
6+ use \Mitryusweb \Model \PacoteDados as PacoteDadosModel ;
7+
8+ class Confirmacao extends EndpointBase
9+ {
10+ /**
11+ * @see https://www.mitryus.com.br:8191/MitryusReports/integracao.xhtml#ApiConfirmacao
12+ * @param int $codigo_confirmacao
13+ * @param bool $status
14+ */
15+ public function confirm (int $ codigo_confirmacao , bool $ status = true ): void
16+ {
17+ $ status = $ status ? 'true ' : 'false ' ;
18+ $ this ->request ('GET ' , "confirmacao/ $ codigo_confirmacao/ $ status " )->getResponse ();
19+ }
20+ }
Original file line number Diff line number Diff line change @@ -18,20 +18,10 @@ public function get(bool $confirmar = false): PacoteDadosModel
1818 $ model = new PacoteDadosModel ($ response );
1919
2020 if ($ confirmar ) {
21- $ this ->confirm ($ model ->codigo_confirmacao , true );
21+ $ confirmacaoEndpoint = new Confirmacao ();
22+ $ confirmacaoEndpoint ->confirm ($ model ->codigo_confirmacao , true );
2223 }
2324
2425 return $ model ;
2526 }
26-
27- /**
28- * @see https://www.mitryus.com.br:8191/MitryusReports/integracao.xhtml#ApiConfirmacao
29- * @param int $codigo_confirmacao
30- * @param bool $status
31- */
32- public function confirm (int $ codigo_confirmacao , bool $ status = true ): void
33- {
34- $ status = $ status ? 'true ' : 'false ' ;
35- $ this ->request ('GET ' , "confirmacao/ $ codigo_confirmacao/ $ status " )->getResponse ();
36- }
3727}
You can’t perform that action at this time.
0 commit comments