Skip to content

Commit

Permalink
Merge pull request #5 from heltonhayashi/invoice
Browse files Browse the repository at this point in the history
Função de faturamento do pedido com informações de nota fiscal.
  • Loading branch information
bbarreto authored Feb 8, 2018
2 parents 0af50da + 3ca9287 commit 42f6a70
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Resources/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,18 @@ public function export()
];
return $this->apiCall('PUT', '/orders/'.rawurlencode($this->id).'/exported', $this->params);
}

/**
* Faturar um pedido
* @param array $invoice
* @return type
*/
public function invoice($invoice) {

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

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

}

0 comments on commit 42f6a70

Please sign in to comment.