-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from jpdev01/split
Documentando split
- Loading branch information
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Criar cobrança com split | ||
```java | ||
SplitSetting split1 = new SplitSetting() | ||
.setWalletId("635b5330-3931-4ab2-b78c-3c59f136c535") | ||
.setFixedValue(Money.create(10)); | ||
|
||
Payment payment = Payment.creator() | ||
.setCustomer("cus_000050606806") | ||
.setBillingType(BillingType.PIX) | ||
.setDueDate(new Date()) | ||
.setValue(Money.create(new BigDecimal(10.01))) | ||
.setDescription("Teste") | ||
.addSplit(split1) | ||
.create(); | ||
``` | ||
|
||
É possível adicionar mais splits para carteiras diferentes: | ||
```java | ||
.addSplit(split1) | ||
.addSplit(split1); | ||
``` | ||
|
||
## Listar splits pagos | ||
```java | ||
PaymentSplitPaidReader reader = Split.paidReader() | ||
reader.read(); | ||
``` | ||
|
||
## Listar splits recebidos | ||
```java | ||
PaymentSplitReceivedReader reader = Split.receivedReader() | ||
reader.read(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters