Skip to content

Commit

Permalink
Payload em pt-br para estimar preço
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelstz authored Aug 24, 2024
1 parent 177ab68 commit 276831e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Services/Price/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ private function buildBody(array $serviceCodes, array $products, array $fields):
private function setOptionalParams(Product $product, array $productParam): array
{
if ($product->getWidth() > 0) {
$productParam['width'] = $product->getWidth();
$productParam['largura'] = $product->getWidth();
}

if ($product->getHeight() > 0) {
$productParam['height'] = $product->getHeight();
$productParam['altura'] = $product->getHeight();
}

if ($product->getLength() > 0) {
$productParam['length'] = $product->getLength();
$productParam['comprimento'] = $product->getLength();
}

if ($product->getDiameter() > 0) {
$productParam['diameter'] = $product->getDiameter();
$productParam['diametro'] = $product->getDiameter();
}

if ($product->getCubicWeight() > 0) {
$productParam['cubicWeight'] = $product->getCubicWeight();
$productParam['psCubico'] = $product->getCubicWeight();
}

if ($product->getObjectType() > 1 && $product->getObjectType() <= 3) {
Expand Down

0 comments on commit 276831e

Please sign in to comment.