currency_cloud 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +31 -0
  3. data/.rubocop.yml +6 -0
  4. data/.travis.yml +2 -4
  5. data/Gemfile +0 -3
  6. data/LICENSE.md +16 -17
  7. data/README.md +5 -3
  8. data/Rakefile +12 -12
  9. data/currency_cloud.gemspec +9 -9
  10. data/examples/server.rb +7 -7
  11. data/lib/currency_cloud/client.rb +5 -1
  12. data/lib/currency_cloud/conversion.rb +15 -0
  13. data/lib/currency_cloud/conversion_cancel_result.rb +5 -0
  14. data/lib/currency_cloud/conversion_date_change_result.rb +5 -0
  15. data/lib/currency_cloud/conversion_split_result.rb +5 -0
  16. data/lib/currency_cloud/errors/api_error.rb +2 -2
  17. data/lib/currency_cloud/errors/error_utils.rb +4 -4
  18. data/lib/currency_cloud/errors/unexpected_error.rb +3 -3
  19. data/lib/currency_cloud/iban.rb +22 -0
  20. data/lib/currency_cloud/ibans.rb +6 -0
  21. data/lib/currency_cloud/payer_required_details.rb +5 -0
  22. data/lib/currency_cloud/payment.rb +10 -0
  23. data/lib/currency_cloud/payment_authorisation_result.rb +5 -0
  24. data/lib/currency_cloud/payment_dates.rb +5 -0
  25. data/lib/currency_cloud/payment_submission.rb +5 -0
  26. data/lib/currency_cloud/purpose_code.rb +5 -0
  27. data/lib/currency_cloud/reference.rb +20 -5
  28. data/lib/currency_cloud/request_handler.rb +1 -3
  29. data/lib/currency_cloud/response_handler.rb +7 -7
  30. data/lib/currency_cloud/session.rb +2 -3
  31. data/lib/currency_cloud/transfer.rb +8 -0
  32. data/lib/currency_cloud/version.rb +1 -1
  33. data/lib/currency_cloud/virtual_account.rb +22 -0
  34. data/lib/currency_cloud/virtual_accounts.rb +6 -0
  35. data/spec/currency_cloud_spec.rb +9 -9
  36. data/spec/integration/authentication_spec.rb +2 -2
  37. data/spec/integration/conversions_spec.rb +94 -0
  38. data/spec/integration/error_utils_spec.rb +12 -12
  39. data/spec/integration/errors_spec.rb +84 -102
  40. data/spec/integration/ibans_spec.rb +42 -0
  41. data/spec/integration/payment_spec.rb +31 -0
  42. data/spec/integration/payments_spec.rb +67 -0
  43. data/spec/integration/reference_spec.rb +37 -14
  44. data/spec/integration/transfers_spec.rb +39 -0
  45. data/spec/integration/virtual_accounts_spec.rb +37 -0
  46. data/spec/spec_helper.rb +9 -1
  47. data/spec/support/vcr_cassettes/Authentication/can_be_closed.yml +1 -1
  48. data/spec/support/vcr_cassettes/Authentication/handles_session_timeout_error.yml +1 -1
  49. data/spec/support/vcr_cassettes/Authentication/happens_lazily.yml +1 -1
  50. data/spec/support/vcr_cassettes/Conversions/can_cancel_conversion/with_notes/has_a_non-empty_notes_attribute.yml +158 -0
  51. data/spec/support/vcr_cassettes/Conversions/can_cancel_conversion/without_notes/has_a_empty_notes_attribute.yml +157 -0
  52. data/spec/support/vcr_cassettes/Conversions/can_date_change_conversion.yml +157 -0
  53. data/spec/support/vcr_cassettes/Conversions/can_split_conversion.yml +157 -0
  54. data/spec/support/vcr_cassettes/Error/contains_full_details_for_api_error.yml +1 -1
  55. data/spec/support/vcr_cassettes/Error/is_raised_on_a_bad_request.yml +1 -1
  56. data/spec/support/vcr_cassettes/Error/is_raised_on_a_forbidden_request.yml +1 -1
  57. data/spec/support/vcr_cassettes/Error/is_raised_on_an_internal_server_error.yml +1 -1
  58. data/spec/support/vcr_cassettes/Error/is_raised_on_incorrect_authentication_details.yml +1 -1
  59. data/spec/support/vcr_cassettes/Error/is_raised_when_too_many_requests_have_been_issued.yml +1 -1
  60. data/spec/support/vcr_cassettes/IBANs/can_IBANs_for_a_specific_subaccount.yml +109 -0
  61. data/spec/support/vcr_cassettes/IBANs/can_IBANs_for_subaccounts.yml +108 -0
  62. data/spec/support/vcr_cassettes/IBANs/can_find.yml +114 -0
  63. data/spec/support/vcr_cassettes/Payments/can_authorise/when_payment_ids_are_valid.yml +263 -0
  64. data/spec/support/vcr_cassettes/Payments/can_create.yml +155 -0
  65. data/spec/support/vcr_cassettes/Payments/can_get_the_submission.yml +205 -0
  66. data/spec/support/vcr_cassettes/Reference/can_retrieve_beneficiary_required_details.yml +77 -12
  67. data/spec/support/vcr_cassettes/Reference/can_retrieve_conversion_dates.yml +183 -22
  68. data/spec/support/vcr_cassettes/Reference/can_retrieve_currencies.yml +110 -22
  69. data/spec/support/vcr_cassettes/Reference/can_retrieve_payer_required_details.yml +103 -0
  70. data/spec/support/vcr_cassettes/Reference/can_retrieve_payment_dates.yml +110 -0
  71. data/spec/support/vcr_cassettes/Reference/can_retrieve_payment_purpose_codes.yml +128 -0
  72. data/spec/support/vcr_cassettes/Reference/can_retrieve_settlement_accounts.yml +76 -11
  73. data/spec/support/vcr_cassettes/Settlements/can_add_conversion.yml +56 -6
  74. data/spec/support/vcr_cassettes/Settlements/can_release.yml +55 -5
  75. data/spec/support/vcr_cassettes/Settlements/can_remove_conversion.yml +55 -5
  76. data/spec/support/vcr_cassettes/Settlements/can_unrelease.yml +55 -5
  77. data/spec/support/vcr_cassettes/Transfers/can_create.yml +101 -0
  78. data/spec/support/vcr_cassettes/Transfers/can_find.yml +151 -0
  79. data/spec/support/vcr_cassettes/Transfers/can_retrieve.yml +151 -0
  80. data/spec/support/vcr_cassettes/VirtualAccounts/can_find.yml +108 -0
  81. data/spec/support/vcr_cassettes/VirtualAccounts/can_find_VANs_for_a_specific_subaccount.yml +108 -0
  82. data/spec/support/vcr_cassettes/VirtualAccounts/can_find_VANs_for_subaccounts.yml +108 -0
  83. metadata +82 -20
  84. data/Guardfile +0 -14
