currency_cloud 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +31 -0
- data/.rubocop.yml +6 -0
- data/.travis.yml +2 -4
- data/Gemfile +0 -3
- data/LICENSE.md +16 -17
- data/README.md +5 -3
- data/Rakefile +12 -12
- data/currency_cloud.gemspec +9 -9
- data/examples/server.rb +7 -7
- data/lib/currency_cloud/client.rb +5 -1
- data/lib/currency_cloud/conversion.rb +15 -0
- data/lib/currency_cloud/conversion_cancel_result.rb +5 -0
- data/lib/currency_cloud/conversion_date_change_result.rb +5 -0
- data/lib/currency_cloud/conversion_split_result.rb +5 -0
- data/lib/currency_cloud/errors/api_error.rb +2 -2
- data/lib/currency_cloud/errors/error_utils.rb +4 -4
- data/lib/currency_cloud/errors/unexpected_error.rb +3 -3
- data/lib/currency_cloud/iban.rb +22 -0
- data/lib/currency_cloud/ibans.rb +6 -0
- data/lib/currency_cloud/payer_required_details.rb +5 -0
- data/lib/currency_cloud/payment.rb +10 -0
- data/lib/currency_cloud/payment_authorisation_result.rb +5 -0
- data/lib/currency_cloud/payment_dates.rb +5 -0
- data/lib/currency_cloud/payment_submission.rb +5 -0
- data/lib/currency_cloud/purpose_code.rb +5 -0
- data/lib/currency_cloud/reference.rb +20 -5
- data/lib/currency_cloud/request_handler.rb +1 -3
- data/lib/currency_cloud/response_handler.rb +7 -7
- data/lib/currency_cloud/session.rb +2 -3
- data/lib/currency_cloud/transfer.rb +8 -0
- data/lib/currency_cloud/version.rb +1 -1
- data/lib/currency_cloud/virtual_account.rb +22 -0
- data/lib/currency_cloud/virtual_accounts.rb +6 -0
- data/spec/currency_cloud_spec.rb +9 -9
- data/spec/integration/authentication_spec.rb +2 -2
- data/spec/integration/conversions_spec.rb +94 -0
- data/spec/integration/error_utils_spec.rb +12 -12
- data/spec/integration/errors_spec.rb +84 -102
- data/spec/integration/ibans_spec.rb +42 -0
- data/spec/integration/payment_spec.rb +31 -0
- data/spec/integration/payments_spec.rb +67 -0
- data/spec/integration/reference_spec.rb +37 -14
- data/spec/integration/transfers_spec.rb +39 -0
- data/spec/integration/virtual_accounts_spec.rb +37 -0
- data/spec/spec_helper.rb +9 -1
- data/spec/support/vcr_cassettes/Authentication/can_be_closed.yml +1 -1
- data/spec/support/vcr_cassettes/Authentication/handles_session_timeout_error.yml +1 -1
- data/spec/support/vcr_cassettes/Authentication/happens_lazily.yml +1 -1
- data/spec/support/vcr_cassettes/Conversions/can_cancel_conversion/with_notes/has_a_non-empty_notes_attribute.yml +158 -0
- data/spec/support/vcr_cassettes/Conversions/can_cancel_conversion/without_notes/has_a_empty_notes_attribute.yml +157 -0
- data/spec/support/vcr_cassettes/Conversions/can_date_change_conversion.yml +157 -0
- data/spec/support/vcr_cassettes/Conversions/can_split_conversion.yml +157 -0
- data/spec/support/vcr_cassettes/Error/contains_full_details_for_api_error.yml +1 -1
- data/spec/support/vcr_cassettes/Error/is_raised_on_a_bad_request.yml +1 -1
- data/spec/support/vcr_cassettes/Error/is_raised_on_a_forbidden_request.yml +1 -1
- data/spec/support/vcr_cassettes/Error/is_raised_on_an_internal_server_error.yml +1 -1
- data/spec/support/vcr_cassettes/Error/is_raised_on_incorrect_authentication_details.yml +1 -1
- data/spec/support/vcr_cassettes/Error/is_raised_when_too_many_requests_have_been_issued.yml +1 -1
- data/spec/support/vcr_cassettes/IBANs/can_IBANs_for_a_specific_subaccount.yml +109 -0
- data/spec/support/vcr_cassettes/IBANs/can_IBANs_for_subaccounts.yml +108 -0
- data/spec/support/vcr_cassettes/IBANs/can_find.yml +114 -0
- data/spec/support/vcr_cassettes/Payments/can_authorise/when_payment_ids_are_valid.yml +263 -0
- data/spec/support/vcr_cassettes/Payments/can_create.yml +155 -0
- data/spec/support/vcr_cassettes/Payments/can_get_the_submission.yml +205 -0
- data/spec/support/vcr_cassettes/Reference/can_retrieve_beneficiary_required_details.yml +77 -12
- data/spec/support/vcr_cassettes/Reference/can_retrieve_conversion_dates.yml +183 -22
- data/spec/support/vcr_cassettes/Reference/can_retrieve_currencies.yml +110 -22
- data/spec/support/vcr_cassettes/Reference/can_retrieve_payer_required_details.yml +103 -0
- data/spec/support/vcr_cassettes/Reference/can_retrieve_payment_dates.yml +110 -0
- data/spec/support/vcr_cassettes/Reference/can_retrieve_payment_purpose_codes.yml +128 -0
- data/spec/support/vcr_cassettes/Reference/can_retrieve_settlement_accounts.yml +76 -11
- data/spec/support/vcr_cassettes/Settlements/can_add_conversion.yml +56 -6
- data/spec/support/vcr_cassettes/Settlements/can_release.yml +55 -5
- data/spec/support/vcr_cassettes/Settlements/can_remove_conversion.yml +55 -5
- data/spec/support/vcr_cassettes/Settlements/can_unrelease.yml +55 -5
- data/spec/support/vcr_cassettes/Transfers/can_create.yml +101 -0
- data/spec/support/vcr_cassettes/Transfers/can_find.yml +151 -0
- data/spec/support/vcr_cassettes/Transfers/can_retrieve.yml +151 -0
- data/spec/support/vcr_cassettes/VirtualAccounts/can_find.yml +108 -0
- data/spec/support/vcr_cassettes/VirtualAccounts/can_find_VANs_for_a_specific_subaccount.yml +108 -0
- data/spec/support/vcr_cassettes/VirtualAccounts/can_find_VANs_for_subaccounts.yml +108 -0
- metadata +82 -20
- data/Guardfile +0 -14
@@ -0,0 +1,155 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://devapi.currencycloud.com/v2/authenticate/api
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: login_id=development%40currencycloud.com&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Date:
|
18
|
+
- Mon, 16 Jul 2018 09:16:09 GMT
|
19
|
+
Content-Type:
|
20
|
+
- application/json;charset=utf-8
|
21
|
+
Transfer-Encoding:
|
22
|
+
- chunked
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- AWSALB=TtAWDo5N+GECcIa4nIynhdsZCM6f+hUyKIlQToVtfMkkjYzMPgDMpTAHL3sktf3Dzch3GjfCEXMuUhHUDzbmrCjTEPF338HaFj6TxT/pbIaZx1gNf+r44S58jEYP; Expires=Mon, 23 Jul 2018 09:16:07 GMT; Path=/
|
27
|
+
- __cfduid=d4c30a2963f6c01ef9b2b3deed1fe1e2b1531732567; expires=Tue, 16-Jul-19 09:16:07 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
28
|
+
Access-Control-Allow-Origin:
|
29
|
+
- "*"
|
30
|
+
X-Request-Id:
|
31
|
+
- 0039ce2b-220c-43fc-b20d-63a64bcb71ba
|
32
|
+
Access-Control-Allow-Methods:
|
33
|
+
- POST
|
34
|
+
X-Content-Type-Options:
|
35
|
+
- nosniff
|
36
|
+
Vary:
|
37
|
+
- Origin
|
38
|
+
Access-Control-Allow-Headers:
|
39
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
40
|
+
Expect-Ct:
|
41
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
42
|
+
Server:
|
43
|
+
- cloudflare
|
44
|
+
Cf-Ray:
|
45
|
+
- 43b35e44e908bbae-LHR
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: '{"auth_token":"a897e685e3a6483a50151431a2593a57"}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 16 Jul 2018 09:16:09 GMT
|
51
|
+
- request:
|
52
|
+
method: post
|
53
|
+
uri: https://devapi.currencycloud.com/v2/beneficiaries/create
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: bank_account_holder_name=Test%20User&bank_country=GB¤cy=GBP&name=Test%20User&account_number=12345678&routing_code_type_1=sort_code&routing_code_value_1=123456
|
57
|
+
headers:
|
58
|
+
X-Auth-Token:
|
59
|
+
- a897e685e3a6483a50151431a2593a57
|
60
|
+
User-Agent:
|
61
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Date:
|
68
|
+
- Mon, 16 Jul 2018 09:16:09 GMT
|
69
|
+
Content-Type:
|
70
|
+
- application/json;charset=utf-8
|
71
|
+
Transfer-Encoding:
|
72
|
+
- chunked
|
73
|
+
Connection:
|
74
|
+
- keep-alive
|
75
|
+
Set-Cookie:
|
76
|
+
- AWSALB=usdNraTzcHcsWmwSbhiNQ9dyoGSapQym+I/dTz9kkVo29YNcjlnK4u8208sfcqYMtKreaMDui/B/Cr6j4e+7R6gFfRKn7UtPa0R+2UOLhiawx3xs9Oo7OIRcQF37; Expires=Mon, 23 Jul 2018 09:16:09 GMT; Path=/
|
77
|
+
- __cfduid=d244b7f3496e14575e90510bd076c9c221531732569; expires=Tue, 16-Jul-19 09:16:09 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- "*"
|
80
|
+
X-Request-Id:
|
81
|
+
- 2faff63b-186c-4bbd-9456-21c1126794b3
|
82
|
+
Access-Control-Allow-Methods:
|
83
|
+
- POST
|
84
|
+
X-Content-Type-Options:
|
85
|
+
- nosniff
|
86
|
+
Vary:
|
87
|
+
- Origin
|
88
|
+
Access-Control-Allow-Headers:
|
89
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
90
|
+
Expect-Ct:
|
91
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
92
|
+
Server:
|
93
|
+
- cloudflare
|
94
|
+
Cf-Ray:
|
95
|
+
- 43b35e4fde01bb8a-LHR
|
96
|
+
body:
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: '{"id":"de0eaad6-bb04-4bfe-acc7-a4ce44e4e606","bank_account_holder_name":"Test
|
99
|
+
User","name":"Test User","email":null,"payment_types":["priority","regular"],"beneficiary_address":[],"beneficiary_country":null,"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":"GB","bank_name":"TEST
|
100
|
+
BANK NAME","bank_account_type":null,"currency":"GBP","account_number":"12345678","routing_code_type_1":"sort_code","routing_code_value_1":"123456","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","bank_address":["TEST
|
101
|
+
BANK ADDRESS"," NOT USING EXTERNAL SERVICE"," DEVELOPMENT ENVIRONMENT."],"created_at":"2018-07-16T09:16:09+00:00","updated_at":"2018-07-16T09:16:09+00:00","beneficiary_external_reference":null}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Mon, 16 Jul 2018 09:16:10 GMT
|
104
|
+
- request:
|
105
|
+
method: post
|
106
|
+
uri: https://devapi.currencycloud.com/v2/payments/create
|
107
|
+
body:
|
108
|
+
encoding: US-ASCII
|
109
|
+
string: currency=GBP&beneficiary_id=de0eaad6-bb04-4bfe-acc7-a4ce44e4e606&amount=1000&reason=Testing%20payments&reference=Testing%20payments&payment_type=regular
|
110
|
+
headers:
|
111
|
+
X-Auth-Token:
|
112
|
+
- a897e685e3a6483a50151431a2593a57
|
113
|
+
User-Agent:
|
114
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
115
|
+
response:
|
116
|
+
status:
|
117
|
+
code: 200
|
118
|
+
message: OK
|
119
|
+
headers:
|
120
|
+
Date:
|
121
|
+
- Mon, 16 Jul 2018 09:16:11 GMT
|
122
|
+
Content-Type:
|
123
|
+
- application/json;charset=utf-8
|
124
|
+
Transfer-Encoding:
|
125
|
+
- chunked
|
126
|
+
Connection:
|
127
|
+
- keep-alive
|
128
|
+
Set-Cookie:
|
129
|
+
- AWSALB=0ycVcRI0d4yjQb76b0TGmhNAoEzme0BzoMuH525zKBZBhJEnRyw4c2KSoJuy/aduJ9s805MWsQasXWCNxUMOnP6wcv7nvCasjips2FVwZBdtU7Bf6YdbInONHRcE; Expires=Mon, 23 Jul 2018 09:16:10 GMT; Path=/
|
130
|
+
- __cfduid=d2c9daf706da60d2d0e7599a0a68fd2a41531732570; expires=Tue, 16-Jul-19 09:16:10 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
131
|
+
Access-Control-Allow-Origin:
|
132
|
+
- "*"
|
133
|
+
X-Request-Id:
|
134
|
+
- 2c3d5627-520c-49d0-ac53-66539a814927
|
135
|
+
Access-Control-Allow-Methods:
|
136
|
+
- POST
|
137
|
+
X-Content-Type-Options:
|
138
|
+
- nosniff
|
139
|
+
Vary:
|
140
|
+
- Origin
|
141
|
+
Access-Control-Allow-Headers:
|
142
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
143
|
+
Expect-Ct:
|
144
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
145
|
+
Server:
|
146
|
+
- cloudflare
|
147
|
+
Cf-Ray:
|
148
|
+
- 43b35e5368e7bba8-LHR
|
149
|
+
body:
|
150
|
+
encoding: US-ASCII
|
151
|
+
string: '{"id":"efd026f1-5ca1-4266-b530-79f37ac31ca8","amount":"1000.00","beneficiary_id":"de0eaad6-bb04-4bfe-acc7-a4ce44e4e606","currency":"GBP","reference":"Testing
|
152
|
+
payments","reason":"Testing payments","status":"ready_to_send","creator_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","payment_type":"regular","payment_date":"2018-07-16","transferred_at":"","authorisation_steps_required":"0","last_updater_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","short_reference":"180716-BCQLJJ001","conversion_id":null,"failure_reason":"","payer_id":"08200442-7a72-4260-baa3-041d0535051e","payer_details_source":"account","created_at":"2018-07-16T09:16:10+00:00","updated_at":"2018-07-16T09:16:11+00:00","payment_group_id":null,"unique_request_id":null,"failure_returned_amount":"0.00","ultimate_beneficiary_name":null}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Mon, 16 Jul 2018 09:16:11 GMT
|
155
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,205 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://devapi.currencycloud.com/v2/authenticate/api
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: login_id=development%40currencycloud.com&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Date:
|
18
|
+
- Mon, 16 Jul 2018 09:18:06 GMT
|
19
|
+
Content-Type:
|
20
|
+
- application/json;charset=utf-8
|
21
|
+
Transfer-Encoding:
|
22
|
+
- chunked
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- AWSALB=Eitx/FGN3EPrLRfUj4m3bdN74Evvtb3wuOG1ReBiSPzXZrCa8naOsqZeYE/a84LLcRLWGleKA7X1SHkXyuS2CFNwx2f2VWY8RWJKQWovk7H/twnUy8ZnevMxCGpj; Expires=Mon, 23 Jul 2018 09:18:04 GMT; Path=/
|
27
|
+
- __cfduid=d1061aa9ff939c5be99f1eed8c46f70fc1531732684; expires=Tue, 16-Jul-19 09:18:04 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
28
|
+
Access-Control-Allow-Origin:
|
29
|
+
- "*"
|
30
|
+
X-Request-Id:
|
31
|
+
- 5feb46eb-699b-40c4-8fc7-df9cad60a38b
|
32
|
+
Access-Control-Allow-Methods:
|
33
|
+
- POST
|
34
|
+
X-Content-Type-Options:
|
35
|
+
- nosniff
|
36
|
+
Vary:
|
37
|
+
- Origin
|
38
|
+
Access-Control-Allow-Headers:
|
39
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
40
|
+
Expect-Ct:
|
41
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
42
|
+
Server:
|
43
|
+
- cloudflare
|
44
|
+
Cf-Ray:
|
45
|
+
- 43b3611d8e33bbba-LHR
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 16 Jul 2018 09:18:06 GMT
|
51
|
+
- request:
|
52
|
+
method: post
|
53
|
+
uri: https://devapi.currencycloud.com/v2/beneficiaries/create
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: bank_account_holder_name=Test%20User&bank_country=GB¤cy=GBP&name=Test%20User&account_number=12345678&routing_code_type_1=sort_code&routing_code_value_1=123456
|
57
|
+
headers:
|
58
|
+
X-Auth-Token:
|
59
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
60
|
+
User-Agent:
|
61
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 200
|
65
|
+
message: OK
|
66
|
+
headers:
|
67
|
+
Date:
|
68
|
+
- Mon, 16 Jul 2018 09:18:06 GMT
|
69
|
+
Content-Type:
|
70
|
+
- application/json;charset=utf-8
|
71
|
+
Transfer-Encoding:
|
72
|
+
- chunked
|
73
|
+
Connection:
|
74
|
+
- keep-alive
|
75
|
+
Set-Cookie:
|
76
|
+
- AWSALB=pPddo35SeNLw41e+IDFX3FoFmp29FdYKaDZOAukXSqvkWV5CQ2R3vosq8EnyF0e98f2uPHfbEFtUiFGXO/taiZkht3vyEqNy7wm0/Jsra2kH/2idcJFjuxs1O/Xp; Expires=Mon, 23 Jul 2018 09:18:06 GMT; Path=/
|
77
|
+
- __cfduid=d294a21425beb6795322afff02562d9161531732686; expires=Tue, 16-Jul-19 09:18:06 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- "*"
|
80
|
+
X-Request-Id:
|
81
|
+
- 7d734f24-9714-41d1-a54b-f874a0ecdfb3
|
82
|
+
Access-Control-Allow-Methods:
|
83
|
+
- POST
|
84
|
+
X-Content-Type-Options:
|
85
|
+
- nosniff
|
86
|
+
Vary:
|
87
|
+
- Origin
|
88
|
+
Access-Control-Allow-Headers:
|
89
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
90
|
+
Expect-Ct:
|
91
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
92
|
+
Server:
|
93
|
+
- cloudflare
|
94
|
+
Cf-Ray:
|
95
|
+
- 43b361284b1ebbcc-LHR
|
96
|
+
body:
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: '{"id":"fefe1c10-9e62-48d2-9b97-7304bb9e40f4","bank_account_holder_name":"Test
|
99
|
+
User","name":"Test User","email":null,"payment_types":["priority","regular"],"beneficiary_address":[],"beneficiary_country":null,"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":"GB","bank_name":"TEST
|
100
|
+
BANK NAME","bank_account_type":null,"currency":"GBP","account_number":"12345678","routing_code_type_1":"sort_code","routing_code_value_1":"123456","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","bank_address":["TEST
|
101
|
+
BANK ADDRESS"," NOT USING EXTERNAL SERVICE"," DEVELOPMENT ENVIRONMENT."],"created_at":"2018-07-16T09:18:06+00:00","updated_at":"2018-07-16T09:18:06+00:00","beneficiary_external_reference":null}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Mon, 16 Jul 2018 09:18:06 GMT
|
104
|
+
- request:
|
105
|
+
method: post
|
106
|
+
uri: https://devapi.currencycloud.com/v2/payments/create
|
107
|
+
body:
|
108
|
+
encoding: US-ASCII
|
109
|
+
string: currency=GBP&beneficiary_id=fefe1c10-9e62-48d2-9b97-7304bb9e40f4&amount=1000&reason=Testing%20payments&reference=Testing%20payments&payment_type=regular
|
110
|
+
headers:
|
111
|
+
X-Auth-Token:
|
112
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
113
|
+
User-Agent:
|
114
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
115
|
+
response:
|
116
|
+
status:
|
117
|
+
code: 200
|
118
|
+
message: OK
|
119
|
+
headers:
|
120
|
+
Date:
|
121
|
+
- Mon, 16 Jul 2018 09:18:07 GMT
|
122
|
+
Content-Type:
|
123
|
+
- application/json;charset=utf-8
|
124
|
+
Transfer-Encoding:
|
125
|
+
- chunked
|
126
|
+
Connection:
|
127
|
+
- keep-alive
|
128
|
+
Set-Cookie:
|
129
|
+
- AWSALB=35mC30qH9ESAuuaxoBcNINoaAFsOZ/mAeJoTgI3k3L1eJkU0XKwJLFpB2AkEdsEM5y4Vxxami7H1eiqhOxK64KhH1U1v03/O64YO27We8J9A4Fdzi5knhIfk2Fha; Expires=Mon, 23 Jul 2018 09:18:06 GMT; Path=/
|
130
|
+
- __cfduid=d4aecdab018d0b197e1136cc064a5c3e61531732686; expires=Tue, 16-Jul-19 09:18:06 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
131
|
+
Access-Control-Allow-Origin:
|
132
|
+
- "*"
|
133
|
+
X-Request-Id:
|
134
|
+
- fdf86e2a-cf9a-4266-96e8-b0f63d188543
|
135
|
+
Access-Control-Allow-Methods:
|
136
|
+
- POST
|
137
|
+
X-Content-Type-Options:
|
138
|
+
- nosniff
|
139
|
+
Vary:
|
140
|
+
- Origin
|
141
|
+
Access-Control-Allow-Headers:
|
142
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
143
|
+
Expect-Ct:
|
144
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
145
|
+
Server:
|
146
|
+
- cloudflare
|
147
|
+
Cf-Ray:
|
148
|
+
- 43b3612b8ae4bbae-LHR
|
149
|
+
body:
|
150
|
+
encoding: US-ASCII
|
151
|
+
string: '{"id":"af7cb12e-56d1-41a9-983d-a47927609e32","amount":"1000.00","beneficiary_id":"fefe1c10-9e62-48d2-9b97-7304bb9e40f4","currency":"GBP","reference":"Testing
|
152
|
+
payments","reason":"Testing payments","status":"ready_to_send","creator_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","payment_type":"regular","payment_date":"2018-07-16","transferred_at":"","authorisation_steps_required":"0","last_updater_contact_id":"97bd468f-c7bc-446f-ba68-dd8cf2bddef2","short_reference":"180716-MWSMWM001","conversion_id":null,"failure_reason":"","payer_id":"08200442-7a72-4260-baa3-041d0535051e","payer_details_source":"account","created_at":"2018-07-16T09:18:07+00:00","updated_at":"2018-07-16T09:18:07+00:00","payment_group_id":null,"unique_request_id":null,"failure_returned_amount":"0.00","ultimate_beneficiary_name":null}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Mon, 16 Jul 2018 09:18:07 GMT
|
155
|
+
- request:
|
156
|
+
method: get
|
157
|
+
uri: https://devapi.currencycloud.com/v2/payments/af7cb12e-56d1-41a9-983d-a47927609e32/submission
|
158
|
+
body:
|
159
|
+
encoding: US-ASCII
|
160
|
+
string: ''
|
161
|
+
headers:
|
162
|
+
X-Auth-Token:
|
163
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
164
|
+
User-Agent:
|
165
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
166
|
+
response:
|
167
|
+
status:
|
168
|
+
code: 200
|
169
|
+
message: OK
|
170
|
+
headers:
|
171
|
+
Date:
|
172
|
+
- Mon, 16 Jul 2018 09:18:07 GMT
|
173
|
+
Content-Type:
|
174
|
+
- application/json;charset=utf-8
|
175
|
+
Transfer-Encoding:
|
176
|
+
- chunked
|
177
|
+
Connection:
|
178
|
+
- keep-alive
|
179
|
+
Set-Cookie:
|
180
|
+
- AWSALB=/6jU7TfV1kIoKJzny4kQgKBL1UKQBlKqEmxv7XeGzpNIvXKBNPQCRlYf2ZO9Lb00aY6r9gXQRQllgBwLcGYPy22UCX98x1PG88LpOrtMSUm01Zv4aHzRUueOaI4z; Expires=Mon, 23 Jul 2018 09:18:07 GMT; Path=/
|
181
|
+
- __cfduid=d28f922ef766a399aec7f05f79530e3341531732687; expires=Tue, 16-Jul-19 09:18:07 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
182
|
+
Access-Control-Allow-Origin:
|
183
|
+
- "*"
|
184
|
+
X-Request-Id:
|
185
|
+
- 850d1fe4-76f8-4863-b8f3-c764f7b2cef5
|
186
|
+
Access-Control-Allow-Methods:
|
187
|
+
- GET
|
188
|
+
X-Content-Type-Options:
|
189
|
+
- nosniff
|
190
|
+
Vary:
|
191
|
+
- Origin
|
192
|
+
Access-Control-Allow-Headers:
|
193
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
194
|
+
Expect-Ct:
|
195
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
196
|
+
Server:
|
197
|
+
- cloudflare
|
198
|
+
Cf-Ray:
|
199
|
+
- 43b36130eeeebbe4-LHR
|
200
|
+
body:
|
201
|
+
encoding: US-ASCII
|
202
|
+
string: '{"status":null,"mt103":null,"submission_ref":null}'
|
203
|
+
http_version:
|
204
|
+
recorded_at: Mon, 16 Jul 2018 09:18:07 GMT
|
205
|
+
recorded_with: VCR 4.0.0
|
@@ -1,5 +1,53 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://devapi.currencycloud.com/v2/authenticate/api
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: login_id=development%40currencycloud.com&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Date:
|
18
|
+
- Mon, 16 Jul 2018 08:20:14 GMT
|
19
|
+
Content-Type:
|
20
|
+
- application/json;charset=utf-8
|
21
|
+
Transfer-Encoding:
|
22
|
+
- chunked
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Set-Cookie:
|
26
|
+
- AWSALB=JpWe8cJzRhv4y6vw/IU+s5GhiuDyGrTi6vtz6co+S0h3gIbGe216G4tO/ShPFipDpVbIyjW2adc1dWbedPE6KtLb6Zd8EkruEcNHxASHm2VPkAp32QK3biCRFUkv; Expires=Mon, 23 Jul 2018 08:20:13 GMT; Path=/
|
27
|
+
- __cfduid=d0c32af71ff0925dd045630165ce66c121531729213; expires=Tue, 16-Jul-19 08:20:13 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
28
|
+
Access-Control-Allow-Origin:
|
29
|
+
- "*"
|
30
|
+
X-Request-Id:
|
31
|
+
- e8908fc1-4f80-4c60-9c44-363928bed983
|
32
|
+
Access-Control-Allow-Methods:
|
33
|
+
- POST
|
34
|
+
X-Content-Type-Options:
|
35
|
+
- nosniff
|
36
|
+
Vary:
|
37
|
+
- Origin
|
38
|
+
Access-Control-Allow-Headers:
|
39
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
40
|
+
Expect-Ct:
|
41
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
42
|
+
Server:
|
43
|
+
- cloudflare
|
44
|
+
Cf-Ray:
|
45
|
+
- 43b30c5d1b930a8a-LHR
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 16 Jul 2018 08:20:14 GMT
|
3
51
|
- request:
|
4
52
|
method: get
|
5
53
|
uri: https://devapi.currencycloud.com/v2/reference/beneficiary_required_details?bank_account_country=GB&beneficiary_country=GB¤cy=GBP
|
@@ -8,29 +56,46 @@ http_interactions:
|
|
8
56
|
string: ''
|
9
57
|
headers:
|
10
58
|
X-Auth-Token:
|
11
|
-
-
|
59
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
60
|
+
User-Agent:
|
61
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
12
62
|
response:
|
13
63
|
status:
|
14
64
|
code: 200
|
15
65
|
message: OK
|
16
66
|
headers:
|
17
|
-
Server:
|
18
|
-
- nginx
|
19
67
|
Date:
|
20
|
-
-
|
68
|
+
- Mon, 16 Jul 2018 08:20:15 GMT
|
21
69
|
Content-Type:
|
22
70
|
- application/json;charset=utf-8
|
23
|
-
|
24
|
-
-
|
71
|
+
Transfer-Encoding:
|
72
|
+
- chunked
|
25
73
|
Connection:
|
26
74
|
- keep-alive
|
75
|
+
Set-Cookie:
|
76
|
+
- AWSALB=f61uJIdQJ62af6qzIvrUyJ/GuWAfhANu0wtDcexsHBbOaAWvC7AoyaVAebCjVgxZ3oyt3y7xdvr8TmJhcmtxkFE3YVOtliw8PJm2Nb66/OMzp5C0zgAnUn+FagXL; Expires=Mon, 23 Jul 2018 08:20:14 GMT; Path=/
|
77
|
+
- __cfduid=db268a59c300ca9cb4728d291492bb4cd1531729214; expires=Tue, 16-Jul-19 08:20:14 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- "*"
|
27
80
|
X-Request-Id:
|
28
|
-
-
|
81
|
+
- 54f7d95c-dd88-4cf4-bf3c-35b21bd66a63
|
82
|
+
Access-Control-Allow-Methods:
|
83
|
+
- GET
|
29
84
|
X-Content-Type-Options:
|
30
85
|
- nosniff
|
86
|
+
Vary:
|
87
|
+
- Origin
|
88
|
+
Access-Control-Allow-Headers:
|
89
|
+
- authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
|
90
|
+
Expect-Ct:
|
91
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
92
|
+
Server:
|
93
|
+
- cloudflare
|
94
|
+
Cf-Ray:
|
95
|
+
- 43b30c692e8606d0-LHR
|
31
96
|
body:
|
32
|
-
encoding:
|
33
|
-
string: '{"details":[{"payment_type":"
|
34
|
-
http_version:
|
35
|
-
recorded_at:
|
36
|
-
recorded_with: VCR
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: '{"details":[{"payment_type":"regular","acct_number":"^[0-9A-Z]{1,50}$","sort_code":"^\\d{6}$","beneficiary_entity_type":"individual"},{"payment_type":"regular","acct_number":"^[0-9A-Z]{1,50}$","sort_code":"^\\d{6}$","beneficiary_entity_type":"company"},{"payment_type":"priority","acct_number":"^[0-9A-Z]{1,50}$","sort_code":"^\\d{6}$","beneficiary_entity_type":"individual"},{"payment_type":"priority","acct_number":"^[0-9A-Z]{1,50}$","sort_code":"^\\d{6}$","beneficiary_entity_type":"company"}]}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 16 Jul 2018 08:20:15 GMT
|
101
|
+
recorded_with: VCR 4.0.0
|