Skip to content

Commit

Permalink
feat: atualizar para v308
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreBellas committed Sep 8, 2024
1 parent db87d5f commit 5cfa9ae
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Pacote de integração com a [API v3 do ERP Bling](https://developer.bling.com.br)
para PHP 8.2+. O mais completo existente.

Atualizado com a versão `v307` da API ([veja o registro de alterações](https://developer.bling.com.br/changelogs#2024-08-21)).
Atualizado com a versão `v308` da API ([veja o registro de alterações](https://developer.bling.com.br/changelogs#2024-09-04)).

## Instalação

Expand Down
7 changes: 5 additions & 2 deletions src/Entities/Produtos/Schema/Get/GetResponseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* @param string $nome
* @param ?string $codigo
* @param ?float $preco
* @param ?float $precoCusto
* @param ?GetResponseDataEstoque $estoque
* @param Tipo $tipo
* @param Situacao $situacao
* @param Formato $formato
Expand All @@ -29,11 +31,12 @@ public function __construct(
public string $nome,
public ?string $codigo,
public ?float $preco,
public ?float $precoCusto,
public ?GetResponseDataEstoque $estoque,
public Tipo $tipo,
public Situacao $situacao,
public Formato $formato,
public ?string $descricaoCurta,
public ?string $imagemURL,
) {
}
) {}
}
25 changes: 0 additions & 25 deletions src/Entities/Produtos/Schema/Get/GetResponseDataContato.php

This file was deleted.

17 changes: 17 additions & 0 deletions src/Entities/Produtos/Schema/Get/GetResponseDataEstoque.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace AleBatistella\BlingErpApi\Entities\Produtos\Schema\Get;

use AleBatistella\BlingErpApi\Entities\Shared\BaseResponseObject;

readonly final class GetResponseDataEstoque extends BaseResponseObject
{
/**
* Constrói o objeto.
*
* @param ?float $saldoVirtualTotal
*/
public function __construct(
public ?float $saldoVirtualTotal
) {}
}
21 changes: 0 additions & 21 deletions src/Entities/Produtos/Schema/Get/GetResponseDataSituacao.php

This file was deleted.

4 changes: 4 additions & 0 deletions src/Entities/Produtos/__tests__/get/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"nome": "Produto 1",
"codigo": "CODE_123",
"preco": 1,
"precoCusto": 1,
"estoque": {
"saldoVirtualTotal": 1
},
"tipo": "P",
"situacao": "A",
"formato": "S",
Expand Down

0 comments on commit 5cfa9ae

Please sign in to comment.