Skip to content

Commit

Permalink
Update API schema based on new API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyaThapa committed Oct 12, 2023
1 parent 23653cd commit aba0ad0
Show file tree
Hide file tree
Showing 33 changed files with 1,665 additions and 45 deletions.
4 changes: 2 additions & 2 deletions paths/accounts/createFundingSource.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"example": {
"_links": {
"treasury-account": {
"href": "{{baseUrl}}/treasury-accounts/{{treasuryAccountId}}"
"href": "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98"
}
},
"name": "My Test Bank",
Expand All @@ -38,4 +38,4 @@
}
}
}
}
}
10 changes: 10 additions & 0 deletions paths/accounts/getAccount.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
"href": "https://api.dwolla.com/accounts/22926523-b517-43b9-959b-6ac4a422d71e",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "account"
},
"transfers": {
"href": "https://api.dwolla.com/accounts/3b0f270c-9cfd-4724-bae8-aa4b1659cbb1/transfers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"funding-sources": {
"href": "https://api.dwolla.com/accounts/3b0f270c-9cfd-4724-bae8-aa4b1659cbb1/funding-sources",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
}
},
"id": "22926523-b517-43b9-959b-6ac4a422d71e",
Expand Down
46 changes: 35 additions & 11 deletions paths/accounts/listAccountTransfers.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,61 @@
"href": "https://api.dwolla.com/accounts/22926523-b517-43b9-959b-6ac4a422d71e/transfers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"next": {
"href": "https://api.dwolla.com/transfers?cursor=pkRCuXGXtIXuX4lYR3rxzsOAUzB4xs-aJwCztcz2i2f5-C8M4NhitjEfPGdJsTSit6eKVvTtS5KQ32dl3Urq1ukwYrz0ebXtYaJGJQNlFJ0mUruIRmaMqbBj-5UKl3piqzoGwdIUjw3_umKrJUC8obrSOlAbSoNu5N7ANPc8tIKiKHfYJVLHcVeuV7EbCYDmBByXHFSP0TIEtRJwP_FV_o4V6gdcBSJpRq2EIYN7qPC9FJtTvYMcvPZH6KnEiziq_A04jhftCmU1pTabEnpNMLha2ZkXghZuk64Fpy49MugYH94itx5skcYr1ANatYycKKpUgKGhdfXMLyV1V3iDAG-y3NDd6cfvuC-2DonZ2xF5TklF8MzRkbTnOnstpF5t",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"prev": {
"href": "https://api.dwolla.com/transfers?cursor=O3kLyIi9uBjF7vAzYtPQHw6dRzWVG1EH2nMxUCqrpXv2Sg8fLbDPXzmTx1eAhiW5g4nRvZKGoLIBMyteWaYolTq3vG7F1pDloFtJiKjh2lLyG5QU9XZdoxrMls4PXalchYknZ-Db6NRAFow3H2GWWTf5vWuLpEZlIyGKOTXRdr7hK0CL3Rzw-Qnq7OkDHp1zVG12fbKYTp4YloTg7Ss4ENInU-AJihbzmMj0D3Ly1zXqHVRp6v3uIaEBdljhPfNISreQrz8XPkBSARjqBv0zGusvZJeaTQMbUo7e8SgG9V6HbYkWQcWQvK9U2CxG9VBDi6eTyVXuZoFc1w9uSgAoc2UCMg2eBvwY-KbLyw7PzqDLN3bMiHkYlxRCbSd0kN7E",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
}
},
"_embedded": {
"transfers": [
{
"_links": {
"source": {
"href": "https://api.dwolla.com/accounts/3b0f270c-9cfd-4724-bae8-aa4b1659cbb1",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "account"
},
"destination-funding-source": {
"href": "https://api.dwolla.com/funding-sources/737d3c04-02c3-416f-b327-cd5419999b3f",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
},
"self": {
"href": "https://api.dwolla.com/transfers/7a6a0c6f-a849-431e-8288-0f89c85c9d55",
"href": "https://api.dwolla.com/transfers/be226616-bf05-4316-8ecb-fac1ac89c9f3",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"source-funding-source": {
"href": "https://api.dwolla.com/funding-sources/f815137a-f7b1-432b-976b-e52832ede996",
"href": "https://api.dwolla.com/funding-sources/9062c625-2094-47ed-9d1f-f40315e4bea7",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
},
"destination-funding-source": {
"href": "https://api.dwolla.com/funding-sources/c486c7ac-9e7a-44dd-a6f6-44e1166a5748",
"destination": {
"href": "https://api.dwolla.com/accounts/3b0f270c-9cfd-4724-bae8-aa4b1659cbb1",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
"resource-type": "account"
}
},
"id": "7a6a0c6f-a849-431e-8288-0f89c85c9d55",
"created": "2023-07-17T20:32:55.679Z",
"id": "be226616-bf05-4316-8ecb-fac1ac89c9f3",
"created": "2023-09-27T15:42:59.394Z",
"amount": {
"value": "10.00",
"value": "5.12",
"currency": "USD"
},
"transferType": "credit",
"transferStatus": "created",
"processingChannel": "ach"
"status": "failed",
"processingChannel": "ach",
"failureReason": {
"description": "Invalid combination of ACH company ID and funding source",
"code": "GCA-051",
"explanation": "The requested funding source and treasury account combination is invalid. Check funding source and treasury account for accuracy and re-add if necessary"
}
}
]
}
Expand Down
28 changes: 26 additions & 2 deletions paths/accounts/listFundingSources.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,31 @@
"id": "f815137a-f7b1-432b-976b-e52832ede996",
"bankAccountType": "checking",
"name": "My Test Bank",
"created": "2023-07-17T18:04:24.772Z"
"created": "2023-07-17T18:04:24.772Z",
"removed": "2023-09-18T21:56:41.104Z"
},
{
"_links": {
"self": {
"href": "https://api.dwolla.com/funding-sources/9062c625-2094-47ed-9d1f-f40315e4bea7",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
},
"treasury-account": {
"href": "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "treasury-account"
},
"remove": {
"href": "https://api.dwolla.com/funding-sources/9062c625-2094-47ed-9d1f-f40315e4bea7",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
}
},
"id": "9062c625-2094-47ed-9d1f-f40315e4bea7",
"bankAccountType": "checking",
"name": "My Test Bank",
"created": "2023-09-15T18:50:34.866Z"
}
]
}
Expand All @@ -63,4 +87,4 @@
}
}
}
}
}
66 changes: 66 additions & 0 deletions paths/accounts/removeAccountFundingSource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"post": {
"tags": [
"Accounts",
"Funding Sources"
],
"summary": "Remove a Funding Source belonging to an Account",
"description": "Remove a Funding Source that is attached to your Main Account.",
"operationId": "removeAccountFundingSource",
"parameters": [
{
"in": "path",
"name": "id",
"description": "UUID of Main Account",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "../../schemas/accounts/CreateFundingSourceForAccountRequestBody.json#/CreateFundingSourceForAccountRequestBody"
},
"example": {
"removed": true
}
}
}
},
"responses": {
"200": {
"description": "Ok",
"content": {
"application/vnd.dwolla.v1.hal+json": {
"schema": {
"$ref": "../../schemas/funding-sources/FundingSource.json#/FundingSource"
},
"example": {
"_links": {
"self": {
"href": "https://api.dwolla.com/funding-sources/2bb9b57a-cb45-4bd2-b8ff-e3a5644e0fb7",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
},
"treasury-account": {
"href": "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "treasury-account"
}
},
"id": "2bb9b57a-cb45-4bd2-b8ff-e3a5644e0fb7",
"bankAccountType": "checking",
"name": "My Savings Account",
"created": "2023-09-15T20:05:04.266Z",
"removed": "2023-09-15T20:06:06.560Z"
}
}
}
}
}
}
}
117 changes: 117 additions & 0 deletions paths/exchanges/createListExchangesForAccount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"post": {
"tags": [
"Exchanges"
],
"summary": "Create exchange for an Account",
"description": "Create exchange for an Account",
"operationId": "createExchangeForAccount",
"parameters": [
{
"in": "path",
"name": "id",
"description": "UUID of Account",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "../../schemas/exchanges/createFinicityExchangeRequestBody.json#/CreateFinicityExchangeRequestBody"
},
{
"$ref": "../../schemas/exchanges/createMXExchangeRequestBody.json#/CreateMXExchangeRequestBody"
}
]
}
}
}
},
"responses": {
"201": {
"description": "Created",
"headers": {
"Location": {
"$ref": "../../schemas/common.json#/components/headers/Location"
}
}
}
}
},
"get": {
"tags": [
"Exchanges"
],
"summary": "List exchanges for an Account",
"description": "List exchanges for an Account",
"operationId": "listExchangesForAccount",
"parameters": [
{
"in": "path",
"name": "id",
"description": "UUID of Account",
"schema": {
"type": "string",
"format": "uuid"
},
"required": true
}
],
"responses": {
"200": {
"description": "Ok",
"headers": {},
"content": {
"application/vnd.dwolla.v1.hal+json": {
"schema": {
"$ref": "../../schemas/exchanges/Exchange.json#/Exchange"
},
"example": {
"_links": {
"self": {
"href": "https://api.dwolla.com/exchanges",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "exchange"
}
},
"_embedded": {
"exchanges": [
{
"_links": {
"self": {
"href": "https://apidwolla.com/exchanges/92822961-3a7f-42c0-b0cc-7ffef05717fa",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "exchange"
},
"exchange-partner": {
"href": "https://api.dwolla.com/exchange-partners/bca8d065-49a5-475b-a6b4-509bc8504d22",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "exchange-partner"
},
"funding-sources": {
"href": "https://api.dwolla.com/funding-sources",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
}
},
"id": "92822961-3a7f-42c0-b0cc-7ffef05717fa",
"status": "active",
"created": "2022-10-19T17:44:44.864Z"
}
]
},
"total": 1
}
}
}
}
}
}
}
Loading

0 comments on commit aba0ad0

Please sign in to comment.