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,110 @@
|
|
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 08:20:24 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=XsVmC24jOQDLOMhpbJyZ65ntr5xRyYp2g7Mraf2OnFRWbE3jiKr/Izh5wgdDPN7MLlfO9UUPCeDFwThUtDRpVQ9eHpaMe30OnYes6G/+gwbuY+tlSt3Ax0CZjuOi; Expires=Mon, 23 Jul 2018 08:20:22 GMT; Path=/
|
27
|
+
- __cfduid=d16be9ee25e4493f5e422e8a2fc07d6471531729222; expires=Tue, 16-Jul-19 08:20:22 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
28
|
+
Access-Control-Allow-Origin:
|
29
|
+
- "*"
|
30
|
+
X-Request-Id:
|
31
|
+
- f29248d2-e005-453a-8533-47f6329f8de2
|
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
|
+
- 43b30c984eea06c4-LHR
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 16 Jul 2018 08:20:24 GMT
|
51
|
+
- request:
|
52
|
+
method: get
|
53
|
+
uri: https://devapi.currencycloud.com/v2/reference/payment_dates?currency=GBP
|
54
|
+
body:
|
55
|
+
encoding: US-ASCII
|
56
|
+
string: ''
|
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 08:20:24 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=Ro7f+MsP3nnuPjHcnl7lZejyKY45GVVAbkDD5kYpjUA7G42f6ksslUVr5dSQiL9jpVNzhnCuqcVKHh7PPY66TmuoU4uLN6BiZk5sWlFdICcHi5NCbWbXeva2qqTB; Expires=Mon, 23 Jul 2018 08:20:24 GMT; Path=/
|
77
|
+
- __cfduid=dfe9d8ad8c5819eee1986ff70557088031531729224; expires=Tue, 16-Jul-19 08:20:24 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- "*"
|
80
|
+
X-Request-Id:
|
81
|
+
- a92ff948-f900-46fa-853a-c29e9df46f27
|
82
|
+
Access-Control-Allow-Methods:
|
83
|
+
- GET
|
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
|
+
- 43b30ca38e400a84-LHR
|
96
|
+
body:
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: '{"invalid_payment_dates":{"2018-07-21":"No trading on Saturday","2018-07-22":"No
|
99
|
+
trading on Sunday","2018-07-28":"No trading on Saturday","2018-07-29":"No
|
100
|
+
trading on Sunday","2018-08-04":"No trading on Saturday","2018-08-05":"No
|
101
|
+
trading on Sunday","2018-08-11":"No trading on Saturday","2018-08-12":"No
|
102
|
+
trading on Sunday","2018-08-18":"No trading on Saturday","2018-08-19":"No
|
103
|
+
trading on Sunday","2018-08-25":"No trading on Saturday","2018-08-26":"No
|
104
|
+
trading on Sunday","2018-08-27":"","2018-09-01":"No trading on Saturday","2018-09-02":"No
|
105
|
+
trading on Sunday","2018-09-08":"No trading on Saturday","2018-09-09":"No
|
106
|
+
trading on Sunday","2018-09-15":"No trading on Saturday","2018-09-16":"No
|
107
|
+
trading on Sunday"},"first_payment_date":"2018-07-16"}'
|
108
|
+
http_version:
|
109
|
+
recorded_at: Mon, 16 Jul 2018 08:20:24 GMT
|
110
|
+
recorded_with: VCR 4.0.0
|
@@ -0,0 +1,128 @@
|
|
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 08:21:41 GMT
|
19
|
+
Content-Type:
|
20
|
+
- application/json;charset=utf-8
|
21
|
+
Content-Length:
|
22
|
+
- '49'
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Server:
|
26
|
+
- nginx
|
27
|
+
X-Request-Id:
|
28
|
+
- 1c3aa2cb-bfc4-4cd3-a6dd-889681f69e0f
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
Vary:
|
32
|
+
- Origin
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Jul 2018 08:21:41 GMT
|
38
|
+
- request:
|
39
|
+
method: get
|
40
|
+
uri: https://devapi.currencycloud.com/v2/reference/payment_purpose_codes?currency=INR
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ''
|
44
|
+
headers:
|
45
|
+
X-Auth-Token:
|
46
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
47
|
+
User-Agent:
|
48
|
+
- CurrencyCloudSDK/2.0 Ruby/0.9.0
|
49
|
+
response:
|
50
|
+
status:
|
51
|
+
code: 200
|
52
|
+
message: OK
|
53
|
+
headers:
|
54
|
+
Date:
|
55
|
+
- Mon, 16 Jul 2018 08:21:41 GMT
|
56
|
+
Content-Type:
|
57
|
+
- application/json;charset=utf-8
|
58
|
+
Content-Length:
|
59
|
+
- '6987'
|
60
|
+
Connection:
|
61
|
+
- keep-alive
|
62
|
+
Server:
|
63
|
+
- nginx
|
64
|
+
X-Request-Id:
|
65
|
+
- 89eff13b-eddb-4b23-b459-561c81a84829
|
66
|
+
X-Content-Type-Options:
|
67
|
+
- nosniff
|
68
|
+
Vary:
|
69
|
+
- Origin
|
70
|
+
body:
|
71
|
+
encoding: US-ASCII
|
72
|
+
string: '{"purpose_codes":[{"currency":"INR","entity_type":"company","purpose_code":"property_purchase","purpose_description":"Purchase
|
73
|
+
of residential property"},{"currency":"INR","entity_type":"company","purpose_code":"construction","purpose_description":"Construction
|
74
|
+
costs/expenses"},{"currency":"INR","entity_type":"company","purpose_code":"travel","purpose_description":"Travel"},{"currency":"INR","entity_type":"company","purpose_code":"office","purpose_description":"Representative
|
75
|
+
office expenses"},{"currency":"INR","entity_type":"company","purpose_code":"exports","purpose_description":"Payments
|
76
|
+
for exported goods"},{"currency":"INR","entity_type":"individual","purpose_code":"travel","purpose_description":"Travel"},{"currency":"INR","entity_type":"individual","purpose_code":"services","purpose_description":"Information
|
77
|
+
service charges"},{"currency":"INR","entity_type":"individual","purpose_code":"education","purpose_description":"Education-related
|
78
|
+
student expenses"},{"currency":"INR","entity_type":"company","purpose_code":"transfer","purpose_description":"Transfer
|
79
|
+
to own account"},{"currency":"INR","entity_type":"individual","purpose_code":"office","purpose_description":"Representative
|
80
|
+
office expenses"},{"currency":"INR","entity_type":"individual","purpose_code":"delivery","purpose_description":"Delivery
|
81
|
+
fees for goods"},{"currency":"INR","entity_type":"individual","purpose_code":"goods","purpose_description":"Trade
|
82
|
+
settlement for goods and general goods trades"},{"currency":"INR","entity_type":"company","purpose_code":"services","purpose_description":"Information
|
83
|
+
service charges"},{"currency":"INR","entity_type":"individual","purpose_code":"medical","purpose_description":"Medical
|
84
|
+
treatment and expenses"},{"currency":"INR","entity_type":"company","purpose_code":"royalties","purpose_description":"Royalty,
|
85
|
+
trademark, patent and copyright fees"},{"currency":"INR","entity_type":"individual","purpose_code":"advisor_fees","purpose_description":"Fees
|
86
|
+
for advisory, technical, academic or specialist asssitance"},{"currency":"INR","entity_type":"individual","purpose_code":"loan_repayment","purpose_description":"Repayment
|
87
|
+
of loans"},{"currency":"INR","entity_type":"company","purpose_code":"insurance_claims","purpose_description":"Insurance
|
88
|
+
claims payment"},{"currency":"INR","entity_type":"company","purpose_code":"advertising","purpose_description":"Advertising
|
89
|
+
and public relations-related expenses"},{"currency":"INR","entity_type":"individual","purpose_code":"insurance_claims","purpose_description":"Insurance
|
90
|
+
claims payment"},{"currency":"INR","entity_type":"individual","purpose_code":"construction","purpose_description":"Construction
|
91
|
+
costs/expenses"},{"currency":"INR","entity_type":"company","purpose_code":"other_fees","purpose_description":"Broker,
|
92
|
+
front end, commitment, guarantee and custodian fees"},{"currency":"INR","entity_type":"individual","purpose_code":"transfer","purpose_description":"Transfer
|
93
|
+
to own account"},{"currency":"INR","entity_type":"company","purpose_code":"family","purpose_description":"Family
|
94
|
+
maintenance"},{"currency":"INR","entity_type":"individual","purpose_code":"advertising","purpose_description":"Advertising
|
95
|
+
and public relations-related expenses"},{"currency":"INR","entity_type":"company","purpose_code":"business_insurance","purpose_description":"Product
|
96
|
+
indemnity insurance"},{"currency":"INR","entity_type":"individual","purpose_code":"property_purchase","purpose_description":"Purchase
|
97
|
+
of residential property"},{"currency":"INR","entity_type":"individual","purpose_code":"exports","purpose_description":"Payments
|
98
|
+
for exported goods"},{"currency":"INR","entity_type":"company","purpose_code":"goods","purpose_description":"Trade
|
99
|
+
settlement for goods and general goods trades"},{"currency":"INR","entity_type":"company","purpose_code":"advisor_fees","purpose_description":"Fees
|
100
|
+
for advisory, technical, academic or specialist asssitance"},{"currency":"INR","entity_type":"individual","purpose_code":"insurance_premium","purpose_description":"Insurance
|
101
|
+
premium"},{"currency":"INR","entity_type":"individual","purpose_code":"donations","purpose_description":"Donations
|
102
|
+
and charitable donations"},{"currency":"INR","entity_type":"individual","purpose_code":"share_investment","purpose_description":"Investment
|
103
|
+
in shares"},{"currency":"INR","entity_type":"individual","purpose_code":"hotel","purpose_description":"Hotel
|
104
|
+
accommodation"},{"currency":"INR","entity_type":"company","purpose_code":"insurance_premium","purpose_description":"Insurance
|
105
|
+
premium"},{"currency":"INR","entity_type":"company","purpose_code":"share_investment","purpose_description":"Investment
|
106
|
+
in shares"},{"currency":"INR","entity_type":"individual","purpose_code":"other_fees","purpose_description":"Broker,
|
107
|
+
front end, commitment, guarantee and custodian fees"},{"currency":"INR","entity_type":"company","purpose_code":"education","purpose_description":"Education-related
|
108
|
+
student expenses"},{"currency":"INR","entity_type":"individual","purpose_code":"utilities","purpose_description":"Utility
|
109
|
+
bills"},{"currency":"INR","entity_type":"company","purpose_code":"transportation","purpose_description":"Transportation
|
110
|
+
fees for goods"},{"currency":"INR","entity_type":"individual","purpose_code":"property_rental","purpose_description":"Property
|
111
|
+
rental payment"},{"currency":"INR","entity_type":"company","purpose_code":"delivery","purpose_description":"Delivery
|
112
|
+
fees for goods"},{"currency":"INR","entity_type":"individual","purpose_code":"family","purpose_description":"Family
|
113
|
+
maintenance"},{"currency":"INR","entity_type":"individual","purpose_code":"tax","purpose_description":"Tax
|
114
|
+
payment"},{"currency":"INR","entity_type":"company","purpose_code":"medical","purpose_description":"Medical
|
115
|
+
treatment and expenses"},{"currency":"INR","entity_type":"individual","purpose_code":"transportation","purpose_description":"Transportation
|
116
|
+
fees for goods"},{"currency":"INR","entity_type":"company","purpose_code":"property_rental","purpose_description":"Property
|
117
|
+
rental payment"},{"currency":"INR","entity_type":"individual","purpose_code":"fund_investment","purpose_description":"Mutual
|
118
|
+
fund investment"},{"currency":"INR","entity_type":"company","purpose_code":"utilities","purpose_description":"Utility
|
119
|
+
bills"},{"currency":"INR","entity_type":"company","purpose_code":"fund_investment","purpose_description":"Mutual
|
120
|
+
fund investment"},{"currency":"INR","entity_type":"individual","purpose_code":"business_insurance","purpose_description":"Product
|
121
|
+
indemnity insurance"},{"currency":"INR","entity_type":"company","purpose_code":"hotel","purpose_description":"Hotel
|
122
|
+
accommodation"},{"currency":"INR","entity_type":"individual","purpose_code":"royalties","purpose_description":"Royalty,
|
123
|
+
trademark, patent and copyright fees"},{"currency":"INR","entity_type":"company","purpose_code":"tax","purpose_description":"Tax
|
124
|
+
payment"},{"currency":"INR","entity_type":"company","purpose_code":"donations","purpose_description":"Donations
|
125
|
+
and charitable donations"}]}'
|
126
|
+
http_version:
|
127
|
+
recorded_at: Mon, 16 Jul 2018 08:21:41 GMT
|
128
|
+
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:28 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=MqWBkqqalRVyiA3SLwg2ZVfI/RPODFvZdiAHgnaqMNO/G7f/N4HAMYUgO0uNNkTiWQTB7fD0YvxVJpXyTOPVjFmo6sepvoxxXa+d5zt4H1I4//LWQ8lfZI9cLvfz; Expires=Mon, 23 Jul 2018 08:20:26 GMT; Path=/
|
27
|
+
- __cfduid=d2c4fe40f90dd210cb5c74e07fa431acf1531729226; expires=Tue, 16-Jul-19 08:20:26 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
28
|
+
Access-Control-Allow-Origin:
|
29
|
+
- "*"
|
30
|
+
X-Request-Id:
|
31
|
+
- bd4d44e6-76ce-4ff5-82c8-1120c693c5dc
|
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
|
+
- 43b30cb3deb60a66-LHR
|
46
|
+
body:
|
47
|
+
encoding: US-ASCII
|
48
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Mon, 16 Jul 2018 08:20:28 GMT
|
3
51
|
- request:
|
4
52
|
method: get
|
5
53
|
uri: https://devapi.currencycloud.com/v2/reference/settlement_accounts?currency=GBP
|
@@ -8,32 +56,49 @@ 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:29 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=hMVXh0wCWtJ9Tw9Qm/QHOzSiknz4ftqOJdn7LUgywEoFn0LhnYcepsb7xoKMCbe7J7CaCP2T9Su05ot6DWayawXCvEFHlRdqkwhN+z5e7F3GC/HjlsQX81ORS5qB; Expires=Mon, 23 Jul 2018 08:20:28 GMT; Path=/
|
77
|
+
- __cfduid=d2d849517c981c03f7f073bc3c0fea4a31531729228; expires=Tue, 16-Jul-19 08:20:28 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
78
|
+
Access-Control-Allow-Origin:
|
79
|
+
- "*"
|
27
80
|
X-Request-Id:
|
28
|
-
-
|
81
|
+
- 299af103-bd38-4cc8-886a-60f8b1ba7ac3
|
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
|
+
- 43b30cbf2d6f0a72-LHR
|
31
96
|
body:
|
32
|
-
encoding:
|
97
|
+
encoding: US-ASCII
|
33
98
|
string: '{"settlement_accounts":[{"bank_account_holder_name":"The Currency Cloud
|
34
99
|
GBP - Client Seg A/C","beneficiary_address":"","beneficiary_country":"","bank_name":"Barclays
|
35
100
|
Bank plc","bank_address":[],"bank_country":"","currency":"GBP","bic_swift":"BARCGB22","iban":"GB06
|
36
101
|
BARC 2006 0513 0714 72","account_number":"13071472","routing_code_type_1":"sort_code","routing_code_value_1":"200605","routing_code_type_2":"","routing_code_value_2":""}]}'
|
37
|
-
http_version:
|
38
|
-
recorded_at:
|
39
|
-
recorded_with: VCR
|
102
|
+
http_version:
|
103
|
+
recorded_at: Mon, 16 Jul 2018 08:20:29 GMT
|
104
|
+
recorded_with: VCR 4.0.0
|
@@ -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:45 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=Zh+t/oSWavtYb7qJamC/2EHIzmUymRr6x/0IWy+j2l9FHJldhSpfDz3aCksiYUQMmwM+jdQJZYeudrnPk/zoSjWS6enr0eQ5A6kL56MefO9/vWf3OGB4RvvcdtIP;
|
27
|
+
Expires=Mon, 23 Jul 2018 10:54:44 GMT; Path=/
|
28
|
+
- __cfduid=dd7a74226221a50b10a53281124c436681531738484; expires=Tue, 16-Jul-19
|
29
|
+
10:54:44 GMT; path=/; domain=.currencycloud.com; HttpOnly
|
30
|
+
Access-Control-Allow-Origin:
|
31
|
+
- "*"
|
32
|
+
X-Request-Id:
|
33
|
+
- 12f15e80-b4e5-4a6a-a2a5-fabd31791a25
|
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
|
+
- 43b3eeb6f88106be-LHR
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"auth_token":"deadbeefdeadbeefdeadbeefdeadbeef"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 16 Jul 2018 10:54:45 GMT
|
3
53
|
- request:
|
4
54
|
method: post
|
5
55
|
uri: https://devapi.currencycloud.com/v2/conversions/create
|
@@ -8,7 +58,7 @@ http_interactions:
|
|
8
58
|
string: buy_currency=GBP&sell_currency=USD&fixed_side=buy&amount=1000&reason=mortgage%20payment&term_agreement=true
|
9
59
|
headers:
|
10
60
|
X-Auth-Token:
|
11
|
-
-
|
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":"24d2ee7f-c7a3-4181-979e-9c58dbace992","settlement_date":"2015-05-06T14:00:00+00:00","conversion_date":"2015-05-06T00:00:00+00:00","short_reference":"20150504-PGRNVJ","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","account_id":"8ec3a69b-02d1-4f09-9a6b-6bd54a61b3a8","currency_pair":"GBPUSD","status":"awaiting_funds","buy_currency":"GBP","sell_currency":"USD","client_buy_amount":"1000.00","client_sell_amount":"1511.70","fixed_side":"buy","mid_market_rate":"1.5118","core_rate":"1.5117","partner_rate":"","partner_status":"funds_arrived","partner_buy_amount":"0.00","partner_sell_amount":"0.00","client_rate":"1.5117","deposit_required":false,"deposit_amount":"0.00","deposit_currency":"","deposit_status":"not_required","deposit_required_at":"","payment_ids":[],"created_at":"2015-05-04T20:28:29+00:00","updated_at":"2015-05-04T20:28:29+00:00"}'
|
34
|
-
http_version:
|
84
|
+
http_version:
|
35
85
|
recorded_at: Mon, 04 May 2015 20:28:29 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
|
-
-
|
94
|
+
- deadbeefdeadbeefdeadbeefdeadbeef
|
45
95
|
response:
|
46
96
|
status:
|
47
97
|
code: 200
|
@@ -64,7 +114,7 @@ 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:29:16+00:00","released_at":""}'
|
67
|
-
http_version:
|
117
|
+
http_version:
|
68
118
|
recorded_at: Mon, 04 May 2015 20:29:16 GMT
|
69
119
|
- request:
|
70
120
|
method: post
|
@@ -97,6 +147,6 @@ http_interactions:
|
|
97
147
|
body:
|
98
148
|
encoding: UTF-8
|
99
149
|
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":""}'
|
100
|
-
http_version:
|
150
|
+
http_version:
|
101
151
|
recorded_at: Mon, 04 May 2015 20:40:57 GMT
|
102
|
-
recorded_with: VCR
|
152
|
+
recorded_with: VCR 3.0.3
|