@@ -1,5 +1,55 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.currencycloud.com/v2/authenticate/api
6
+ body:
7
+ encoding: UTF-8
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 10:54:49 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=jdAOzpHYb0jEH3x6jJv3ou6pDeYk+sfljrQY7rdUBqQqrnsLrbZplMTSTrZ4mztZUSEEP2cX/JE4BJwN6d82VTq34utxO7Sc5vB4rrBNJNxqEinZsp70piF8rAWm;
27
+ Expires=Mon, 23 Jul 2018 10:54:47 GMT; Path=/
28
+ - __cfduid=d31bf943b43d3227f460b1ce7c3844fcb1531738487; expires=Tue, 16-Jul-19
29
+ 10:54:47 GMT; path=/; domain=.currencycloud.com; HttpOnly
30
+ Access-Control-Allow-Origin:
31
+ - "*"
32
+ X-Request-Id:
33
+ - 3138a734-59e3-4376-809b-04a79b22929d
34
+ Access-Control-Allow-Methods:
35
+ - POST
36
+ X-Content-Type-Options:
37
+ - nosniff
38
+ Vary:
39
+ - Origin
40
+ Access-Control-Allow-Headers:
41
+ - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
42
+ Expect-Ct:
43
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
44
+ Server:
45
+ - cloudflare
46
+ Cf-Ray:
47
+ - 43b3eeccad5dbc50-LHR
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
51
+ http_version:
52
+ recorded_at: Mon, 16 Jul 2018 10:54:49 GMT
3
53
  - request:
