From d27105369f4ba1b3e56c0dd75b0fba557a2dfd87 Mon Sep 17 00:00:00 2001 From: Lucas Macedo Date: Fri, 11 Sep 2020 13:32:47 -0300 Subject: [PATCH] Adicionado Tipo do Frete no retorno Adicionado o tipo do frete no retorno. ex: "Pac", "Sedex", etc --- src/Cagartner/CorreiosConsulta/CorreiosConsulta.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Cagartner/CorreiosConsulta/CorreiosConsulta.php b/src/Cagartner/CorreiosConsulta/CorreiosConsulta.php index ac47018..2546dad 100644 --- a/src/Cagartner/CorreiosConsulta/CorreiosConsulta.php +++ b/src/Cagartner/CorreiosConsulta/CorreiosConsulta.php @@ -121,6 +121,7 @@ public function frete($data, $options = []) $return[] = [ 'codigo' => (int)$rate->Codigo, + 'tipo' => ucfirst(str_replace('_', '', self::getTipoIndex($rate->Codigo))), 'valor' => self::cleanMoney($rate->Valor), 'prazo' => self::cleanInteger($rate->PrazoEntrega), 'mao_propria' => self::cleanMoney($rate->ValorMaoPropria),