Skip to content

Commit

Permalink
Merge pull request #6 from heltonhayashi/shipments
Browse files Browse the repository at this point in the history
Função para envio dos dados de entrega.
  • Loading branch information
bbarreto authored Feb 9, 2018
2 parents 42f6a70 + a596131 commit 4e7f00d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Resources/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,16 @@ public function invoice($invoice) {
return $this->apiCall('POST', '/orders/'.rawurlencode($this->id).'/invoice', $invoice);
}

/**
* Enviar informações de shipments
* @param array $invoice
* @return type
*/
public function shipments($shipments) {

if (!is_array($shipments))
return ['error'=>'Shipments deve ser um array.'];

return $this->apiCall('POST', '/orders/'.rawurlencode($this->id).'/shipments', $shipments);
}
}

0 comments on commit 4e7f00d

Please sign in to comment.