4
54
  method: get
5
55
  uri: https://devapi.currencycloud.com/v2/settlements/51c619e0-0256-40ad-afba-ca4114b936f9
@@ -8,7 +58,7 @@ http_interactions:
8
58
  string: ''
9
59
  headers:
10
60
  X-Auth-Token:
11
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
61
+ - deadbeefdeadbeefdeadbeefdeadbeef
12
62
  response:
13
63
  status:
14
64
  code: 200
@@ -31,7 +81,7 @@ http_interactions:
31
81
  body:
32
82
  encoding: UTF-8
33
83
  string: '{"id":"51c619e0-0256-40ad-afba-ca4114b936f9","status":"open","short_reference":"20150504-SHKTFD","type":"bulk","conversion_ids":["9bb4a49b-f959-402f-8bb8-4463b18d93c7"],"entries":[{"USD":{"receive_amount":"0.00","send_amount":"1512.00"}},{"GBP":{"receive_amount":"1000.00","send_amount":"0.00"}}],"created_at":"2015-05-04T21:14:48+00:00","updated_at":"2015-05-04T21:14:48+00:00","released_at":""}'
34
- http_version:
84
+ http_version:
35
85
  recorded_at: Mon, 04 May 2015 21:17:27 GMT
36
86
  - request:
37
87
  method: post
@@ -41,7 +91,7 @@ http_interactions:
41
91
  string: ''
42
92
  headers:
43
93
  X-Auth-Token:
44
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
94
+ - deadbeefdeadbeefdeadbeefdeadbeef
45
95
  response:
46
96
  status:
47
97
  code: 200
@@ -64,6 +114,6 @@ http_interactions:
64
114
  body:
65
115
  encoding: UTF-8
66
116
  string: '{"id":"51c619e0-0256-40ad-afba-ca4114b936f9","status":"released","short_reference":"20150504-SHKTFD","type":"bulk","conversion_ids":["9bb4a49b-f959-402f-8bb8-4463b18d93c7"],"entries":[{"USD":{"receive_amount":"0.00","send_amount":"1512.00"}},{"GBP":{"receive_amount":"1000.00","send_amount":"0.00"}}],"created_at":"2015-05-04T21:14:48+00:00","updated_at":"2015-05-04T21:44:23+00:00","released_at":"2015-05-04T21:44:23+00:00"}'
67
- http_version:
117
+ http_version:
68
118
  recorded_at: Mon, 04 May 2015 21:44:23 GMT
69
- recorded_with: VCR 2.9.3
119
+ recorded_with: VCR 3.0.3
@@ -1,5 +1,55 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.currencycloud.com/v2/authenticate/api
6
+ body:
7
+ encoding: UTF-8
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 10:54:47 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=RAeBFnE+35qBcuEU7OEqBdrIdVmaonKl86lfcHlAbI5b65Jx4mgsRbZH5rfBUz4Afr6kEEjozWSXUGtje7tMV3v93azFbYwfsS+f5BrhM1a9pPqyXU/8mYykUplv;
27
+ Expires=Mon, 23 Jul 2018 10:54:46 GMT; Path=/
28
+ - __cfduid=db28be0476eba7214b7f895c4b738315f1531738486; expires=Tue, 16-Jul-19
29
+ 10:54:46 GMT; path=/; domain=.currencycloud.com; HttpOnly
30
+ Access-Control-Allow-Origin:
31
+ - "*"
32
+ X-Request-Id:
33
+ - 3f74a705-e1ca-4a77-b4bc-ae6114fed064
34
+ Access-Control-Allow-Methods:
35
+ - POST
36
+ X-Content-Type-Options:
37
+ - nosniff
38
+ Vary:
39
+ - Origin
40
+ Access-Control-Allow-Headers:
41
+ - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
42
+ Expect-Ct:
43
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
44
+ Server:
45
+ - cloudflare
46
+ Cf-Ray:
47
+ - 43b3eec1c8c10a66-LHR
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
51
+ http_version:
52
+ recorded_at: Mon, 16 Jul 2018 10:54:47 GMT
3
53
  - request:
