diff --git a/paths/accounts/createFundingSource.json b/paths/accounts/createFundingSource.json index 2165dce..ca17669 100644 --- a/paths/accounts/createFundingSource.json +++ b/paths/accounts/createFundingSource.json @@ -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", @@ -38,4 +38,4 @@ } } } -} \ No newline at end of file +} diff --git a/paths/accounts/getAccount.json b/paths/accounts/getAccount.json index eb97ee5..dee53c7 100644 --- a/paths/accounts/getAccount.json +++ b/paths/accounts/getAccount.json @@ -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", diff --git a/paths/accounts/listAccountTransfers.json b/paths/accounts/listAccountTransfers.json index a216ab8..5900b9f 100644 --- a/paths/accounts/listAccountTransfers.json +++ b/paths/accounts/listAccountTransfers.json @@ -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" + } } ] } diff --git a/paths/accounts/listFundingSources.json b/paths/accounts/listFundingSources.json index 10b77e4..61e391b 100644 --- a/paths/accounts/listFundingSources.json +++ b/paths/accounts/listFundingSources.json @@ -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" } ] } @@ -63,4 +87,4 @@ } } } -} \ No newline at end of file +} diff --git a/paths/accounts/removeAccountFundingSource.json b/paths/accounts/removeAccountFundingSource.json new file mode 100644 index 0000000..c6fa8f5 --- /dev/null +++ b/paths/accounts/removeAccountFundingSource.json @@ -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" + } + } + } + } + } + } +} diff --git a/paths/exchanges/createListExchangesForAccount.json b/paths/exchanges/createListExchangesForAccount.json new file mode 100644 index 0000000..76361e9 --- /dev/null +++ b/paths/exchanges/createListExchangesForAccount.json @@ -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 + } + } + } + } + } + } +} diff --git a/paths/exchanges/createListExchangesForExternalParty.json b/paths/exchanges/createListExchangesForExternalParty.json new file mode 100644 index 0000000..e31e72f --- /dev/null +++ b/paths/exchanges/createListExchangesForExternalParty.json @@ -0,0 +1,117 @@ +{ + "post": { + "tags": [ + "Exchanges" + ], + "summary": "Create exchange for an External Party", + "description": "Create exchange for an External Party", + "operationId": "createExchangeForExternalParty", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of External Party", + "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 External Party", + "description": "List exchanges for an External Party", + "operationId": "listExchangesForExternalParty", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of External Party", + "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://api.dwolla.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 + } + } + } + } + } + } +} diff --git a/paths/exchanges/getExchange.json b/paths/exchanges/getExchange.json new file mode 100644 index 0000000..cf4c79e --- /dev/null +++ b/paths/exchanges/getExchange.json @@ -0,0 +1,51 @@ +{ + "get": { + "tags": [ + "Exchanges" + ], + "summary": "Retrieve exchange resource", + "description": "Retrieve exchange resource", + "operationId": "getExchangeResource", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "UUID of Exchange resource", + "required": true, + "schema": { + "type": "string", + "example": "292317ec-e252-47d8-93c3-2d128e037aa4" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/exchanges/Exchange.json#/Exchange" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchanges/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange" + }, + "exchange-partner": { + "href": "https://api.dwolla.com/exchange-partners/9b55a4b3-34ae-4607-b2d1-622f1eed77f9", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + } + }, + "id": "e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "status": "active", + "created": "2023-09-21T21:41:03.283Z" + } + } + } + } + } + } +} diff --git a/paths/exchanges/getExchangePartner.json b/paths/exchanges/getExchangePartner.json new file mode 100644 index 0000000..99fb30d --- /dev/null +++ b/paths/exchanges/getExchangePartner.json @@ -0,0 +1,54 @@ +{ + "get": { + "tags": [ + "Exchanges" + ], + "summary": "Retrieve exchange partner", + "description": "Retrieve exchange partner", + "operationId": "getExchangePartner", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Exchange Partner resource unique identifier.", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "292317ec-e252-47d8-93c3-2d128e037aa4" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "headers": {}, + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/exchanges/ExchangePartner.json#/ExchangePartner" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchange-partners/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + }, + "funding-source": { + "href": "https://api.dwolla.com/funding-sources", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "name": "MX", + "status": "active", + "created": "2023-09-30T19:31:59.106Z" + } + } + } + } + } + } +} diff --git a/paths/exchanges/listExchangePartners.json b/paths/exchanges/listExchangePartners.json new file mode 100644 index 0000000..07e39af --- /dev/null +++ b/paths/exchanges/listExchangePartners.json @@ -0,0 +1,90 @@ +{ + "get": { + "tags": [ + "Exchanges" + ], + "summary": "List exchange partners", + "description": "List exchange partners", + "operationId": "listExchangePartners", + "responses": { + "200": { + "description": "Ok", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/exchanges/ExchangePartners.json#/ExchangePartners" + }, + "example" : { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchange-partners", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + } + }, + "_embedded": { + "exchange-partners": [ + { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchange-partners/292317ec-e252-47d8-93c3-2d128e037aa4", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + }, + "funding-source": { + "href": "https://api.dwolla.com/funding-sources", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "292317ec-e252-47d8-93c3-2d128e037aa4", + "name": "Finicity", + "status": "active", + "created": "2022-05-17T16:08:52.146Z" + }, + { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchange-partners/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + }, + "funding-source": { + "href": "https://api.dwolla.com/funding-sources", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a", + "name": "MX", + "status": "active", + "created": "2022-08-30T19:31:59.106Z" + }, + { + "_links": { + "self": { + "href": "https://api.dwolla.com/exchange-partners/a0b22a57-68df-4450-b507-47c937e64e89", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "exchange-partner" + }, + "funding-source": { + "href": "https://api.dwolla.com/funding-sources", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "a0b22a57-68df-4450-b507-47c937e64e89", + "name": "Flinks", + "status": "active", + "created": "2023-05-15T14:43:47.615Z" + } + ] + }, + "total": 3 + } + } + } + } + } + } +} diff --git a/paths/external-parties/createListExternalParties.json b/paths/external-parties/createListExternalParties.json index 2362665..d121f96 100644 --- a/paths/external-parties/createListExternalParties.json +++ b/paths/external-parties/createListExternalParties.json @@ -16,14 +16,14 @@ "Business": { "value": { "businessName": "John Doe Equipment, LLC", - "email": "john.doe@example.com", + "email": "john.doe@example.com" } }, "Personal": { "value": { "firstName": "John", "lastName": "Doe", - "email": "john.doe@example.com", + "email": "john.doe@example.com" } } } @@ -62,6 +62,16 @@ "href": "https://api.dwolla.com/external-parties", "type": "application/vnd.dwolla.v1.hal+json", "resource-type": "external-party" + }, + "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": "external-party" + }, + "prev": { + "href": "https://api.dwolla.com/transfers?cursor=O3kLyIi9uBjF7vAzYtPQHw6dRzWVG1EH2nMxUCqrpXv2Sg8fLbDPXzmTx1eAhiW5g4nRvZKGoLIBMyteWaYolTq3vG7F1pDloFtJiKjh2lLyG5QU9XZdoxrMls4PXalchYknZ-Db6NRAFow3H2GWWTf5vWuLpEZlIyGKOTXRdr7hK0CL3Rzw-Qnq7OkDHp1zVG12fbKYTp4YloTg7Ss4ENInU-AJihbzmMj0D3Ly1zXqHVRp6v3uIaEBdljhPfNISreQrz8XPkBSARjqBv0zGusvZJeaTQMbUo7e8SgG9V6HbYkWQcWQvK9U2CxG9VBDi6eTyVXuZoFc1w9uSgAoc2UCMg2eBvwY-KbLyw7PzqDLN3bMiHkYlxRCbSd0kN7E", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "external-party" } }, "_embedded": { @@ -103,4 +113,4 @@ } } } -} \ No newline at end of file +} diff --git a/paths/external-parties/createListFundingSources.json b/paths/external-parties/createListFundingSources.json index dd88210..736a801 100644 --- a/paths/external-parties/createListFundingSources.json +++ b/paths/external-parties/createListFundingSources.json @@ -25,11 +25,26 @@ "schema": { "$ref": "../../schemas/external-parties/CreateFundingSourceForExternalPartyRequestBody.json#/CreateFundingSourceForExternalPartyRequestBody" }, - "example": { - "name": "Test Bank", - "bankAccountType": "checking", - "accountNumber": "123456789", - "routingNumber": "222222226" + "examples": { + "Bank Funding Source": { + "value": { + "name": "Test Bank", + "bankAccountType": "checking", + "accountNumber": "123456789", + "routingNumber": "222222226" + } + }, + "Exchange Funding Source": { + "value": { + "_links": { + "exchange": { + "href": "https://api.dwolla.com/exchanges/6bc9109a-04fd-49b6-ace6-ca06fd282d65" + } + }, + "bankAccountType": "checking", + "name": "Jane Doe - Checking" + } + } } } } @@ -79,10 +94,43 @@ "href": "https://api.dwolla.com/external-parties/83ded54e-7367-44e2-b7b4-ae1a5780beae/funding-sources", "type": "application/vnd.dwolla.v1.hal+json", "resource-type": "funding-source" + }, + "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": "funding-source" + }, + "prev": { + "href": "https://api.dwolla.com/transfers?cursor=O3kLyIi9uBjF7vAzYtPQHw6dRzWVG1EH2nMxUCqrpXv2Sg8fLbDPXzmTx1eAhiW5g4nRvZKGoLIBMyteWaYolTq3vG7F1pDloFtJiKjh2lLyG5QU9XZdoxrMls4PXalchYknZ-Db6NRAFow3H2GWWTf5vWuLpEZlIyGKOTXRdr7hK0CL3Rzw-Qnq7OkDHp1zVG12fbKYTp4YloTg7Ss4ENInU-AJihbzmMj0D3Ly1zXqHVRp6v3uIaEBdljhPfNISreQrz8XPkBSARjqBv0zGusvZJeaTQMbUo7e8SgG9V6HbYkWQcWQvK9U2CxG9VBDi6eTyVXuZoFc1w9uSgAoc2UCMg2eBvwY-KbLyw7PzqDLN3bMiHkYlxRCbSd0kN7E", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" } }, "_embedded": { "funding-sources": [ + { + "_links": { + "self": { + "href": "https://api.dwolla.com/funding-sources/d0a73ee1-bbc3-4f53-8466-3e0295dea5c7", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + }, + "external-party": { + "href": "https://api.dwolla.com/external-parties/83ded54e-7367-44e2-b7b4-ae1a5780beae", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "external-party" + }, + "remove": { + "href": "https://api.dwolla.com/funding-sources/d0a73ee1-bbc3-4f53-8466-3e0295dea5c7", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "d0a73ee1-bbc3-4f53-8466-3e0295dea5c7", + "bankAccountType": "checking", + "name": "Test Bank", + "created": "2023-07-15T17:52:37.211Z" + }, { "_links": { "self": { @@ -99,7 +147,8 @@ "id": "9bb42992-a03b-422d-8c52-82b14828dbac", "bankAccountType": "checking", "name": "Test Bank", - "created": "2023-07-15T17:52:37.211Z" + "created": "2023-07-15T17:52:37.211Z", + "removed": "2023-09-18T21:56:41.104Z" } ] } @@ -109,4 +158,4 @@ } } } -} \ No newline at end of file +} diff --git a/paths/external-parties/listExternalPartyTransfers.json b/paths/external-parties/listExternalPartyTransfers.json new file mode 100644 index 0000000..29ad660 --- /dev/null +++ b/paths/external-parties/listExternalPartyTransfers.json @@ -0,0 +1,100 @@ +{ + "get": { + "tags": [ + "External Parties", + "Transfers" + ], + "summary": "List Transfers for External Party", + "description": "List all Transfers that that belong to an External Party.", + "operationId": "listTransfersForExternalParty", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of External Party", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/transfers/Transfers.json#/Transfers" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/external-parties/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": { + "self": { + "href": "https://api.dwolla.com/transfers/7a6a0c6f-a849-431e-8288-0f89c85c9d55", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "transfer" + }, + "source": { + "href": "https://api.dwolla.com/accounts/62e88a41-f5d0-4a79-90b3-188cf11a3966", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "account" + }, + "source-funding-source": { + "href": "https://api.dwolla.com/funding-sources/f815137a-f7b1-432b-976b-e52832ede996", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + }, + "destination": { + "href": "https://api.dwolla.com/external-parties/d295106b-ca20-41ad-9774-286e34fd3c2d", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "customer" + }, + "destination-funding-source": { + "href": "https://api.dwolla.com/funding-sources/c486c7ac-9e7a-44dd-a6f6-44e1166a5748", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" + } + }, + "id": "7a6a0c6f-a849-431e-8288-0f89c85c9d55", + "created": "2023-07-17T20:32:55.679Z", + "amount": { + "value": "10.00", + "currency": "USD" + }, + "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" + } + } + ] + } + } + } + } + } + } + } +} diff --git a/paths/external-parties/removeExternalPartyFundingSource.json b/paths/external-parties/removeExternalPartyFundingSource.json new file mode 100644 index 0000000..592c29c --- /dev/null +++ b/paths/external-parties/removeExternalPartyFundingSource.json @@ -0,0 +1,66 @@ +{ + "post": { + "tags": [ + "External Parties", + "Funding Sources" + ], + "summary": "Remove a Funding Source belonging to an External Party", + "description": "Remove a Funding Source that is attached to an External Party.", + "operationId": "removeExternalPartyFundingSource", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of External Party", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "../../schemas/funding-sources/RemoveFundingSourceRequestBody.json#/RemoveFundingSourceRequestBody" + }, + "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" + } + } + } + } + } + } +} diff --git a/paths/funding-sources/getFundingSource.json b/paths/funding-sources/getFundingSource.json index 2f608bf..33b7dd5 100644 --- a/paths/funding-sources/getFundingSource.json +++ b/paths/funding-sources/getFundingSource.json @@ -37,6 +37,11 @@ "href": "https://api.dwolla.com/external-parties/83ded54e-7367-44e2-b7b4-ae1a5780beae", "type": "application/vnd.dwolla.v1.hal+json", "resource-type": "external-party" + }, + "remove": { + "href": "https://api.dwolla.com/funding-sources/9bb42992-a03b-422d-8c52-82b14828dbac", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "funding-source" } }, "id": "9bb42992-a03b-422d-8c52-82b14828dbac", @@ -49,4 +54,4 @@ } } } -} \ No newline at end of file +} diff --git a/paths/transfers/getTransfer.json b/paths/transfers/getTransfer.json index 429b8d7..0ffaff1 100644 --- a/paths/transfers/getTransfer.json +++ b/paths/transfers/getTransfer.json @@ -33,11 +33,21 @@ "type": "application/vnd.dwolla.v1.hal+json", "resource-type": "transfer" }, + "source": { + "href": "https://api.dwolla.com/accounts/62e88a41-f5d0-4a79-90b3-188cf11a3966", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "account" + }, "source-funding-source": { "href": "https://api.dwolla.com/funding-sources/f815137a-f7b1-432b-976b-e52832ede996", "type": "application/vnd.dwolla.v1.hal+json", "resource-type": "funding-source" }, + "destination": { + "href": "https://api.dwolla.com/external-parties/d295106b-ca20-41ad-9774-286e34fd3c2d", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "customer" + }, "destination-funding-source": { "href": "https://api.dwolla.com/funding-sources/c486c7ac-9e7a-44dd-a6f6-44e1166a5748", "type": "application/vnd.dwolla.v1.hal+json", @@ -50,13 +60,17 @@ "value": "10.00", "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" + } } } } } } } -} \ No newline at end of file +} diff --git a/paths/webhook-subscriptions/createListDeleteWebhookSubscriptions.json b/paths/webhook-subscriptions/createListDeleteWebhookSubscriptions.json new file mode 100644 index 0000000..eb001ab --- /dev/null +++ b/paths/webhook-subscriptions/createListDeleteWebhookSubscriptions.json @@ -0,0 +1,135 @@ +{ + "post": { + "tags": [ + "Webhook Subscriptions" + ], + "summary": "Create a Webhook Subscription", + "description": "Create a webhook subscription to receive POST requests from Dwolla (called webhooks) when events associated with your application occur.", + "operationId": "createWebhookSubscription", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "../../schemas/accounts/CreateFundingSourceForAccountRequestBody.json#/CreateFundingSourceForAccountRequestBody" + }, + "example": { + "url": "http://myapplication.com/webhooks", + "secret": "sshhhhhh" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Location": { + "$ref": "../../schemas/common.json#/components/headers/Location" + } + } + } + } + }, + "get": { + "tags": [ + "Webhook Subscriptions" + ], + "summary": "List Webhook Subscriptions", + "description": "List all Webhook Subscriptions that belong to an application.", + "operationId": "listWebhookSubscriptions", + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/webhook-subscriptions/WebhookSubscription.json#/WebhookSubscription" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhook-subscriptions", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook-subscription" + } + }, + "_embedded": { + "webhook-subscriptions": [ + { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook-subscription" + }, + "webhooks": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38/webhooks", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + } + }, + "id": "6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "url": "http://myapplication.com/webhooks", + "paused": false, + "created": "2023-09-22T19:20:19.996Z" + } + ] + }, + "total": 1 + } + } + } + } + } + }, + "delete": { + "tags": [ + "Webhook Subscriptions" + ], + "summary": "Delete a Webhook Subscription", + "description": "Delete a webhook subscription to stop receiving POST requests from Dwolla webhooks.", + "operationId": "deleteWebhookSubscription,", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of Webhook Subscription to delete", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/webhook-subscriptions/WebhookSubscription.json#/WebhookSubscription" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhook-subscriptions/94fae77b-9270-4cd3-9a25-9025ed380f20", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook-subscription" + }, + "webhooks": { + "href": "https://api.dwolla.com/webhook-subscriptions/94fae77b-9270-4cd3-9a25-9025ed380f20/webhooks", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + } + }, + "id": "94fae77b-9270-4cd3-9a25-9025ed380f20", + "url": "http://example.com/webhooks/4QYONM0C1N", + "paused": true, + "created": "2023-09-13T22:36:18.504Z" + } + } + } + } + } + } +} diff --git a/paths/webhook-subscriptions/getWebhookSubscription.json b/paths/webhook-subscriptions/getWebhookSubscription.json new file mode 100644 index 0000000..7f6837b --- /dev/null +++ b/paths/webhook-subscriptions/getWebhookSubscription.json @@ -0,0 +1,52 @@ +{ + "get": { + "tags": [ + "Webhook Subscriptions" + ], + "summary": "Get Webhook Subscription", + "description": "Get a Webhook Subscription by ID", + "operationId": "getWebhookSubscriptions", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of Webhook Subscription", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/webhook-subscriptions/WebhookSubscription.json#/WebhookSubscription" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook-subscription" + }, + "webhooks": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38/webhooks", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + } + }, + "id": "6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "url": "http://myapplication.com/webhooks", + "paused": false, + "created": "2023-09-22T19:20:19.996Z" + } + } + } + } + } + } +} diff --git a/paths/webhook-subscriptions/listWebhooksForWebhookSubscription.json b/paths/webhook-subscriptions/listWebhooksForWebhookSubscription.json new file mode 100644 index 0000000..8b82c9f --- /dev/null +++ b/paths/webhook-subscriptions/listWebhooksForWebhookSubscription.json @@ -0,0 +1,114 @@ +{ + "get": { + "tags": [ + "Webhook Subscriptions" + ], + "summary": "List Webhooks for a Webhook Subscription", + "description": "List all Webhooks fired for a Webhook Subscriptions", + "operationId": "listWebhooksForWebhookSubscription", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "UUID of Webhook Subscription", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/vnd.dwolla.v1.hal+json": { + "schema": { + "$ref": "../../schemas/webhook-subscriptions/Webhooks.json#/Webhooks" + }, + "example": { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38/webhooks", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + }, + "next": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38/webhooks?cursor=bGltaXQ9MjUmb2Zmc2V0PTUw", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + }, + "prev": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38/webhooks?cursor=bGltaXQ9MjUmb2Zmc2V0PTA=", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + } + }, + "_embedded": { + "webhooks": [ + { + "_links": { + "self": { + "href": "https://api.dwolla.com/webhooks/37090371-f163-48ab-b399-e3c40ba4c2d6", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook" + }, + "subscription": { + "href": "https://api.dwolla.com/webhook-subscriptions/6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "type": "application/vnd.dwolla.v1.hal+json", + "resource-type": "webhook-subscription" + } + }, + "id": "37090371-f163-48ab-b399-e3c40ba4c2d6", + "topic": "external_party:funding_source:created", + "accountId": "3b0f270c-9cfd-4724-bae8-aa4b1659cbb1", + "eventId": "1fd9bb08-e96d-4ded-ad2a-84b2390ec12f", + "subscriptionId": "6fdb35c6-c653-4aa2-86d9-fbac0c78af38", + "attempts": [ + { + "id": "ff488f5f-0ae7-49a0-838b-a899d689e7f4", + "request": { + "timestamp": "2023-10-12T14:57:45.236Z", + "url": "http://example.com/webhooks/4QYONM0C1N", + "headers": [ + { + "name": "Content-Length", + "value": "642" + }, + { + "name": "Content-Type", + "value": "application/json" + }, + { + "name": "User-Agent", + "value": "dwolla-webhooks/1.1" + }, + { + "name": "X-Dwolla-Topic", + "value": "external_party:funding_source:created" + }, + { + "name": "X-Request-Signature-SHA-256", + "value": "3baccb0f5c1be8fb771259137c179a61926e8ce575efac2d2aefe6e54384081f" + } + ], + "body": "{\"id\":\"1fd9bb08-e96d-4ded-ad2a-84b2390ec12f\",\"resourceId\":\"d0a73ee1-bbc3-4f53-8466-3e0295dea5c7\",\"topic\":\"external_party:funding_source:created\",\"timestamp\":\"2023-10-12T14:57:41.692Z\",\"_links\":{\"self\":{\"href\":\"https://api.dwolla.com/events/1fd9bb08-e96d-4ded-ad2a-84b2390ec12f\"},\"account\":{\"href\":\"https://api.dwolla.com/accounts/3b0f270c-9cfd-4724-bae8-aa4b1659cbb1\"},\"resource\":{\"href\":\"https://api.dwolla.com/funding-sources/d0a73ee1-bbc3-4f53-8466-3e0295dea5c7\"},\"external-party\":{\"href\":\"https://api.dwolla.com/external-parties/1087d335-1a1a-4340-8107-2b512ee2c91c\"}},\"created\":\"2023-10-12T14:57:41.692Z\"}" + }, + "response": { + "timestamp": "2023-10-12T14:57:45.583Z", + "headers": [], + "statusCode": 200, + "body": "" + } + } + ] + } + ] + } + } + } + } + } + } + } +} diff --git a/schemas/exchanges/Exchange.json b/schemas/exchanges/Exchange.json new file mode 100644 index 0000000..185ac26 --- /dev/null +++ b/schemas/exchanges/Exchange.json @@ -0,0 +1,50 @@ +{ + "Exchange": { + "title": "Exchange", + "type": "object", + "properties": { + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + }, + "resource-type": { + "type": "string" + } + } + }, + "exchange-partners": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + }, + "resource-type": { + "type": "string" + } + } + } + } + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "created": { + "type": "string" + } + } + } +} diff --git a/schemas/exchanges/ExchangePartner.json b/schemas/exchanges/ExchangePartner.json new file mode 100644 index 0000000..67d48a3 --- /dev/null +++ b/schemas/exchanges/ExchangePartner.json @@ -0,0 +1,53 @@ +{ + "ExchangePartner": { + "title": "ExchangePartner", + "type": "object", + "properties": { + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + }, + "resource-type": { + "type": "string" + } + } + }, + "funding-source": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + }, + "resource-type": { + "type": "string" + } + } + } + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "created": { + "type": "string" + } + } + } +} diff --git a/schemas/exchanges/ExchangePartners.json b/schemas/exchanges/ExchangePartners.json new file mode 100644 index 0000000..2c84151 --- /dev/null +++ b/schemas/exchanges/ExchangePartners.json @@ -0,0 +1,28 @@ +{ + "ExchangePartners": { + "title": "ExchangePartners", + "type": "object", + "properties": { + "_links": { + "additionalProperties": { + "$ref": "../common.json#/components/schemas/HalLink" + } + }, + "_embedded": { + "type": "object", + "properties": { + "exchange-partners": { + "type": "array", + "items": { + "$ref": "./ExchangePartner.json#/ExchangePartner" + } + } + } + }, + "total": { + "type": "integer", + "format": "int32" + } + } + } +} diff --git a/schemas/exchanges/createFinicityExchangeRequestBody.json b/schemas/exchanges/createFinicityExchangeRequestBody.json new file mode 100644 index 0000000..94c7e0c --- /dev/null +++ b/schemas/exchanges/createFinicityExchangeRequestBody.json @@ -0,0 +1,99 @@ +{ + "CreateFinicityExchangeRequestBody": { + "title": "CreateFinicityExchangeRequestBody", + "type": "object", + "properties": { + "_links": { + "type": "object", + "properties": { + "exchange-partner": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "required": [ + "href" + ] + } + }, + "required": [ + "exchange-partner" + ] + } + }, + "finicity": { + "type": "object", + "properties": { + "profile": { + "type": "integer", + "format": "int32" + }, + "version": { + "type": "string" + }, + "receiptId": { + "type": "string" + }, + "receiptVersion": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "partnerId": { + "type": "integer", + "format": "int64" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "accessPeriod": { + "type": "object", + "properties": { + "type": { + "type": "string", + "required": true + }, + "startTime": { + "type": "string", + "format": "date", + "required": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "required": true + } + } + }, + "required" : [ + "type", "startTime", "endTime" + ] + }, + "required": ["product", "accountId", "accessPeriod"] + } + }, + "timestamp": { + "type": "string", + "format": "date-time", + "required": true + } + }, + "required": ["profile", "version", "receiptId", "receiptVersion", "customerId", "partnerId", "products", "timestamp"] + }, + "required": [ + "_links", + "finicity" + ] + } + } +} diff --git a/schemas/exchanges/createMXExchangeRequestBody.json b/schemas/exchanges/createMXExchangeRequestBody.json new file mode 100644 index 0000000..cc914c5 --- /dev/null +++ b/schemas/exchanges/createMXExchangeRequestBody.json @@ -0,0 +1,34 @@ +{ + "CreateMXExchangeRequestBody": { + "title": "CreateMXExchangeRequestBody", + "type": "object", + "properties": { + "_links": { + "type": "object", + "properties": { + "exchange-partner": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "required": [ + "href" + ] + } + }, + "required": [ + "exchange-partner" + ] + } + }, + "token": { + "type": "string" + } + }, + "required": [ + "_links", + "token" + ] + } +} diff --git a/schemas/external-parties/CreateFundingSourceForExternalPartyRequestBody.json b/schemas/external-parties/CreateFundingSourceForExternalPartyRequestBody.json index bb62f27..65a81b6 100644 --- a/schemas/external-parties/CreateFundingSourceForExternalPartyRequestBody.json +++ b/schemas/external-parties/CreateFundingSourceForExternalPartyRequestBody.json @@ -1,6 +1,17 @@ { "CreateFundingSourceForExternalPartyRequestBody": { "title": "CreateFundingSourceForExternalPartyRequestBody", + "oneOf": [ + { + "$ref": "#/CreateBankFundingSourceRequestBody" + }, + { + "$ref": "#/CreateExchangeFundingSourceRequestBody" + } + ] + }, + "CreateBankFundingSourceRequestBody": { + "title": "CreateBankFundingSourceRequestBody", "type": "object", "properties": { "name": { @@ -26,5 +37,41 @@ "accountNumber", "routingNumber" ] + }, + "CreateExchangeFundingSourceRequestBody": { + "title": "CreateExchangeFundingSourceRequestBody", + "type": "object", + "properties": { + "_links": { + "type": "object", + "properties": { + "exchange": { + "type": "object", + "properties": { + "href": { + "type": "string" + } + }, + "required": [ + "href" + ] + } + }, + "required": [ + "exchange" + ] + }, + "bankAccountType": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "_links", + "bankAccountType", + "name" + ] } -} \ No newline at end of file +} diff --git a/schemas/funding-sources/FundingSource.json b/schemas/funding-sources/FundingSource.json index ebdeb40..01de4af 100644 --- a/schemas/funding-sources/FundingSource.json +++ b/schemas/funding-sources/FundingSource.json @@ -25,7 +25,11 @@ "created": { "type": "string", "format": "date-time" + }, + "removed": { + "type": "string", + "format": "date-time" } } } -} \ No newline at end of file +} diff --git a/schemas/funding-sources/RemoveFundingSourceRequestBody.json b/schemas/funding-sources/RemoveFundingSourceRequestBody.json new file mode 100644 index 0000000..fa8d0c2 --- /dev/null +++ b/schemas/funding-sources/RemoveFundingSourceRequestBody.json @@ -0,0 +1,14 @@ +{ + "RemoveFundingSourceRequestBody": { + "title": "RemoveFundingSourceRequestBody", + "type": "object", + "properties": { + "removed": { + "type": "boolean" + }, + "required": [ + "removed" + ] + } + } +} diff --git a/schemas/transfers/Transfer.json b/schemas/transfers/Transfer.json index ebce6df..e044975 100644 --- a/schemas/transfers/Transfer.json +++ b/schemas/transfers/Transfer.json @@ -19,29 +19,36 @@ "amount": { "$ref": "../common.json#/components/schemas/Amount" }, - "transferType": { - "type": "string", - "enum": [ - "credit", - "debit" - ] - }, - "transferStatus": { + "status": { "type": "string", "enum": [ "created", "pending", "processed", - "failed" + "failed", + "returned" ] }, "processingChannel": { "type": "string", "enum": [ - "ach", - "wire" + "ach" ] + }, + "failureReason": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "code": { + "type": "string" + }, + "explanation": { + "type": "string" + } + } } } } -} \ No newline at end of file +} diff --git a/schemas/webhook-subscriptions/CreateWebhookSubscriptionRequestBody.json b/schemas/webhook-subscriptions/CreateWebhookSubscriptionRequestBody.json new file mode 100644 index 0000000..7868235 --- /dev/null +++ b/schemas/webhook-subscriptions/CreateWebhookSubscriptionRequestBody.json @@ -0,0 +1,18 @@ +{ + "CreateWebhookSubscriptionRequestBody": { + "title": "CreateWebhookSubscriptionRequestBody", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "secret": { + "type": "string" + } + }, + "required": [ + "url", + "secret" + ] + } +} diff --git a/schemas/webhook-subscriptions/WebhookSubscription.json b/schemas/webhook-subscriptions/WebhookSubscription.json new file mode 100644 index 0000000..0b40ea4 --- /dev/null +++ b/schemas/webhook-subscriptions/WebhookSubscription.json @@ -0,0 +1,27 @@ +{ + "WebhookSubscription": { + "title": "WebhookSubscription", + "type": "object", + "properties": { + "_links": { + "additionalProperties": { + "$ref": "../common.json#/components/schemas/HalLink" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "url": { + "type": "string" + }, + "paused": { + "type": "boolean" + }, + "created": { + "type": "string", + "format": "date-time" + } + } + } +} diff --git a/schemas/webhook-subscriptions/Webhooks.json b/schemas/webhook-subscriptions/Webhooks.json new file mode 100644 index 0000000..893d352 --- /dev/null +++ b/schemas/webhook-subscriptions/Webhooks.json @@ -0,0 +1,24 @@ +{ + "Webhooks": { + "title": "Webhooks", + "type": "object", + "properties": { + "_links": { + "additionalProperties": { + "$ref": "../common.json#/components/schemas/HalLink" + } + }, + "_embedded": { + "type": "object", + "properties": { + "webhooks": { + "type": "array", + "items": { + "$ref": "../webhooks/Webhook.json#/Webhook" + } + } + } + } + } + } +} diff --git a/schemas/webhooks/Webhook.json b/schemas/webhooks/Webhook.json new file mode 100644 index 0000000..0de3577 --- /dev/null +++ b/schemas/webhooks/Webhook.json @@ -0,0 +1,90 @@ +{ + "Webhook": { + "title": "Webhook", + "type": "object", + "properties": { + "_links": { + "additionalProperties": { + "$ref": "../common.json#/components/schemas/HalLink" + } + }, + "id": { + "type": "string" + }, + "topic": { + "type": "string" + }, + "accountId": { + "type": "string" + }, + "eventId": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "attempts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "request": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "url": { + "type": "string" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "body": { + "type": "string" + } + } + }, + "response": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + }, + "statusCode": { + "type": "integer" + }, + "body": { + "type": "string" + } + } + } + } + } + } + } + } +} diff --git a/spec.json b/spec.json index ea98388..e4fa1e0 100644 --- a/spec.json +++ b/spec.json @@ -53,9 +53,27 @@ "/external-parties/{id}/funding-sources": { "$ref": "./paths/external-parties/createListFundingSources.json" }, + "/external-parties/{id}/exchanges": { + "$ref": "./paths/exchanges/createListExchangesForExternalParty.json" + }, + "/external-parties/{id}/transfers": { + "$ref": "./paths/external-parties/listExternalPartyTransfers.json" + }, "/funding-sources/{id}": { "$ref": "./paths/funding-sources/getFundingSource.json" }, + "/exchange-partners": { + "$ref": "./paths/exchanges/listExchangePartners.json" + }, + "/exchange-partners/{id}": { + "$ref": "./paths/exchanges/getExchangePartner.json" + }, + "/exchanges": { + "$ref": "./paths/exchanges/createListExchangesForAccount.json" + }, + "/exchanges/{id}": { + "$ref": "./paths/exchanges/getExchange.json" + }, "/transfers": { "$ref": "./paths/transfers/createTransfer.json" }, @@ -73,6 +91,15 @@ }, "/treasury-partners": { "$ref": "./paths/treasury-partners/listTreasuryPartners.json" + }, + "/webhook-subscriptions": { + "$ref": "./paths/webhook-subscriptions/createListDeleteWebhookSubscriptions.json" + }, + "/webhook-subscriptions/{id}": { + "$ref": "./paths/webhook-subscriptions/getWebhookSubscription.json" + }, + "/webhook-subscriptions/{id}/webhooks": { + "$ref": "./paths/webhook-subscriptions/listWebhooksForWebhookSubscription.json" } }, "components": { @@ -92,4 +119,4 @@ "bearerAuth": [] } ] -} \ No newline at end of file +}