currency_cloud 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +12 -0
  6. data/Gemfile +7 -0
  7. data/Gemfile.lock +99 -0
  8. data/Guardfile +14 -0
  9. data/LICENSE.md +22 -0
  10. data/README.md +10 -0
  11. data/Rakefile +30 -0
  12. data/currency_cloud.gemspec +27 -0
  13. data/examples/server.rb +15 -0
  14. data/lib/currency_cloud.rb +26 -0
  15. data/lib/currency_cloud/actions/create.rb +9 -0
  16. data/lib/currency_cloud/actions/current.rb +9 -0
  17. data/lib/currency_cloud/actions/delete.rb +15 -0
  18. data/lib/currency_cloud/actions/find.rb +27 -0
  19. data/lib/currency_cloud/actions/retrieve.rb +9 -0
  20. data/lib/currency_cloud/actions/update.rb +12 -0
  21. data/lib/currency_cloud/errors/api_error.rb +38 -0
  22. data/lib/currency_cloud/errors/config_error.rb +5 -0
  23. data/lib/currency_cloud/errors/unexpected_error.rb +10 -0
  24. data/lib/currency_cloud/pagination.rb +7 -0
  25. data/lib/currency_cloud/request_handler.rb +68 -0
  26. data/lib/currency_cloud/resource.rb +73 -0
  27. data/lib/currency_cloud/resourceful_collection.rb +15 -0
  28. data/lib/currency_cloud/resources/account.rb +6 -0
  29. data/lib/currency_cloud/resources/balance.rb +8 -0
  30. data/lib/currency_cloud/resources/beneficiary.rb +14 -0
  31. data/lib/currency_cloud/resources/contact.rb +6 -0
  32. data/lib/currency_cloud/resources/conversion.rb +10 -0
  33. data/lib/currency_cloud/resources/payer.rb +6 -0
  34. data/lib/currency_cloud/resources/payment.rb +11 -0
  35. data/lib/currency_cloud/resources/rate.rb +21 -0
  36. data/lib/currency_cloud/resources/reference.rb +29 -0
  37. data/lib/currency_cloud/resources/settlement.rb +30 -0
  38. data/lib/currency_cloud/resources/transaction.rb +7 -0
  39. data/lib/currency_cloud/response_handler.rb +46 -0
  40. data/lib/currency_cloud/session.rb +62 -0
  41. data/lib/currency_cloud/version.rb +8 -0
  42. data/spec/currency_cloud_spec.rb +78 -0
  43. data/spec/integration/actions_spec.rb +101 -0
  44. data/spec/integration/authentication_spec.rb +37 -0
  45. data/spec/integration/errors_spec.rb +157 -0
  46. data/spec/integration/rates_spec.rb +39 -0
  47. data/spec/integration/reference_spec.rb +57 -0
  48. data/spec/spec_helper.rb +11 -0
  49. data/spec/support/vcr_cassettes/Actions/can_create.yml +38 -0
  50. data/spec/support/vcr_cassettes/Actions/can_current.yml +37 -0
  51. data/spec/support/vcr_cassettes/Actions/can_delete.yml +39 -0
  52. data/spec/support/vcr_cassettes/Actions/can_find.yml +38 -0
  53. data/spec/support/vcr_cassettes/Actions/can_first.yml +75 -0
  54. data/spec/support/vcr_cassettes/Actions/can_retrieve.yml +38 -0
  55. data/spec/support/vcr_cassettes/Actions/can_update.yml +39 -0
  56. data/spec/support/vcr_cassettes/Authentication/can_be_closed.yml +67 -0
  57. data/spec/support/vcr_cassettes/Authentication/can_use_just_a_token.yml +36 -0
  58. data/spec/support/vcr_cassettes/Authentication/handles_session_timeout_error.yml +101 -0
  59. data/spec/support/vcr_cassettes/Authentication/happens_lazily.yml +34 -0
  60. data/spec/support/vcr_cassettes/Error/is_raised_on_a_bad_request.yml +39 -0
  61. data/spec/support/vcr_cassettes/Error/is_raised_on_a_forbidden_request.yml +35 -0
  62. data/spec/support/vcr_cassettes/Error/is_raised_on_an_internal_server_error.yml +69 -0
  63. data/spec/support/vcr_cassettes/Error/is_raised_on_incorrect_authentication_details.yml +39 -0
  64. data/spec/support/vcr_cassettes/Error/is_raised_when_a_resource_is_not_found.yml +37 -0
  65. data/spec/support/vcr_cassettes/Error/is_raised_when_too_many_requests_have_been_issued.yml +34 -0
  66. data/spec/support/vcr_cassettes/Rates/can_find.yml +36 -0
  67. data/spec/support/vcr_cassettes/Rates/can_provided_detailed_rate.yml +36 -0
  68. data/spec/support/vcr_cassettes/Reference/can_retrieve_beneficiary_required_details.yml +36 -0
  69. data/spec/support/vcr_cassettes/Reference/can_retrieve_conversion_dates.yml +46 -0
  70. data/spec/support/vcr_cassettes/Reference/can_retrieve_currencies.yml +47 -0
  71. data/spec/support/vcr_cassettes/Reference/can_retrieve_settlement_accounts.yml +39 -0
  72. metadata +230 -0