4
54
  method: get
5
55
  uri: https://devapi.currencycloud.com/v2/settlements/63eeef54-3531-4e65-827a-7d0f37503fcc
@@ -8,7 +58,7 @@ http_interactions:
8
58
  string: ''
9
59
  headers:
10
60
  X-Auth-Token:
11
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
61
+ - deadbeefdeadbeefdeadbeefdeadbeef
12
62
  response:
13
63
  status:
14
64
  code: 200
@@ -31,7 +81,7 @@ http_interactions:
31
81
  body:
32
82
  encoding: UTF-8
33
83
  string: '{"id":"63eeef54-3531-4e65-827a-7d0f37503fcc","status":"open","short_reference":"20150504-RKNNBH","type":"bulk","conversion_ids":["24d2ee7f-c7a3-4181-979e-9c58dbace992"],"entries":[{"GBP":{"receive_amount":"1000.00","send_amount":"0.00"}},{"USD":{"receive_amount":"0.00","send_amount":"1511.70"}}],"created_at":"2015-05-04T20:29:16+00:00","updated_at":"2015-05-04T20:40:56+00:00","released_at":""}'
34
- http_version:
84
+ http_version:
35
85
  recorded_at: Mon, 04 May 2015 21:10:09 GMT
36
86
  - request:
37
87
  method: post
@@ -41,7 +91,7 @@ http_interactions:
41
91
  string: conversion_id=24d2ee7f-c7a3-4181-979e-9c58dbace992
42
92
  headers:
43
93
  X-Auth-Token:
44
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
94
+ - deadbeefdeadbeefdeadbeefdeadbeef
45
95
  response:
46
96
  status:
47
97
  code: 200
@@ -64,6 +114,6 @@ http_interactions:
64
114
  body:
65
115
  encoding: UTF-8
66
116
  string: '{"id":"63eeef54-3531-4e65-827a-7d0f37503fcc","status":"open","short_reference":"20150504-RKNNBH","type":"bulk","conversion_ids":[],"entries":[],"created_at":"2015-05-04T20:29:16+00:00","updated_at":"2015-05-04T20:40:56+00:00","released_at":""}'
67
- http_version:
117
+ http_version:
68
118
  recorded_at: Mon, 04 May 2015 21:13:48 GMT
69
- recorded_with: VCR 2.9.3
119
+ recorded_with: VCR 3.0.3
@@ -1,5 +1,55 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.currencycloud.com/v2/authenticate/api
6
+ body:
7
+ encoding: UTF-8
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 10:54:51 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=JMKHEYXaDNLS10e97ewAnj80P87gx5wfDejW/P83fN8Xz/IFpXOBUxo708Y60Yc6PQz78KYd6J90MTB7+hG3Sh06wT1sizBshQE1qT9nB7awDnRjkj3xwo7ocdB0;
27
+ Expires=Mon, 23 Jul 2018 10:54:49 GMT; Path=/
28
+ - __cfduid=d79fab298bb727188b424fa75840a70de1531738489; expires=Tue, 16-Jul-19
29
+ 10:54:49 GMT; path=/; domain=.currencycloud.com; HttpOnly
30
+ Access-Control-Allow-Origin:
31
+ - "*"
32
+ X-Request-Id:
33
+ - 8c27e8d0-ce19-40c2-82e9-ee55f9c70594
34
+ Access-Control-Allow-Methods:
35
+ - POST
36
+ X-Content-Type-Options:
37
+ - nosniff
38
+ Vary:
39
+ - Origin
40
+ Access-Control-Allow-Headers:
41
+ - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
42
+ Expect-Ct:
43
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
44
+ Server:
45
+ - cloudflare
46
+ Cf-Ray:
47
+ - 43b3eed759651377-LHR
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
51
+ http_version:
52
+ recorded_at: Mon, 16 Jul 2018 10:54:51 GMT
3
53
  - request:
