Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jprodrigues70 authored Sep 27, 2023
1 parent 005aee7 commit 2bdd8be
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# iugu-laravel
Interface de comunicação com a API do Iugu para Laravel

# exemplo de uso até o momento:

```
$user = User::find(1);
$invoice = new InvoiceBuilder();
$result = $invoice
->setEmail($user->email)
->setDueDate(Carbon::now()->addDays(3)->format("Y-m-d"))
->setPayer(
name: $user->name,
documentNumber: $user->cpf
)
->setItem(
description: 'Fatura de teste',
quantity: 2,
priceCents: 100
)
->setLocalPersistenceConfig(
model: new Invoice(),
map: [
'gatewayColumn' => 'service',
'id' => 'service_id',
'total_cents' => 'price'
],
data: [
'user_id' => $user->id,
]
)
->create();
```

0 comments on commit 2bdd8be

Please sign in to comment.