From 47ee3649433b5349cab27bc89b347895b41a0f8a Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:49:28 +0200 Subject: [PATCH 1/7] refactor: remove method isUpper and update string IsNilOrEmpty :hammer: --- common/stringUtils.go | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/common/stringUtils.go b/common/stringUtils.go index 925992f0..80017bdb 100644 --- a/common/stringUtils.go +++ b/common/stringUtils.go @@ -36,24 +36,9 @@ func RemoveSpaces(word string) string { } // IsNilOrEmpty returns a boolean indicating if a *string is nil or empty. -// It's use TrimSpace so, a string " " and "" will be considered empty +// It's use TrimSpace so, a string " " and "" and "null" and "nil" will be considered empty func IsNilOrEmpty(s *string) bool { - return s == nil || strings.TrimSpace(*s) == "" -} - -// IsUpper check if string is lower -func IsUpper(s string) error { - for _, r := range s { - if unicode.IsLetter(r) && !unicode.IsUpper(r) { - return ValidationError{ - Code: "0004", - Title: "Invalid Data provided.", - Message: "Invalid Data provided.", - } - } - } - - return nil + return s == nil || strings.TrimSpace(*s) == "" || strings.TrimSpace(*s) == "null" || strings.TrimSpace(*s) == "nil" } // CamelToSnakeCase converts a given camelCase string to snake_case format. From 3e05a56ca28d21ee0de9c5956dbde3ae69d7cc0e Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:50:17 +0200 Subject: [PATCH 2/7] refactor: update method ValidateCurrency check is lower string :hammer: --- common/utils.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/common/utils.go b/common/utils.go index ae6735df..ba3ab619 100644 --- a/common/utils.go +++ b/common/utils.go @@ -4,6 +4,7 @@ import ( "slices" "strconv" "strings" + "unicode" "go.mongodb.org/mongo-driver/bson" ) @@ -109,11 +110,21 @@ func ValidateCurrency(code string) error { "VED", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "XSU", "XUA", "YER", "ZAR", "ZMW", "ZWL", } + for _, r := range code { + if unicode.IsLetter(r) && !unicode.IsUpper(r) { + return ValidationError{ + Code: "0004", + Title: "Code Uppercase Requirement", + Message: "The code must be in uppercase. Please send the code in uppercase format.", + } + } + } + if !slices.Contains(currencies, code) { return ValidationError{ - Code: "0033", - Title: "Invalid Code Format", - Message: "The 'code' field must be alphanumeric, in upper case, and must contain at least one letter. Please provide a valid code.", + Code: "0005", + Title: "Currency Code Standard Compliance", + Message: "Currency-type instruments must adhere to the ISO-4217 standard. Please use a currency code that follows ISO-4217 guidelines.", } } From ee51491461bfa85fc20100b42c0a383ba104ab97 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:50:58 +0200 Subject: [PATCH 3/7] refactor: remove omitempty and add field to receive nil :hammer: --- components/ledger/internal/domain/metadata/metadata.go | 2 +- .../domain/onboarding/organization/organization.go | 2 +- .../internal/domain/portfolio/account/account.go | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/ledger/internal/domain/metadata/metadata.go b/components/ledger/internal/domain/metadata/metadata.go index b92faa34..546af017 100644 --- a/components/ledger/internal/domain/metadata/metadata.go +++ b/components/ledger/internal/domain/metadata/metadata.go @@ -11,7 +11,7 @@ import ( // MetadataMongoDBModel represents the metadata into mongodb context type MetadataMongoDBModel struct { - ID primitive.ObjectID `bson:"_id,omitempty"` + ID primitive.ObjectID `bson:"_id"` EntityID string `bson:"entity_id"` EntityName string `bson:"entity_name"` Data JSON `bson:"metadata"` diff --git a/components/ledger/internal/domain/onboarding/organization/organization.go b/components/ledger/internal/domain/onboarding/organization/organization.go index f9dc5396..fc25d7cc 100644 --- a/components/ledger/internal/domain/onboarding/organization/organization.go +++ b/components/ledger/internal/domain/onboarding/organization/organization.go @@ -46,7 +46,7 @@ type UpdateOrganizationInput struct { // Organization is a struct designed to encapsulate response payload data. type Organization struct { - ID string `json:"id,omitempty"` + ID string `json:"id"` ParentOrganizationID *string `json:"parentOrganizationId"` LegalName string `json:"legalName"` DoingBusinessAs *string `json:"doingBusinessAs"` diff --git a/components/ledger/internal/domain/portfolio/account/account.go b/components/ledger/internal/domain/portfolio/account/account.go index 17bf653b..c04276d1 100644 --- a/components/ledger/internal/domain/portfolio/account/account.go +++ b/components/ledger/internal/domain/portfolio/account/account.go @@ -17,7 +17,7 @@ type AccountPostgreSQLModel struct { OrganizationID string LedgerID string PortfolioID string - ProductID string + ProductID *string AvailableBalance *float64 OnHoldBalance *float64 BalanceScale *float64 @@ -40,7 +40,7 @@ type CreateAccountInput struct { Alias *string `json:"alias"` Type string `json:"type"` ParentAccountID *string `json:"parentAccountId"` - ProductID string `json:"productId"` + ProductID *string `json:"productId"` EntityID *string `json:"entityId"` Status Status `json:"status"` Metadata map[string]any `json:"metadata"` @@ -51,7 +51,7 @@ type UpdateAccountInput struct { Name string `json:"name"` Status Status `json:"status"` Alias *string `json:"alias"` - ProductID string `json:"productId"` + ProductID *string `json:"productId"` Metadata map[string]any `json:"metadata"` } @@ -59,13 +59,13 @@ type UpdateAccountInput struct { type Account struct { ID string `json:"id"` Name string `json:"name"` - ParentAccountID *string `json:"parentAccountId,omitempty"` + ParentAccountID *string `json:"parentAccountId"` EntityID string `json:"entityId"` InstrumentCode string `json:"instrumentCode"` OrganizationID string `json:"organizationId"` LedgerID string `json:"ledgerId"` PortfolioID string `json:"portfolioId"` - ProductID string `json:"productId"` + ProductID *string `json:"productId"` Balance Balance `json:"balance"` Status Status `json:"status"` Alias *string `json:"alias"` From e82c649af1f9b3b0a3dcb2a3a05236c083b30414 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:52:27 +0200 Subject: [PATCH 4/7] refactor: update DDL account create table entity_id uuid to text and product_id can be null :hammer: --- .../ledger/migrations/000006_create_account_table.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ledger/migrations/000006_create_account_table.up.sql b/components/ledger/migrations/000006_create_account_table.up.sql index c1c54af4..03cd0ebb 100644 --- a/components/ledger/migrations/000006_create_account_table.up.sql +++ b/components/ledger/migrations/000006_create_account_table.up.sql @@ -3,12 +3,12 @@ CREATE TABLE IF NOT EXISTS account id UUID PRIMARY KEY NOT NULL DEFAULT (uuid_generate_v4()), name TEXT, parent_account_id UUID, - entity_id UUID, + entity_id TEXT, instrument_code TEXT NOT NULL, organization_id UUID NOT NULL, ledger_id UUID NOT NULL, portfolio_id UUID NOT NULL, - product_id UUID NOT NULL, + product_id UUID, available_balance NUMERIC NOT NULL, on_hold_balance NUMERIC NOT NULL, balance_scale NUMERIC NOT NULL, From d4699e3bacbed15e56a93f2eb4907fb13fa240b3 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:53:19 +0200 Subject: [PATCH 5/7] refactor: remove call of method IsUpper removed of stringUtils before :hammer: --- components/ledger/internal/app/command/create-instrument.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/ledger/internal/app/command/create-instrument.go b/components/ledger/internal/app/command/create-instrument.go index 5ac0d911..1a5ae574 100644 --- a/components/ledger/internal/app/command/create-instrument.go +++ b/components/ledger/internal/app/command/create-instrument.go @@ -30,10 +30,6 @@ func (uc *UseCase) CreateInstrument(ctx context.Context, organizationID, ledgerI return nil, err } - if err := common.IsUpper(cii.Code); err != nil { - return nil, err - } - if cii.Type == "currency" { if err := common.ValidateCurrency(cii.Code); err != nil { return nil, err From 26452ddce5ccc746edf524466e7f67e265a25df4 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 12:53:41 +0200 Subject: [PATCH 6/7] refactor: some bugs adjusts :hammer: --- .../database/postgres/account.postgresql.go | 2 +- .../internal/app/command/create-account.go | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/ledger/internal/adapters/database/postgres/account.postgresql.go b/components/ledger/internal/adapters/database/postgres/account.postgresql.go index 22d8d51e..9523c474 100644 --- a/components/ledger/internal/adapters/database/postgres/account.postgresql.go +++ b/components/ledger/internal/adapters/database/postgres/account.postgresql.go @@ -340,7 +340,7 @@ func (r *AccountPostgreSQLRepository) Update(ctx context.Context, organizationID args = append(args, record.Alias) } - if account.ProductID != "" { + if !common.IsNilOrEmpty(account.ProductID) { updates = append(updates, "product_id = $"+strconv.Itoa(len(args)+1)) args = append(args, record.ProductID) } diff --git a/components/ledger/internal/app/command/create-account.go b/components/ledger/internal/app/command/create-account.go index ba266753..cd14b72e 100644 --- a/components/ledger/internal/app/command/create-account.go +++ b/components/ledger/internal/app/command/create-account.go @@ -54,31 +54,13 @@ func (uc *UseCase) CreateAccount(ctx context.Context, organizationID, ledgerID, cai.EntityID = &portfolio.EntityID } - account := &a.Account{ - ID: uuid.New().String(), - InstrumentCode: cai.InstrumentCode, - Alias: cai.Alias, - Name: cai.Name, - Type: cai.Type, - ParentAccountID: cai.ParentAccountID, - ProductID: cai.ProductID, - OrganizationID: organizationID, - PortfolioID: portfolioID, - LedgerID: ledgerID, - EntityID: *cai.EntityID, - Balance: balance, - Status: status, - CreatedAt: time.Now(), - UpdatedAt: time.Now(), - } - if !common.IsNilOrEmpty(cai.ParentAccountID) { acc, err := uc.AccountRepo.Find(ctx, uuid.MustParse(organizationID), uuid.MustParse(ledgerID), uuid.MustParse(portfolioID), uuid.MustParse(*cai.ParentAccountID)) if err != nil { return nil, err } - if acc.InstrumentCode != account.InstrumentCode { + if acc.InstrumentCode != cai.InstrumentCode { return nil, common.ValidationError{ EntityType: reflect.TypeOf(a.Account{}).Name(), Title: "Mismatched Instrument Code", @@ -95,6 +77,24 @@ func (uc *UseCase) CreateAccount(ctx context.Context, organizationID, ledgerID, } } + account := &a.Account{ + ID: uuid.New().String(), + InstrumentCode: cai.InstrumentCode, + Alias: cai.Alias, + Name: cai.Name, + Type: cai.Type, + ParentAccountID: cai.ParentAccountID, + ProductID: cai.ProductID, + OrganizationID: organizationID, + PortfolioID: portfolioID, + LedgerID: ledgerID, + EntityID: *cai.EntityID, + Balance: balance, + Status: status, + CreatedAt: time.Now(), + UpdatedAt: time.Now(), + } + port, err := uc.AccountRepo.Create(ctx, account) if err != nil { logger.Errorf("Error creating account: %v", err) From 6b7599da1bb53396a005baac2ce025800b125c99 Mon Sep 17 00:00:00 2001 From: MartinezAvellan Date: Tue, 4 Jun 2024 13:17:37 +0200 Subject: [PATCH 7/7] refactor: update postman more generic :hammer: --- postman/MIDAZ.postman_collection.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/postman/MIDAZ.postman_collection.json b/postman/MIDAZ.postman_collection.json index 4ff8d545..d5d72317 100644 --- a/postman/MIDAZ.postman_collection.json +++ b/postman/MIDAZ.postman_collection.json @@ -39,7 +39,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"legalName\": \"{{$randomCompanyName}}\",\n //\"parentOrganizationId\": \"{{organization_id}}\",\n \"doingBusinessAs\": \"The ledger.io\", //opcional\n \"legalDocument\": \"48784548000104\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Ledger\"\n },\n \"address\": {\n \"line1\": \"Avenida Paulista, 1234\",\n \"line2\": \"CJ 203\",\n \"zipCode\": \"04696040\",\n \"city\": \"{{$randomCity}}\",\n \"state\": \"{{$randomCountryCode}}\",\n \"country\": \"{{$randomCountryCode}}\" //de acordo com a ISO 3166-1 alpha2\n },\n \"metadata\": {\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"legalName\": \"{{$randomCompanyName}}\",\n //\"parentOrganizationId\": \"{{organization_id}}\",\n \"doingBusinessAs\": \"The ledger.io\", //opcional\n \"legalDocument\": \"48784548000104\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Ledger\"\n },\n \"address\": {\n \"line1\": \"Avenida Paulista, 1234\",\n \"line2\": \"CJ 203\",\n \"zipCode\": \"04696040\",\n \"city\": \"{{$randomCity}}\",\n \"state\": \"{{$randomCountryCode}}\",\n \"country\": \"{{$randomCountryCode}}\" //de acordo com a ISO 3166-1 alpha2\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -83,7 +83,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"legalName\": \"Midaz Tech LTDA\",\n \"parentOrganizationId\": \"{{organization_id}}\",\n \"doingBusinessAs\": \"The ledger.io\", //opcional\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"BLOCKD BY McGregor\"\n },\n \"address\": {\n \"line1\": \"Avenida Paulista, 1234\",\n \"line2\": \"CJ 203\",\n \"zipCode\": \"04696040\",\n \"city\": \"São Paulo\",\n \"state\": \"SP\",\n \"country\": \"BR\" //de acordo com a ISO 3166-1 alpha2\n },\n \"metadata\": {\n \"chave\": \"teste\",\n \"boolean\": false,\n \"double\": 10.5,\n \"int\": 2\n }\n}", + "raw": "{\n \"legalName\": \"{{$randomCompanyName}}\",\n \"parentOrganizationId\": \"{{organization_id}}\",\n \"doingBusinessAs\": \"The ledger.io\", //opcional\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste Blocked\"\n },\n \"address\": {\n \"line1\": \"Avenida Paulista, 1234\",\n \"line2\": \"CJ 203\",\n \"zipCode\": \"04696040\",\n \"city\": \"{{$randomCity}}\",\n \"state\": \"{{$randomCountryCode}}\",\n \"country\": \"{{$randomCountryCode}}\" //de acordo com a ISO 3166-1 alpha2\n },\n \"metadata\": {\n \"chave\": \"metadata_chave_update\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -259,7 +259,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"{{$randomCompanyName}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Ledger\"\n },\n \"metadata\": {\n \"chave\": \"teste\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"name\": \"{{$randomCompanyName}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Ledger\"\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -300,7 +300,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"BLOCKED Tech LTDA\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste BLOCKED Ledger\"\n },\n \"metadata\": {\n \"chave\": \"mudei\",\n \"boolean\": false,\n \"double\": 90.5,\n \"int\": 1000\n }\n}", + "raw": "{\n \"name\": \"BLOCKED Tech LTDA\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste BLOCKED Ledger\"\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -464,7 +464,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Brazilian Real\",\n //\"name\": \"{{$randomCurrencyName}}\",\n \"type\": \"currency\",\n \"code\": \"BRL\",\n //\"code\": \"{{$randomCurrencyCode}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste instrument 1\"\n },\n \"metadata\": {\n \"chave\": \"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlf\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"name\": \"Brazilian Real\",\n //\"name\": \"{{$randomCurrencyName}}\",\n \"type\": \"currency\",\n \"code\": \"BRL\",\n //\"code\": \"{{$randomCurrencyCode}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste instrument 1\"\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -654,7 +654,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"entityId\": \"{{$randomUUID}}\",\n \"name\": \"McGregor Portfolio 3\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Portfolio 3\",\n \"allowSending\": true,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"xuxa\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"entityId\": \"{{$randomUUID}}\",\n \"name\": \"{{$randomUserName}} Portfolio 3 \",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Portfolio 3\",\n \"allowSending\": true,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -697,7 +697,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"McGregor Portfolio 3 UPDATE\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste Portfolio 3 Update\",\n \"allowSending\": false,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"Change Update\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"name\": \"{{$randomUserName}} Portfolio 3 UPDATE\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste Portfolio 3 Update\",\n \"allowSending\": false,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -844,7 +844,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Product {{$randomProductName}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Product\"\n },\n \"metadata\": {\n \"chave\": \"teste\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"name\": \"Product {{$randomProductName}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Product\"\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -887,7 +887,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"McGregor Product 1 BLOCKED\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste Product BLOCKED\"\n },\n \"metadata\": {\n \"chave\": \"elianas\",\n \"boolean\": false,\n \"double\": 100.5,\n \"int\": 2\n }\n}", + "raw": "{\n \"name\": \"Product {{$randomProductName}} BLOCKED\",\n \"status\": {\n \"code\": \"BLOCKED\",\n \"description\": \"Teste Product BLOCKED\"\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -1041,7 +1041,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"instrumentCode\": \"BRL\",\n \"name\": \"{{$randomBankAccountName}}\",\n \"alias\": \"Wallet {{$randomBankAccount}}\",\n \"type\": \"deposit\",\n //\"parentAccountId\": \"{{account_id}}\",\n //\"entityId\": \"{{$randomUUID}}\", //optional\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": true,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"xuxa\",\n \"boolean\": true,\n \"double\": 10.5,\n \"int\": 1\n }\n}", + "raw": "{\n \"instrumentCode\": \"BRL\",\n \"name\": \"{{$randomBankAccountName}}\",\n \"alias\": \"Wallet {{$randomBankAccount}}\",\n \"type\": \"deposit\",\n //\"parentAccountId\": \"{{account_id}}\",\n //\"entityId\": \"{{$randomUUID}}\", //optional\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": true,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json" @@ -1086,7 +1086,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Sanchez Account\", //opcional\n \"alias\": \"Sanchez\",\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": false,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"cracatua\",\n \"boolean\": false,\n \"double\": 15.5,\n \"int\": 10\n }\n}", + "raw": "{\n \"name\": \"{{$randomBankAccountName}} Account\", //opcional\n \"alias\": \"Wallet {{$randomBankAccount}}\",\n \"productId\": \"{{product_id}}\",\n \"status\": {\n \"code\": \"ACTIVE\",\n \"description\": \"Teste Account\",\n \"allowSending\": false,\n \"allowReceiving\": false\n },\n \"metadata\": {\n \"chave\": \"metadata_chave\",\n \"bitcoinn\": \"{{$randomBitcoin}}\",\n \"boolean\": {{$randomBoolean}},\n \"double\": 10.5,\n \"int\": 1\n }\n}", "options": { "raw": { "language": "json"