4
54
  method: get
5
55
  uri: https://devapi.currencycloud.com/v2/settlements/51c619e0-0256-40ad-afba-ca4114b936f9
@@ -8,7 +58,7 @@ http_interactions:
8
58
  string: ''
9
59
  headers:
10
60
  X-Auth-Token:
11
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
61
+ - deadbeefdeadbeefdeadbeefdeadbeef
12
62
  response:
13
63
  status:
14
64
  code: 200
@@ -31,7 +81,7 @@ http_interactions:
31
81
  body:
32
82
  encoding: UTF-8
33
83
  string: '{"id":"51c619e0-0256-40ad-afba-ca4114b936f9","status":"released","short_reference":"20150504-SHKTFD","type":"bulk","conversion_ids":["9bb4a49b-f959-402f-8bb8-4463b18d93c7"],"entries":[{"USD":{"receive_amount":"0.00","send_amount":"1512.00"}},{"GBP":{"receive_amount":"1000.00","send_amount":"0.00"}}],"created_at":"2015-05-04T21:14:48+00:00","updated_at":"2015-05-04T21:44:23+00:00","released_at":"2015-05-04T21:44:23+00:00"}'
34
- http_version:
84
+ http_version:
35
85
  recorded_at: Mon, 04 May 2015 21:50:54 GMT
36
86
  - request:
37
87
  method: post
@@ -41,7 +91,7 @@ http_interactions:
41
91
  string: ''
42
92
  headers:
43
93
  X-Auth-Token:
44
- - 6f5f99d1b860fc47e8a186e3dce0d3f9
94
+ - deadbeefdeadbeefdeadbeefdeadbeef
45
95
  response:
46
96
  status:
47
97
  code: 200
@@ -64,6 +114,6 @@ http_interactions:
64
114
  body:
65
115
  encoding: UTF-8
66
116
  string: '{"id":"51c619e0-0256-40ad-afba-ca4114b936f9","status":"open","short_reference":"20150504-SHKTFD","type":"bulk","conversion_ids":["9bb4a49b-f959-402f-8bb8-4463b18d93c7"],"entries":[{"USD":{"receive_amount":"0.00","send_amount":"1512.00"}},{"GBP":{"receive_amount":"1000.00","send_amount":"0.00"}}],"created_at":"2015-05-04T21:14:48+00:00","updated_at":"2015-05-04T21:51:51+00:00","released_at":""}'
67
- http_version:
117
+ http_version:
68
118
  recorded_at: Mon, 04 May 2015 21:51:51 GMT
