From ad6510803495b9f234a2b92f37bbadd908ca27ba Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Mon, 3 Jun 2024 12:09:59 +0200 Subject: [PATCH] feat(transaction): exemples files for test :sparkles: --- components/transaction/examples/empty.gold | 0 components/transaction/examples/error.gold | 19 +++++ .../examples/transaction-template.gold | 38 +++++++++ .../transaction/examples/transaction.gold | 85 +++++++++++++++++++ .../transaction/examples/transaction.yml | 0 5 files changed, 142 insertions(+) create mode 100644 components/transaction/examples/empty.gold create mode 100644 components/transaction/examples/error.gold create mode 100644 components/transaction/examples/transaction-template.gold create mode 100644 components/transaction/examples/transaction.gold create mode 100644 components/transaction/examples/transaction.yml diff --git a/components/transaction/examples/empty.gold b/components/transaction/examples/empty.gold new file mode 100644 index 00000000..e69de29b diff --git a/components/transaction/examples/error.gold b/components/transaction/examples/error.gold new file mode 100644 index 00000000..3b654c4f --- /dev/null +++ b/components/transaction/examples/error.gold @@ -0,0 +1,19 @@ +(transaction + (chart-of-accounts-group-name PAG_CONTAS_CODE_123182371973821973981) + (metadata + (m 1) + (Cpf 43049498x) + ) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :amount BRL 2|4) + (description "description for the transaction not for the operation") + (send BRL 30|4 :from + (sources + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :remaining) + ) + ) + (distribute + (to @McGeegor :share 50 :of 25 :desc whatever) + (to @jeff :amount BRL 2|4) + (to @cl3v_ :remaining) + ) +) \ No newline at end of file diff --git a/components/transaction/examples/transaction-template.gold b/components/transaction/examples/transaction-template.gold new file mode 100644 index 00000000..c45077f4 --- /dev/null +++ b/components/transaction/examples/transaction-template.gold @@ -0,0 +1,38 @@ +(transaction V1 + (chart-of-accounts-group-name p2p_transfer_group) + (description "P2P sent") + (code P2P_TRANSFER) + (pending false) + (metadata + (anyKey anyValue) + (anotherKey anotherValue) + ) + (send BRL $amount|$scale + (source + (from $sourceAccount :amount BRL $amount|2 + (description "P2P sent to $destination") + (chart-of-accounts p2p_debit_source_8123891) + (metadata + (anyKey anyValue) + (anotherKey anotherValue) + ) + ) + ) + ) + (distribute + (to $destination :amount BRL $amount|$scale + (description "P2P sent $destination") + (chart-of-accounts p2p_credit_destination_1231412) + ) + (distribute :remaining + (to $destination :remaining + (description "P2P sent $destination") + (chart-of-accounts p2p_credit_destination_1231412) + (metadata + (anyKey anyValue) + (anotherKey anotherValue) + ) + ) + ) + ) +) \ No newline at end of file diff --git a/components/transaction/examples/transaction.gold b/components/transaction/examples/transaction.gold new file mode 100644 index 00000000..ccac48d3 --- /dev/null +++ b/components/transaction/examples/transaction.gold @@ -0,0 +1,85 @@ +(transaction V1 + (chart-of-accounts-group-name PAG_CONTAS_CODE_123182371973821973981) + (description "mcgregor for the transaction not for the operation") + (metadata + (m 1) + (Cpf 43049498x) + ) + (send BRL 30|4 + (source + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :amount BRL 2|4) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :share 100 :of 25 :desc whatever) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :remaining) + (from 3172933b-50d2-4b17-96aa-9b378d6a6eac :amount BRL 2|4 + (description "description for the transaction not for the operation") + ) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :share 50 :of 100 :desc whatever + (description "description for the transaction not for the operation") + ) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :remaining + (description "description for the transaction not for the operation") + ) + (from 3172933b-50d2-4b17-96aa-9b378d6a6eac :amount BRL 2|4 + (metadata + (Cpf 43049498x) + (1 m) + ) + ) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :share 100 :of 25 :desc whatever + (metadata + (Cpf 43049498x) + (1 m) + ) + ) + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :remaining + (metadata + (Cpf 43049498x) + (1 m) + ) + ) + (source :remaining + (from 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :amount BRL 2|4) + ) + ) + ) + (distribute + (to @McGeegor :share 50 :of 25 :desc whatever) + (to @jeff :amount BRL 2|4) + (to @cl3v_ :remaining) + (to 1a9ba2dd-d778-415f-a61a-387d64994eeb :share 50 :of 100 :desc whatever + (description "description for the transaction not for the operation") + ) + (to 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :amount BRL 2|4 + (description "description for the transaction not for the operation") + ) + (to 9fe618ed-cec1-4a5b-90d8-2f5819a8c3dd :remaining + (description "description for the transaction not for the operation") + ) + (to 540b504c-8f9d-480f-9354-3728cf7025ef :share 50 :of 25 :desc whatever + (description "description for the transaction not for the operation") + (metadata + (m m) + (Cpf 43049498x) + ) + ) + (to 540b504c-8f9d-480f-9354-3728cf7025ef :amount BRL 2|4 + (description "description for the transaction not for the operation") + (metadata + (m m) + (Cpf 43049498x) + ) + ) + (to 540b504c-8f9d-480f-9354-3728cf7025ef :remaining + (description "description for the transaction not for the operation") + (metadata + (m m) + (Cpf 43049498x) + ) + ) + (distribute :remaining + (to 540b504c-8f9d-480f-9354-3728cf7025ef :share 38) + (to @McGregor :share 50 :of 25 :desc whatever) + (to 54748fc9-53f1-4d5b-bdc3-660c64f1e974 :amount BRL 2|4) + ) + ) +) \ No newline at end of file diff --git a/components/transaction/examples/transaction.yml b/components/transaction/examples/transaction.yml new file mode 100644 index 00000000..e69de29b