@@ -0,0 +1,11 @@
1
+ require 'currency_cloud'
2
+ require 'pry'
3
+ require 'vcr'
4
+
5
+ VCR.configure do |c|
6
+ c.hook_into :webmock
7
+ c.cassette_library_dir = 'spec/support/vcr_cassettes'
8
+ c.configure_rspec_metadata!
9
+ c.allow_http_connections_when_no_cassette = true
10
+ c.default_cassette_options = {:record => :new_episodes}
11
+ end
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/create
6
+ body:
7
+ encoding: UTF-8
8
+ string: bank_account_holder_name=Test%20User&bank_country=GB&currency=GBP&name=Test%20User&account_number=12345678&routing_code_type_1=sort_code&routing_code_value_1=123456&payment_types[]=regular
9
+ headers:
10
+ X-Auth-Token:
11
+ - e5070d4a16c5ffe4ed9fb268a2a716be
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 09:21:00 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1019'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771948673934289802'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test User","name":"Test User","email":null,"payment_types":["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":"HSBC
34
+ BANK PLC","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":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
35
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T09:21:00+00:00"}'
36
+ http_version:
37
+ recorded_at: Sat, 25 Apr 2015 09:21:00 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,37 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/accounts/current
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - cfa3eace5c2b61ceccb4169584d09cfb
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Mon, 27 Apr 2015 21:52:17 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '459'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2773776363343519430'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"id":"8ec3a69b-02d1-4f09-9a6b-6bd54a61b3a8","account_name":"Currency
34
+ Cloud","brand":"thecurrencycloud","your_reference":null,"status":"enabled","street":null,"city":null,"state_or_province":null,"country":null,"postal_code":null,"spread_table":"fxcg_rfx_default","legal_entity_type":null,"created_at":"2015-04-24T15:57:55+00:00","updated_at":"2015-04-24T15:57:55+00:00","identification_type":null,"identification_value":null,"short_reference":"150424-00002"}'
35
+ http_version:
36
+ recorded_at: Mon, 27 Apr 2015 21:52:17 GMT
37
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/081596c9-02de-483e-9f2a-4cf55dcdf98c/delete
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - 4df5b3e5882a412f148dcd08fa4e5b73
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 11:06:27 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1021'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2772001754621411030'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test
34
+ User 2","name":"Test+User","email":null,"payment_types":["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":"HSBC
35
+ BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"41854372","routing_code_type_1":"sort_code","routing_code_value_1":"400730","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
36
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T11:06:27+00:00"}'
37
+ http_version:
38
+ recorded_at: Sat, 25 Apr 2015 11:06:27 GMT
39
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - e5070d4a16c5ffe4ed9fb268a2a716be
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 09:24:25 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1197'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771950395117221003'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"beneficiaries":[{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test+User","name":"Test+User","email":null,"payment_types":["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":"HSBC
34
+ BANK PLC","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":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
35
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T09:21:00+00:00"}],"pagination":{"total_entries":1,"total_pages":1,"current_page":1,"per_page":25,"previous_page":-1,"next_page":-1,"order":"created_at","order_asc_desc":"asc"}}'
36
+ http_version:
37
+ recorded_at: Sat, 25 Apr 2015 09:24:25 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find?bank_account_holder_name=Test%20User&per_page=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - e5070d4a16c5ffe4ed9fb268a2a716be
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 09:59:57 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1196'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771968283362454302'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"beneficiaries":[{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test
34
+ User","name":"Test User","email":null,"payment_types":["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":"HSBC
35
+ BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"41854372","routing_code_type_1":"sort_code","routing_code_value_1":"400730","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
36
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T09:21:00+00:00"}],"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"}}'
37
+ http_version:
38
+ recorded_at: Sat, 25 Apr 2015 09:59:57 GMT
39
+ - request:
40
+ method: get
41
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find
42
+ body:
43
+ encoding: UTF-8
44
+ string: bank_account_holder_name=Test%20User&per_page=1
45
+ headers:
46
+ X-Auth-Token:
47
+ - 4df5b3e5882a412f148dcd08fa4e5b73
48
+ response:
49
+ status:
50
+ code: 200
51
+ message: OK
52
+ headers:
53
+ Server:
54
+ - nginx
55
+ Date:
56
+ - Sat, 25 Apr 2015 11:00:42 GMT
57
+ Content-Type:
58
+ - application/json;charset=utf-8
59
+ Content-Length:
60
+ - '1196'
61
+ Connection:
62
+ - keep-alive
63
+ X-Request-Id:
64
+ - '2771998857632350489'
65
+ X-Content-Type-Options:
66
+ - nosniff
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"beneficiaries":[{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test
70
+ User","name":"Test+User","email":null,"payment_types":["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":"HSBC
71
+ BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"41854372","routing_code_type_1":"sort_code","routing_code_value_1":"400730","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
72
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T10:58:21+00:00"}],"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"}}'
73
+ http_version:
74
+ recorded_at: Sat, 25 Apr 2015 11:00:42 GMT
75
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/081596c9-02de-483e-9f2a-4cf55dcdf98c
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - e5070d4a16c5ffe4ed9fb268a2a716be
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 10:01:53 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1019'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771969252582224823'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test User","name":"Test User","email":null,"payment_types":["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":"HSBC
34
+ BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"41854372","routing_code_type_1":"sort_code","routing_code_value_1":"400730","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
35
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T09:21:00+00:00"}'
36
+ http_version:
37
+ recorded_at: Sat, 25 Apr 2015 10:01:53 GMT
38
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/081596c9-02de-483e-9f2a-4cf55dcdf98c
6
+ body:
7
+ encoding: UTF-8
8
+ string: bank_account_holder_name=Test%20User%202
9
+ headers:
10
+ X-Auth-Token:
11
+ - 4df5b3e5882a412f148dcd08fa4e5b73
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 11:01:36 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '1021'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771999306691376475'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"id":"081596c9-02de-483e-9f2a-4cf55dcdf98c","bank_account_holder_name":"Test
34
+ User 2","name":"Test+User","email":null,"payment_types":["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":"HSBC
35
+ BANK PLC","bank_account_type":null,"currency":"GBP","account_number":"41854372","routing_code_type_1":"sort_code","routing_code_value_1":"400730","routing_code_type_2":null,"routing_code_value_2":null,"bic_swift":null,"iban":null,"default_beneficiary":"false","creator_contact_id":"c4d838e8-1625-44c6-a9fb-39bcb1fe353d","bank_address":["5
36
+ Wimbledon Hill Rd","Wimbledon","London"],"created_at":"2015-04-25T09:21:00+00:00","updated_at":"2015-04-25T11:01:36+00:00"}'
37
+ http_version:
38
+ recorded_at: Sat, 25 Apr 2015 11:01:36 GMT
39
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://devapi.thecurrencycloud.com/v2/authenticate/api
6
+ body:
7
+ encoding: UTF-8
8
+ string: login_id=rjnienaber%40gmail.com&api_key=ef0fd50fca1fb14c1fab3a8436b9ecb65f02f129fd87eafa45ded8ae257528f0
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - nginx
17
+ Date:
18
+ - Fri, 24 Apr 2015 22:17:33 GMT
19
+ Content-Type:
20
+ - application/json;charset=utf-8
21
+ Content-Length:
22
+ - '49'
23
+ Connection:
24
+ - keep-alive
25
+ X-Request-Id:
26
+ - '2771614754789653555'
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ body:
30
+ encoding: UTF-8
31
+ string: '{"auth_token":"2ec8a86c8cf6e0378a20ca6793f3260c"}'
32
+ http_version:
33
+ recorded_at: Fri, 24 Apr 2015 22:17:33 GMT
34
+ - request:
35
+ method: post
36
+ uri: https://devapi.thecurrencycloud.com/v2/authenticate/close_session
37
+ body:
38
+ encoding: UTF-8
39
+ string: ''
40
+ headers:
41
+ X-Auth-Token:
42
+ - 2ec8a86c8cf6e0378a20ca6793f3260c
43
+ response:
44
+ status:
45
+ code: 200
46
+ message: OK
47
+ headers:
48
+ Server:
49
+ - nginx
50
+ Date:
51
+ - Fri, 24 Apr 2015 22:33:15 GMT
52
+ Content-Type:
53
+ - application/json;charset=utf-8
54
+ Content-Length:
55
+ - '2'
56
+ Connection:
57
+ - keep-alive
58
+ X-Request-Id:
59
+ - '2771622659047755249'
60
+ X-Content-Type-Options:
61
+ - nosniff
62
+ body:
63
+ encoding: UTF-8
64
+ string: "{}"
65
+ http_version:
66
+ recorded_at: Fri, 24 Apr 2015 22:33:15 GMT
67
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,36 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - 7fbba909f66ee6721b2e20a5fa1ccae7
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Fri, 24 Apr 2015 21:23:27 GMT
21
+ Content-Type:
22
+ - application/json;charset=utf-8
23
+ Content-Length:
24
+ - '178'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771587521509285306'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"beneficiaries":[],"pagination":{"total_entries":0,"total_pages":1,"current_page":1,"per_page":25,"previous_page":-1,"next_page":-1,"order":"created_at","order_asc_desc":"asc"}}'
34
+ http_version:
35
+ recorded_at: Fri, 24 Apr 2015 21:23:27 GMT
36
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,101 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Auth-Token:
11
+ - 3068d3ff160ab0636648d98b4e4e10ad
12
+ response:
13
+ status:
14
+ code: 401
15
+ message: Unauthorized
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Sat, 25 Apr 2015 06:32:32 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '176'
25
+ Connection:
26
+ - keep-alive
27
+ X-Request-Id:
28
+ - '2771863887815376172'
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"error_code":"auth_failed","error_messages":{"username":[{"code":"invalid_supplied_credentials","message":"Authentication
34
+ failed with the supplied credentials","params":{}}]}}'
35
+ http_version:
36
+ recorded_at: Sat, 25 Apr 2015 06:32:32 GMT
37
+ - request:
38
+ method: post
39
+ uri: https://devapi.thecurrencycloud.com/v2/authenticate/api
40
+ body:
41
+ encoding: UTF-8
42
+ string: login_id=rjnienaber%40gmail.com&api_key=ef0fd50fca1fb14c1fab3a8436b9ecb65f02f129fd87eafa45ded8ae257528f0
43
+ headers: {}
44
+ response:
45
+ status:
46
+ code: 200
47
+ message: OK
48
+ headers:
49
+ Server:
50
+ - nginx
51
+ Date:
52
+ - Sat, 25 Apr 2015 06:32:32 GMT
53
+ Content-Type:
54
+ - application/json;charset=utf-8
55
+ Content-Length:
56
+ - '49'
57
+ Connection:
58
+ - keep-alive
59
+ X-Request-Id:
60
+ - '2771863889560205613'
61
+ X-Content-Type-Options:
62
+ - nosniff
63
+ body:
64
+ encoding: UTF-8
65
+ string: '{"auth_token":"038022bcd2f372cac7bab448db7b5c3b"}'
66
+ http_version:
67
+ recorded_at: Sat, 25 Apr 2015 06:32:32 GMT
68
+ - request:
69
+ method: get
70
+ uri: https://devapi.thecurrencycloud.com/v2/beneficiaries/find
71
+ body:
72
+ encoding: US-ASCII
73
+ string: ''
74
+ headers:
75
+ X-Auth-Token:
76
+ - 038022bcd2f372cac7bab448db7b5c3b
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: OK
81
+ headers:
82
+ Server:
83
+ - nginx
84
+ Date:
85
+ - Sat, 25 Apr 2015 06:32:33 GMT
86
+ Content-Type:
87
+ - application/json;charset=utf-8
88
+ Content-Length:
89
+ - '178'
90
+ Connection:
91
+ - keep-alive
92
+ X-Request-Id:
93
+ - '2771863892278054191'
94
+ X-Content-Type-Options:
95
+ - nosniff
96
+ body:
97
+ encoding: UTF-8
98
+ string: '{"beneficiaries":[],"pagination":{"total_entries":0,"total_pages":1,"current_page":1,"per_page":25,"previous_page":-1,"next_page":-1,"order":"created_at","order_asc_desc":"asc"}}'
99
+ http_version:
100
+ recorded_at: Sat, 25 Apr 2015 06:32:33 GMT
101
+ recorded_with: VCR 2.9.3