diff --git a/layouts/default.vue b/layouts/default.vue index 23ae5d8f..f453e8b6 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -222,6 +222,26 @@ export default class DefaultLayoutsClass extends Vue { title: 'GET /settlements/{id}', to: '/debug/settlements/details', }, + { + title: 'GET /wires/{id}', + to: '/debug/wires/details', + }, + { + title: 'POST /wires', + to: '/debug/wires/create', + }, + { + title: 'GET /payouts', + to: '/debug/payouts/fetch', + }, + { + title: 'GET /payouts/{id}', + to: '/debug/payouts/details', + }, + { + title: 'POST /payouts', + to: '/debug/payouts/create', + }, ] paymentsLinks = [ @@ -283,15 +303,15 @@ export default class DefaultLayoutsClass extends Vue { }, { title: 'GET /payouts', - to: '/debug/payments/payouts/fetch', + to: '/debug/payouts/fetch', }, { title: 'GET /payouts/{id}', - to: '/debug/payments/payouts/details', + to: '/debug/payouts/details', }, { title: 'POST /payouts', - to: '/debug/payments/payouts/create', + to: '/debug/payouts/create', }, ] diff --git a/lib/payoutsApi.ts b/lib/payoutsApi.ts index 3f246a38..17d35944 100644 --- a/lib/payoutsApi.ts +++ b/lib/payoutsApi.ts @@ -12,7 +12,6 @@ export interface CreatePayoutPayload { } metadata: { beneficiaryEmail: string - beneficiaryPhoneNumber: string | undefined } } @@ -97,9 +96,6 @@ function getPayoutById(payoutId: string) { */ function createPayout(payload: CreatePayoutPayload) { const url = '/v1/payouts' - payload.metadata.beneficiaryPhoneNumber = nullIfEmpty( - payload.metadata.beneficiaryPhoneNumber - ) return instance.post(url, payload) } diff --git a/lib/wiresApi.ts b/lib/wiresApi.ts index 435ccc72..d8c3f16c 100644 --- a/lib/wiresApi.ts +++ b/lib/wiresApi.ts @@ -8,7 +8,7 @@ export interface CreateWireAccountPayload { beneficiaryName: string | undefined bankName: string | undefined accountNumber: string | undefined - bankIdentifier: string | undefined + routingNumber: string | undefined iban: string | undefined billingDetails: { name: string @@ -71,11 +71,11 @@ const nullIfEmpty = (prop: string | undefined) => { * @param {*} payload (contains form data) */ function createWireAccount(payload: CreateWireAccountPayload) { - const url = '/v1/wires' + const url = '/v1/banks/wires' payload.beneficiaryName = nullIfEmpty(payload.beneficiaryName) payload.bankName = nullIfEmpty(payload.bankName) payload.accountNumber = nullIfEmpty(payload.accountNumber) - payload.bankIdentifier = nullIfEmpty(payload.bankIdentifier) + payload.routingNumber = nullIfEmpty(payload.routingNumber) payload.iban = nullIfEmpty(payload.iban) return instance.post(url, payload) } @@ -85,7 +85,7 @@ function createWireAccount(payload: CreateWireAccountPayload) { * @param {String} accountId */ function getWireAccountById(accountId: string) { - const url = `/v1/wires/${accountId}` + const url = `/v1/banks/wires/${accountId}` return instance.get(url) } diff --git a/lib/wiresTestData.ts b/lib/wiresTestData.ts index 8e7b2168..3286e418 100644 --- a/lib/wiresTestData.ts +++ b/lib/wiresTestData.ts @@ -5,7 +5,7 @@ export const exampleWireAccounts = [ beneficiaryName: 'Satoshi Nakamoto', bankName: 'WELLS FARGO BANK', accountNumber: '11111111111', - bankIdentifier: '121000248', + routingNumber: '121000248', iban: '', billingDetails: { name: 'Satoshi Nakamoto', @@ -32,7 +32,7 @@ export const exampleWireAccounts = [ beneficiaryName: 'Satoshi Nakamoto', bankName: 'COMMERZBANK', accountNumber: '', - bankIdentifier: '', + routingNumber: '', iban: 'DE31100400480532013000', billingDetails: { name: 'Satoshi Nakamoto', @@ -59,7 +59,7 @@ export const exampleWireAccounts = [ beneficiaryName: 'Satoshi Nakamoto', bankName: 'Banco Nacional de México', accountNumber: '002010077777777771', - bankIdentifier: '', + routingNumber: '', iban: '', billingDetails: { name: 'Satoshi Nakamoto', diff --git a/pages/debug/index.vue b/pages/debug/index.vue index 0797b971..472edcc0 100644 --- a/pages/debug/index.vue +++ b/pages/debug/index.vue @@ -153,12 +153,7 @@
-