-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbeneficiaries.js
64 lines (48 loc) · 23.5 KB
/
beneficiaries.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
var nock = require('nock');
nock('https://devapi.currencycloud.com:443')
.post('/v2/authenticate/api', {
"login_id":"[email protected]","api_key":"deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
})
.reply(200, {"auth_token":"67660a3ca5c6069b120190c4e744859f"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/validate', {"bank_country":"GB","currency":"GBP","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605"})
.reply(200, {"payment_types":["regular"],"bank_country":"GB","bank_name":"BARCLAYS BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"13071472","routing_code_type_1":"sort_code","beneficiary_address":[],"beneficiary_country":"GB","beneficiary_entity_type":null,"beneficiary_company_name":null,"beneficiary_first_name":null,"beneficiary_last_name":null,"beneficiary_city":null,"beneficiary_postcode":null,"beneficiary_state_or_province":null,"beneficiary_date_of_birth":null,"beneficiary_identification_type":null,"beneficiary_identification_value":null,"routing_code_value_1":"200605","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"bank_address":["Leicester","Leicestershire"]});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/account_verification', {"bank_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605", "beneficiary_entity_type": "individual", "beneficiary_first_name": "test", "beneficiary_last_name": "user"})
.reply(200, {"answer":"confirmed","actual_name":"Test User","reason_code":"FMCH","reason":"Full match"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/create',{"bank_account_holder_name":"John Doe","bank_country":"DE","currency":"EUR","name":"Employee Funds","email":"[email protected]","beneficiary_address":"23 Acacia Road","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"aba","routing_code_value_2":"789","bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","bank_address":"4356 Wisteria Lane","bank_name":"HSBC Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none"})
.reply(200, {"id":"c3dafe79-9394-4f43-a1a3-b7a518ab1cba","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:14+00:00","updated_at":"2017-11-01T20:58:14+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/create',{"bank_account_holder_name":"John Doe","bank_country":"DE","currency":"EUR","name":"Employee Funds","email":"[email protected]","beneficiary_address":"23 Acacia Road","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"aba","routing_code_value_2":"789","bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","bank_address":"4356 Wisteria Lane","bank_name":"HSBC Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none"})
.reply(200, {"id":"49eca94d-7510-4071-bd27-f7b12ad5fdf9","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:15+00:00","updated_at":"2017-11-01T20:58:15+00:00"});
nock('https://devapi.currencycloud.com:443')
.get('/v2/beneficiaries/49eca94d-7510-4071-bd27-f7b12ad5fdf9')
.reply(200, {"id":"49eca94d-7510-4071-bd27-f7b12ad5fdf9","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:15+00:00","updated_at":"2017-11-01T20:58:15+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/create',{"bank_account_holder_name":"John Doe","bank_country":"DE","currency":"EUR","name":"Employee Funds","email":"[email protected]","beneficiary_address":"23 Acacia Road","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"aba","routing_code_value_2":"789","bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","bank_address":"4356 Wisteria Lane","bank_name":"HSBC Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none"})
.reply(200, {"id":"0fff089a-aa95-4f5b-91f6-205cb3d0dc67","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:16+00:00","updated_at":"2017-11-01T20:58:16+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/0fff089a-aa95-4f5b-91f6-205cb3d0dc67',{"bank_account_holder_name":"Martin McFly","bank_country":"US","currency":"USD","name":"Employee Funds","email":"[email protected]","beneficiary_address":"9303 Roslyndale Ave.","beneficiary_country":"US","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200606","routing_code_type_2":"aba","routing_code_value_2":"780","bic_swift":"COBADEFF","iban":"US89370400440532013000","default_beneficiary":"true","bank_address":"1 Courthouse Square","bank_name":"Emmet Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Back to the Future","beneficiary_first_name":"Martin","beneficiary_last_name":"McFly","beneficiary_city":"Hill Valley","beneficiary_postcode":"91331","beneficiary_state_or_province":"CA","beneficiary_date_of_birth":"1968-06-09","beneficiary_identification_type":"none"})
.reply(200, {"id":"0fff089a-aa95-4f5b-91f6-205cb3d0dc67","bank_account_holder_name":"Martin McFly","name":"Employee Funds","email":null,"payment_types":["priority"],"beneficiary_address":["9303 Roslyndale Ave."],"beneficiary_country":"US","beneficiary_entity_type":"company","beneficiary_company_name":"Back to the Future","beneficiary_first_name":"Martin","beneficiary_last_name":"McFly","beneficiary_city":"Hill Valley","beneficiary_postcode":"91331","beneficiary_state_or_province":"CA","beneficiary_date_of_birth":"1968-06-09","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"US","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"USD","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200606","routing_code_type_2":"aba","routing_code_value_2":"780","bic_swift":"COBADEFF","iban":"US89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:16+00:00","updated_at":"2017-11-01T20:58:17+00:00"});
nock('https://devapi.currencycloud.com:443')
.get('/v2/beneficiaries/0fff089a-aa95-4f5b-91f6-205cb3d0dc67')
.reply(200, {"id":"0fff089a-aa95-4f5b-91f6-205cb3d0dc67","bank_account_holder_name":"Martin McFly","name":"Employee Funds","email":null,"payment_types":["priority"],"beneficiary_address":["9303 Roslyndale Ave."],"beneficiary_country":"US","beneficiary_entity_type":"company","beneficiary_company_name":"Back to the Future","beneficiary_first_name":"Martin","beneficiary_last_name":"McFly","beneficiary_city":"Hill Valley","beneficiary_postcode":"91331","beneficiary_state_or_province":"CA","beneficiary_date_of_birth":"1968-06-09","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"US","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"USD","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200606","routing_code_type_2":"aba","routing_code_value_2":"780","bic_swift":"COBADEFF","iban":"US89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:16+00:00","updated_at":"2017-11-01T20:58:17+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/create',{"bank_account_holder_name":"John Doe","bank_country":"DE","currency":"EUR","name":"Employee Funds","email":"[email protected]","beneficiary_address":"23 Acacia Road","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"aba","routing_code_value_2":"789","bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","bank_address":"4356 Wisteria Lane","bank_name":"HSBC Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none"})
.reply(200, {"id":"14abeffa-13f4-4926-893b-101a2822bb73","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:18+00:00","updated_at":"2017-11-01T20:58:18+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/find', {"name":"Employee Funds","order":"created_at","order_asc_desc":"desc","per_page":"5"})
.reply(200, {"beneficiaries":[{"id":"14abeffa-13f4-4926-893b-101a2822bb73","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:18+00:00","updated_at":"2017-11-01T20:58:18+00:00"},{"id":"0fff089a-aa95-4f5b-91f6-205cb3d0dc67","bank_account_holder_name":"Martin McFly","name":"Employee Funds","email":null,"payment_types":["priority"],"beneficiary_address":["9303 Roslyndale Ave."],"beneficiary_country":"US","beneficiary_entity_type":"company","beneficiary_company_name":"Back to the Future","beneficiary_first_name":"Martin","beneficiary_last_name":"McFly","beneficiary_city":"Hill Valley","beneficiary_postcode":"91331","beneficiary_state_or_province":"CA","beneficiary_date_of_birth":"1968-06-09","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"US","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"USD","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200606","routing_code_type_2":"aba","routing_code_value_2":"780","bic_swift":"COBADEFF","iban":"US89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:16+00:00","updated_at":"2017-11-01T20:58:17+00:00"},{"id":"49eca94d-7510-4071-bd27-f7b12ad5fdf9","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:15+00:00","updated_at":"2017-11-01T20:58:16+00:00"},{"id":"c3dafe79-9394-4f43-a1a3-b7a518ab1cba","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:14+00:00","updated_at":"2017-11-01T20:58:14+00:00"},{"id":"56fb2cef-3026-4f34-a90b-d4214a54f4d7","bank_account_holder_name":"Acme GmbH","name":"Employee Funds","email":null,"payment_types":["regular"],"beneficiary_address":[],"beneficiary_country":"DE","beneficiary_entity_type":null,"beneficiary_company_name":null,"beneficiary_first_name":null,"beneficiary_last_name":null,"beneficiary_city":null,"beneficiary_postcode":null,"beneficiary_state_or_province":null,"beneficiary_date_of_birth":null,"beneficiary_identification_type":null,"beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":null,"currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"false","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-10-30T13:52:31+00:00","updated_at":"2017-10-30T13:52:34+00:00"}],"pagination":{"total_entries":5,"total_pages":1,"current_page":1,"per_page":5,"previous_page":-1,"next_page":-1,"order":"created_at","order_asc_desc":"desc"}});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/create',{"bank_account_holder_name":"John Doe","bank_country":"DE","currency":"EUR","name":"Employee Funds","email":"[email protected]","beneficiary_address":"23 Acacia Road","beneficiary_country":"GB","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"aba","routing_code_value_2":"789","bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","bank_address":"4356 Wisteria Lane","bank_name":"HSBC Bank","bank_account_type":"checking","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none"})
.reply(200, {"id":"f88b3da1-8cc8-4a89-8704-a61c703968b2","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:19+00:00","updated_at":"2017-11-01T20:58:19+00:00"});
nock('https://devapi.currencycloud.com:443')
.post('/v2/beneficiaries/f88b3da1-8cc8-4a89-8704-a61c703968b2/delete')
.reply(200, {"id":"f88b3da1-8cc8-4a89-8704-a61c703968b2","bank_account_holder_name":"John Doe","name":"Employee Funds","email":null,"payment_types":["priority","regular"],"beneficiary_address":["23 Acacia Road"],"beneficiary_country":"GB","beneficiary_entity_type":"company","beneficiary_company_name":"Some Company LLC","beneficiary_first_name":"John","beneficiary_last_name":"Doe","beneficiary_city":"London","beneficiary_postcode":"W11 2BQ","beneficiary_state_or_province":"TX","beneficiary_date_of_birth":"1990-07-20","beneficiary_identification_type":"none","beneficiary_identification_value":null,"bank_country":"DE","bank_name":"COMMERZBANK AG","bank_account_type":"checking","currency":"EUR","account_number":null,"routing_code_type_1":null,"routing_code_value_1":null,"routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":"COBADEFF","iban":"DE89370400440532013000","default_beneficiary":"true","creator_contact_id":"8eddf045-4e98-48bf-821b-42c8eb926bc9","bank_address":["KAISERSTRASSE 16","60261 FRANKFURT AM MAIN"],"created_at":"2017-11-01T20:58:19+00:00","updated_at":"2017-11-01T20:58:19+00:00"});
nock('https://devapi.currencycloud.com:443')
.get('/v2/beneficiaries/f88b3da1-8cc8-4a89-8704-a61c703968b2')
.reply(404, {"error_code":"beneficiary_not_found","error_messages":{"id":[{"code":"beneficiary_not_found","message":"Beneficiary was not found for this id","params":{}}]}});
nock('https://devapi.currencycloud.com:443')
.post('/v2/authenticate/close_session')
.reply(200, {});