From a6166a41121199a20659d06aed47e6dbbd38da80 Mon Sep 17 00:00:00 2001 From: juanarfuch Date: Wed, 17 Jul 2024 01:01:45 -0300 Subject: [PATCH 1/2] update docs --- .../documentacion-api/api-graphql.mdx | 48 ++++++++++++++++++ .../api-documentation/graphql-api.mdx | 49 +++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/documentacion/documentacion-api/api-graphql.mdx b/documentacion/documentacion-api/api-graphql.mdx index aca36e7..86e8db8 100644 --- a/documentacion/documentacion-api/api-graphql.mdx +++ b/documentacion/documentacion-api/api-graphql.mdx @@ -558,6 +558,54 @@ mutation UpdateAccount($input: InputUpdateAccountDto!) { } } ``` +#### Get Accounts Movements Balance +Devuelve los movimientos registrados y el balance del usuario. + +```graphql +query MovementsBalance($accountId: String!) { + movementsBalance(accountID: $accountId) { + allMovements { + orderId + transactionStatus + amount + currencySymbol + cryptoSymbol + exchangeRate + localCurrencyConversion + dates { + orderedDate + payedDate + transactionDate + deliveredDate + _id + updatedAt + createdAt + refundDeliveredDate + refundInProgressDate + refundStartedDate + } + paymentMethod + invoiceLink + txhash + } + balances { + _id + accountId + currencySymbol + countryCode + totalBalance + description + retries + createdAt + updatedAt + } + } +} +"variables": +{ + "accountId": "userId" +} +``` diff --git a/english/documentation/api-documentation/graphql-api.mdx b/english/documentation/api-documentation/graphql-api.mdx index adf7d6b..a161ba5 100644 --- a/english/documentation/api-documentation/graphql-api.mdx +++ b/english/documentation/api-documentation/graphql-api.mdx @@ -570,6 +570,55 @@ mutation UpdateAccount($input: InputUpdateAccountDto!) { } } ``` +#### Get Accounts Movements Balance +Returns the registered movements and balance of the user. + +```graphql +query MovementsBalance($accountId: String!) { + movementsBalance(accountID: $accountId) { + allMovements { + orderId + transactionStatus + amount + currencySymbol + cryptoSymbol + exchangeRate + localCurrencyConversion + dates { + orderedDate + payedDate + transactionDate + deliveredDate + _id + updatedAt + createdAt + refundDeliveredDate + refundInProgressDate + refundStartedDate + } + paymentMethod + invoiceLink + txhash + } + balances { + _id + accountId + currencySymbol + countryCode + totalBalance + description + retries + createdAt + updatedAt + } + } +} +"variables": +{ + "accountId": "userId" +} +``` + From 6bc645e31640b1c5cbb815dfea275ebcbf95a6d8 Mon Sep 17 00:00:00 2001 From: juanarfuch Date: Wed, 17 Jul 2024 12:56:55 -0300 Subject: [PATCH 2/2] change input --- documentacion/documentacion-api/api-graphql.mdx | 10 +++++++--- .../documentation/api-documentation/graphql-api.mdx | 9 ++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/documentacion/documentacion-api/api-graphql.mdx b/documentacion/documentacion-api/api-graphql.mdx index 86e8db8..16454cb 100644 --- a/documentacion/documentacion-api/api-graphql.mdx +++ b/documentacion/documentacion-api/api-graphql.mdx @@ -562,8 +562,8 @@ mutation UpdateAccount($input: InputUpdateAccountDto!) { Devuelve los movimientos registrados y el balance del usuario. ```graphql -query MovementsBalance($accountId: String!) { - movementsBalance(accountID: $accountId) { +query MovementsBalance($input: AccountMovementsBalanceInput!) { + movementsBalance(input: $input) { allMovements { orderId transactionStatus @@ -603,8 +603,12 @@ query MovementsBalance($accountId: String!) { } "variables": { - "accountId": "userId" + "input": { + "accountID": "668561002363adab95bdff65", + "email": "user@email.com" //Opcional + } } + ``` diff --git a/english/documentation/api-documentation/graphql-api.mdx b/english/documentation/api-documentation/graphql-api.mdx index a161ba5..f3f2126 100644 --- a/english/documentation/api-documentation/graphql-api.mdx +++ b/english/documentation/api-documentation/graphql-api.mdx @@ -574,8 +574,8 @@ mutation UpdateAccount($input: InputUpdateAccountDto!) { Returns the registered movements and balance of the user. ```graphql -query MovementsBalance($accountId: String!) { - movementsBalance(accountID: $accountId) { +query MovementsBalance($input: AccountMovementsBalanceInput!) { + movementsBalance(input: $input) { allMovements { orderId transactionStatus @@ -615,7 +615,10 @@ query MovementsBalance($accountId: String!) { } "variables": { - "accountId": "userId" + "input": { + "accountID": "668561002363adab95bdff65", + "email": "user@email.com" //Optional + } } ```