69
- recorded_with: VCR 2.9.3
119
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,101 @@
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:28:36 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=v6QsIcJkok/P/XOdzcvQM6CQOYNcW4b0WCA2U735QoPoIa/ePhZq/YWnzLX8vvbH79Ob4+MRHX4N9zZoriLjTGKRBlzdqXcPiSkJBpKZtpHEi5Gw7Ci047+sKIRT; Expires=Mon, 23 Jul 2018 09:28:34 GMT; Path=/
27
+ - __cfduid=dcb20730b65f491e45ca68ec0c996e6291531733314; expires=Tue, 16-Jul-19 09:28:34 GMT; path=/; domain=.currencycloud.com; HttpOnly
28
+ Access-Control-Allow-Origin:
29
+ - "*"
30
+ X-Request-Id:
31
+ - a177efb1-2beb-4786-878a-f9bd677a79bc
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
+ - 43b37081cfac0a8a-LHR
46
+ body:
47
+ encoding: US-ASCII
48
+ string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
49
+ http_version:
50
+ recorded_at: Mon, 16 Jul 2018 09:28:36 GMT
51
+ - request:
52
+ method: post
53
+ uri: https://devapi.currencycloud.com/v2/transfers/create
54
+ body:
55
+ encoding: US-ASCII
56
+ string: source_account_id=d0ad035e-b699-4fcd-a73c-13fb0910a884&destination_account_id=e54a5e86-80ad-4434-90fe-0c8c751666de&currency=GBP&amount=1000
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:28:37 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=y8w8mMbgZa31vdPO7wyn/z+H17j9RSNF/c1Cb+8lAsAj6/Zhp/BWbTgZSv6IpkyF4EVz2iSNzcryWMfoQwrVXdMijv9OVTs3H/2FG3XO7gijo8iIdmf3Xnxf0Ew1; Expires=Mon, 23 Jul 2018 09:28:36 GMT; Path=/
77
+ - __cfduid=d28f602202836664258a316c571ad52bf1531733316; expires=Tue, 16-Jul-19 09:28:36 GMT; path=/; domain=.currencycloud.com; HttpOnly
78
+ Access-Control-Allow-Origin:
79
+ - "*"
80
+ X-Request-Id:
81
+ - 0ea610f3-97ec-4dd6-8697-3577e5498cf5
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
+ - 43b3708d097306be-LHR
96
+ body:
97
+ encoding: US-ASCII
98
+ string: '{"id":"f4bf00d7-1672-463d-96b0-9e9643793978","short_reference":"BT-20170515-ZPRQVQ","source_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","destination_account_id":"e54a5e86-80ad-4434-90fe-0c8c751666de","currency":"GBP","amount":"1000.00","status":"completed","reason":null,"created_at":"2017-05-15T13:02:23+00:00","updated_at":"2017-05-15T13:02:24+00:00","completed_at":"2017-05-15T13:02:24+00:00","creator_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","creator_contact_id":"16565245-1b65-464e-affa-58313192b54f"}'
99
+ http_version:
100
+ recorded_at: Mon, 16 Jul 2018 09:28:37 GMT
101
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,151 @@
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:57:57 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=dz7sDEzmNXFVzlpmyZ8HcAyjisZeRaJCBsLLCkaAAshR5Mw/2B11Od3NkAb7Gz628Zfhg86BQPe4GcewpbONYaSA54vxFQiL7RiShgPrT6u6kBBGA9OFoFwMotUe; Expires=Mon, 23 Jul 2018 09:57:56 GMT; Path=/
27
+ - __cfduid=d41464ab302746a83e7ce6f484a2a81de1531735076; expires=Tue, 16-Jul-19 09:57:56 GMT; path=/; domain=.currencycloud.com; HttpOnly
28
+ Access-Control-Allow-Origin:
29
+ - "*"
30
+ X-Request-Id:
31
+ - 8b67335b-4550-476a-bca1-c4b26baf2e74
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
+ - 43b39b82ca4b0a90-LHR
46
+ body:
47
+ encoding: US-ASCII
48
+ string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
49
+ http_version:
50
+ recorded_at: Mon, 16 Jul 2018 09:57:58 GMT
51
+ - request:
52
+ method: post
53
+ uri: https://devapi.currencycloud.com/v2/transfers/create
54
+ body:
55
+ encoding: US-ASCII
56
+ string: source_account_id=d0ad035e-b699-4fcd-a73c-13fb0910a884&destination_account_id=e54a5e86-80ad-4434-90fe-0c8c751666de&currency=GBP&amount=1000
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:57:58 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=IRSWZ+KHrG/tPBBR4yyRvr0lzjXQa+1fYl+ek0c8OjHVHLboV/4IcicsEN3z3Q0D+dkh+7x8YV9KwqF6+IIPupj5EpZhHdAVcidakINvlaKIfCZfic+ctvtRyvQO; Expires=Mon, 23 Jul 2018 09:57:58 GMT; Path=/
77
+ - __cfduid=d68db54511fb8f4ec985d099bcce223df1531735078; expires=Tue, 16-Jul-19 09:57:58 GMT; path=/; domain=.currencycloud.com; HttpOnly
78
+ Access-Control-Allow-Origin:
79
+ - "*"
80
+ X-Request-Id:
81
+ - e8e6e208-f331-4e50-9f51-aea713f8778c
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
+ - 43b39b8e5c260a72-LHR
96
+ body:
97
+ encoding: US-ASCII
98
+ string: '{"id":"f4bf00d7-1672-463d-96b0-9e9643793978","short_reference":"BT-20170515-ZPRQVQ","source_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","destination_account_id":"e54a5e86-80ad-4434-90fe-0c8c751666de","currency":"GBP","amount":"1000.00","status":"completed","reason":null,"created_at":"2017-05-15T13:02:23+00:00","updated_at":"2017-05-15T13:02:24+00:00","completed_at":"2017-05-15T13:02:24+00:00","creator_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","creator_contact_id":"16565245-1b65-464e-affa-58313192b54f"}'
99
+ http_version:
100
+ recorded_at: Mon, 16 Jul 2018 09:57:58 GMT
101
+ - request:
102
+ method: get
103
+ uri: https://devapi.currencycloud.com/v2/transfers/find?currency=GBP&per_page=1
104
+ body:
105
+ encoding: US-ASCII
106
+ string: ''
107
+ headers:
108
+ X-Auth-Token:
109
+ - deadbeefdeadbeefdeadbeefdeadbeef
110
+ User-Agent:
111
+ - CurrencyCloudSDK/2.0 Ruby/0.9.0
112
+ response:
113
+ status:
114
+ code: 200
115
+ message: OK
116
+ headers:
117
+ Date:
118
+ - Mon, 16 Jul 2018 09:58:35 GMT
119
+ Content-Type:
120
+ - application/json;charset=utf-8
121
+ Transfer-Encoding:
122
+ - chunked
123
+ Connection:
124
+ - keep-alive
125
+ Set-Cookie:
126
+ - AWSALB=zvThLcjkiqjuf3r/Kfa+05vO1HrenozxWD212QMJMAUQsERTupj43highi8qpsdXOy+cAB71E/dJIa5M5IQY+7lVPgy8p/nup7DA5oih53EL1SN6g+tx7k7+ZSJp; Expires=Mon, 23 Jul 2018 09:58:35 GMT; Path=/
127
+ - __cfduid=dfff691fa272f2fded5241ae89299b9b91531735115; expires=Tue, 16-Jul-19 09:58:35 GMT; path=/; domain=.currencycloud.com; HttpOnly
128
+ Access-Control-Allow-Origin:
129
+ - "*"
130
+ X-Request-Id:
131
+ - 01242395-0870-46c0-a46d-1bbfc1bf7834
132
+ Access-Control-Allow-Methods:
133
+ - GET
134
+ X-Content-Type-Options:
135
+ - nosniff
136
+ Vary:
137
+ - Origin
138
+ Access-Control-Allow-Headers:
139
+ - authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,X-Auth-Token,Origin,Authority
140
+ Expect-Ct:
141
+ - max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
142
+ Server:
143
+ - cloudflare
144
+ Cf-Ray:
145
+ - 43b39c782fad0a90-LHR
146
+ body:
147
+ encoding: US-ASCII
148
+ string: '{"transfers":[{"id":"f4bf00d7-1672-463d-96b0-9e9643793978","short_reference":"BT-20170515-ZPRQVQ","source_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","destination_account_id":"e54a5e86-80ad-4434-90fe-0c8c751666de","currency":"GBP","amount":"1000.00","status":"completed","reason":"","created_at":"2017-05-15T13:02:23+00:00","updated_at":"2017-05-15T13:02:24+00:00","completed_at":"2017-05-15T13:02:24+00:00","creator_account_id":"d0ad035e-b699-4fcd-a73c-13fb0910a884","creator_contact_id":"16565245-1b65-464e-affa-58313192b54f"}],"pagination":{"total_entries":1,"total_pages":1,"current_page":1,"per_page":1,"previous_page":-1,"next_page":-1,"order":"created_at","order_asc_desc":"asc"}}'
149
+ http_version:
150
+ recorded_at: Mon, 16 Jul 2018 09:58:35 GMT
151
+ recorded_with: VCR 4.0.0