Skip to content

Commit

Permalink
refactor: update postman renamed references of instrument to asset 🔨
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinezAvellan committed Sep 23, 2024
1 parent a29e963 commit 81c96e1
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 43 deletions.
6 changes: 3 additions & 3 deletions postman/MIDAZ DEV.postman_environment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "4226f211-ca04-48d4-a479-2326811f4ab0",
"id": "a4de639e-e165-487b-9174-72453f9461cb",
"name": "MIDAZ DEV",
"values": [
{
Expand Down Expand Up @@ -46,6 +46,6 @@
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-05-09T13:40:41.474Z",
"_postman_exported_using": "Postman/11.0.6"
"_postman_exported_at": "2024-09-23T16:28:46.351Z",
"_postman_exported_using": "Postman/11.13.1"
}
63 changes: 63 additions & 0 deletions postman/MIDAZ DOCKER.postman_environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "434adbd7-a34f-40e5-b444-7e3346ff23aa",
"name": "MIDAZ DOCKER",
"values": [
{
"key": "url",
"value": "http://127.0.0.1:3000",
"type": "default",
"enabled": true
},
{
"key": "url_transaction",
"value": "http://127.0.0.1:3005",
"type": "default",
"enabled": true
},
{
"key": "organization_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "ledger_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "product_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "portfolio_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "asset_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "account_id",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "transaction_id",
"value": "",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-09-23T16:28:39.204Z",
"_postman_exported_using": "Postman/11.13.1"
}
85 changes: 45 additions & 40 deletions postman/MIDAZ.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "4af684d1-4e4d-4e08-89c8-97988f119d9d",
"_postman_id": "ec34e093-8513-46c6-8d9c-c82f2c467d95",
"name": "MIDAZ",
"description": "# 🚀 Get started here\n\nThis template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.\n\n## 🔖 **How to use this template**\n\n#### **Step 1: Send requests**\n\nRESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.\n\nThis collection contains each of these [request](https://learning.postman.com/docs/sending-requests/requests/) types. Open each request and click \"Send\" to see what happens.\n\n#### **Step 2: View responses**\n\nObserve the response tab for status code (200 OK), response time, and size.\n\n#### **Step 3: Send new Body data**\n\nUpdate or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.\n\n```\n{\n \"name\": \"Add your name in the body\"\n}\n\n ```\n\n#### **Step 4: Update the variable**\n\nVariables enable you to store and reuse values in Postman. We have created a [variable](https://learning.postman.com/docs/sending-requests/variables/) called `base_url` with the sample request [https://postman-api-learner.glitch.me](https://postman-api-learner.glitch.me). Replace it with your API endpoint to customize this collection.\n\n#### **Step 5: Add tests in the \"Tests\" tab**\n\nTests help you confirm that your API is working as expected. You can write test scripts in JavaScript and view the output in the \"Test Results\" tab.\n\n<img src=\"https://content.pstmn.io/b5f280a7-4b09-48ec-857f-0a7ed99d7ef8/U2NyZWVuc2hvdCAyMDIzLTAzLTI3IGF0IDkuNDcuMjggUE0ucG5n\">\n\n## 💪 Pro tips\n\n- Use folders to group related requests and organize the collection.\n- Add more [scripts](https://learning.postman.com/docs/writing-scripts/intro-to-scripts/) in \"Tests\" to verify if the API works as expected and execute workflows.\n \n\n## 💡Related templates\n\n[API testing basics](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9a37a28-055b-49cd-8c7e-97494a21eb54&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[API documentation](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9c28f47-1253-44af-a2f3-20dce4da1f18&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[Authorization methods](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=31a9a6ed-4cdf-4ced-984c-d12c9aec1c27&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
Expand Down Expand Up @@ -341,7 +341,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers?metadata.chave=teste&limit=5&page=1",
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers?limit=5&page=1",
"host": [
"{{url}}"
],
Expand All @@ -355,7 +355,8 @@
{
"key": "metadata.chave",
"value": "teste",
"description": "Search on MongoDB"
"description": "Search on MongoDB",
"disabled": true
},
{
"key": "limit",
Expand Down Expand Up @@ -541,7 +542,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets?metadata.chave=bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlf&limit=2&page=1",
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets?limit=2&page=1",
"host": [
"{{url}}"
],
Expand All @@ -557,7 +558,8 @@
{
"key": "metadata.chave",
"value": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlf",
"description": "Search on MongoDB"
"description": "Search on MongoDB",
"disabled": true
},
{
"key": "limit",
Expand Down Expand Up @@ -603,33 +605,6 @@
}
},
"response": []
},
{
"name": "Accounts",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets/{{asset_id}}",
"host": [
"{{url}}"
],
"path": [
"v1",
"organizations",
"{{organization_id}}",
"ledgers",
"{{ledger_id}}",
"assets",
"{{asset_id}}"
]
}
},
"response": []
}
]
},
Expand Down Expand Up @@ -734,7 +709,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios?metadata.chave=teste&limit=2&page=1",
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios?limit=10&page=1",
"host": [
"{{url}}"
],
Expand All @@ -750,11 +725,12 @@
{
"key": "metadata.chave",
"value": "teste",
"description": "Search on MongoDB"
"description": "Search on MongoDB",
"disabled": true
},
{
"key": "limit",
"value": "2",
"value": "10",
"description": "Default 10"
},
{
Expand Down Expand Up @@ -934,7 +910,7 @@
"formdata": []
},
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/products?metadata.chave=metadata_chave&limit=5&page=1",
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/products?limit=5&page=1",
"host": [
"{{url}}"
],
Expand All @@ -950,7 +926,8 @@
{
"key": "metadata.chave",
"value": "metadata_chave",
"description": "Search on MongoDB"
"description": "Search on MongoDB",
"disabled": true
},
{
"key": "limit",
Expand Down Expand Up @@ -1053,7 +1030,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"assetCode\": \"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}",
"raw": "{\n \"assetCode\": \"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\": true\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"
Expand Down Expand Up @@ -1131,7 +1108,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios/{{portfolio_id}}/accounts?metadata.chave=xuxa&limit=2&page=1",
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/portfolios/{{portfolio_id}}/accounts?limit=2&page=1",
"host": [
"{{url}}"
],
Expand All @@ -1149,7 +1126,8 @@
{
"key": "metadata.chave",
"value": "xuxa",
"description": "Search on MongoDB"
"description": "Search on MongoDB",
"disabled": true
},
{
"key": "limit",
Expand Down Expand Up @@ -1226,6 +1204,33 @@
}
},
"response": []
},
{
"name": "Accounts by by asset id",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{url}}/v1/organizations/{{organization_id}}/ledgers/{{ledger_id}}/assets/{{asset_id}}",
"host": [
"{{url}}"
],
"path": [
"v1",
"organizations",
"{{organization_id}}",
"ledgers",
"{{ledger_id}}",
"assets",
"{{asset_id}}"
]
}
},
"response": []
}
]
}
Expand Down

0 comments on commit 81c96e1

Please sign in to comment.