espago 0.0.9 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -0
  3. data/Gemfile.lock +14 -1
  4. data/Guardfile +1 -0
  5. data/README.md +118 -6
  6. data/espago.gemspec +6 -1
  7. data/lib/espago.rb +4 -3
  8. data/lib/espago/api_connection.rb +16 -7
  9. data/lib/espago/api_connection/{post_clients.rb → api.rb} +1 -5
  10. data/lib/espago/api_connection/api_delete.rb +9 -0
  11. data/lib/espago/api_connection/api_get.rb +13 -0
  12. data/lib/espago/api_connection/api_post.rb +9 -0
  13. data/lib/espago/api_connection/api_put.rb +9 -0
  14. data/lib/espago/api_connection/charges_complete_post.rb +9 -0
  15. data/lib/espago/api_connection/charges_delete.rb +9 -0
  16. data/lib/espago/api_connection/charges_get.rb +9 -0
  17. data/lib/espago/api_connection/charges_post.rb +9 -0
  18. data/lib/espago/api_connection/{post_charges_refund.rb → charges_refund_post.rb} +1 -5
  19. data/lib/espago/api_connection/clients_authorize_post.rb +9 -0
  20. data/lib/espago/api_connection/clients_delete.rb +9 -0
  21. data/lib/espago/api_connection/clients_get.rb +9 -0
  22. data/lib/espago/api_connection/clients_invoices_get.rb +9 -0
  23. data/lib/espago/api_connection/clients_post.rb +9 -0
  24. data/lib/espago/api_connection/clients_put.rb +9 -0
  25. data/lib/espago/api_connection/clients_subscriptions_get.rb +9 -0
  26. data/lib/espago/api_connection/complete_post.rb +14 -0
  27. data/lib/espago/api_connection/invoice_items_delete.rb +9 -0
  28. data/lib/espago/api_connection/invoice_items_get.rb +9 -0
  29. data/lib/espago/api_connection/invoice_items_post.rb +9 -0
  30. data/lib/espago/api_connection/invoices_get.rb +9 -0
  31. data/lib/espago/api_connection/line_items_get.rb +9 -0
  32. data/lib/espago/api_connection/plans_delete.rb +9 -0
  33. data/lib/espago/api_connection/plans_get.rb +9 -0
  34. data/lib/espago/api_connection/plans_post.rb +9 -0
  35. data/lib/espago/api_connection/plans_put.rb +9 -0
  36. data/lib/espago/api_connection/subscriptions_delete.rb +9 -0
  37. data/lib/espago/api_connection/subscriptions_get.rb +9 -0
  38. data/lib/espago/api_connection/subscriptions_post.rb +9 -0
  39. data/lib/espago/api_connection/tokens_get.rb +9 -0
  40. data/lib/espago/api_connection/{post_tokens.rb → tokens_post.rb} +2 -2
  41. data/lib/espago/back_request.rb +33 -0
  42. data/lib/espago/client.rb +12 -3
  43. data/lib/espago/router.rb +1 -1
  44. data/lib/espago/version.rb +1 -1
  45. data/spec/espago/api_connection_spec.rb +4 -3
  46. data/spec/espago/back_request_spec.rb +33 -0
  47. data/spec/espago/client_spec.rb +3 -2
  48. data/spec/espago/router_spec.rb +2 -2
  49. data/spec/features/apis_spec.rb +21 -0
  50. data/spec/features/charges_spec.rb +79 -0
  51. data/spec/features/clients_spec.rb +100 -0
  52. data/spec/features/error_spec.rb +28 -0
  53. data/spec/features/invoice_items_spec.rb +37 -0
  54. data/spec/features/invoices_spec.rb +24 -0
  55. data/spec/features/line_items_spec.rb +17 -0
  56. data/spec/features/plans_spec.rb +61 -0
  57. data/spec/features/subscriptions_spec.rb +43 -0
  58. data/spec/features/tokens_spec.rb +40 -0
  59. data/spec/fixtures/cassettes/api_2.yml +68 -0
  60. data/spec/fixtures/cassettes/api_3.yml +68 -0
  61. data/spec/fixtures/cassettes/charges_complete.yml +48 -0
  62. data/spec/fixtures/cassettes/charges_complete_deprecation.yml +48 -0
  63. data/spec/fixtures/cassettes/charges_destroy.yml +46 -0
  64. data/spec/fixtures/cassettes/charges_get.yml +67 -0
  65. data/spec/fixtures/cassettes/charges_get_pay_mTOngouLTJWZ0w.yml +46 -0
  66. data/spec/fixtures/cassettes/charges_post.yml +48 -0
  67. data/spec/fixtures/cassettes/charges_refund.yml +48 -0
  68. data/spec/fixtures/cassettes/clients_authorize.yml +48 -0
  69. data/spec/fixtures/cassettes/clients_delete.yml +42 -0
  70. data/spec/fixtures/cassettes/clients_get.yml +46 -0
  71. data/spec/fixtures/cassettes/clients_get_cli_w0Se2smYwyQ0Uw.yml +46 -0
  72. data/spec/fixtures/cassettes/clients_invoices.yml +46 -0
  73. data/spec/fixtures/cassettes/clients_post.yml +48 -0
  74. data/spec/fixtures/cassettes/clients_put.yml +48 -0
  75. data/spec/fixtures/cassettes/clients_subscriptions.yml +46 -0
  76. data/spec/fixtures/cassettes/error_400.yml +46 -0
  77. data/spec/fixtures/cassettes/error_401.yml +46 -0
  78. data/spec/fixtures/cassettes/error_500.yml +46 -0
  79. data/spec/fixtures/cassettes/invoice_items_delete_ii_WDzszvhTshe78Xd.yml +42 -0
  80. data/spec/fixtures/cassettes/invoice_items_get_ii_5LS-YR7S1QaJBl3.yml +47 -0
  81. data/spec/fixtures/cassettes/invoice_items_post_ii_5LS-YR7S1QaJBl3.yml +49 -0
  82. data/spec/fixtures/cassettes/invoices_get.yml +46 -0
  83. data/spec/fixtures/cassettes/invoices_get_in_tUCMhwlg2nkvAaL.yml +46 -0
  84. data/spec/fixtures/cassettes/line_items_get.yml +47 -0
  85. data/spec/fixtures/cassettes/plans_delete.yml +42 -0
  86. data/spec/fixtures/cassettes/plans_get.yml +46 -0
  87. data/spec/fixtures/cassettes/plans_get_pl_12345.yml +46 -0
  88. data/spec/fixtures/cassettes/plans_post.yml +48 -0
  89. data/spec/fixtures/cassettes/plans_put.yml +44 -0
  90. data/spec/fixtures/cassettes/subscriptions_delete_sub_8yYuCBKdywr7e2.yml +42 -0
  91. data/spec/fixtures/cassettes/subscriptions_get.yml +46 -0
  92. data/spec/fixtures/cassettes/subscriptions_get_sub_8yYuCBKdywr7e2.yml +46 -0
  93. data/spec/fixtures/cassettes/subscriptions_post.yml +48 -0
  94. data/spec/fixtures/cassettes/tokens_get.yml +46 -0
  95. data/spec/fixtures/cassettes/tokens_post.yml +54 -0
  96. data/spec/spec_helper.rb +30 -0
  97. metadata +197 -37
  98. data/lib/espago/api_connection/delete_charges.rb +0 -13
  99. data/lib/espago/api_connection/delete_clients.rb +0 -13
  100. data/lib/espago/api_connection/get_charges.rb +0 -17
  101. data/lib/espago/api_connection/get_clients.rb +0 -17
  102. data/lib/espago/api_connection/get_tokens.rb +0 -13
  103. data/lib/espago/api_connection/post_charges.rb +0 -13
  104. data/lib/espago/api_connection/post_clients_authorize.rb +0 -13
  105. data/lib/espago/api_connection/post_complete.rb +0 -13
  106. data/lib/espago/api_connection/put_clients.rb +0 -13
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v3+json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Meta-Request-Version:
24
+ - 0.2.2
25
+ X-Ua-Compatible:
26
+ - IE=Edge
27
+ Etag:
28
+ - '"36ab75a48cfe4bce4bd0ff6d680a374e"'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Set-Cookie:
32
+ - _session_id=55c42574ca0428ac9b796264b6d57860; path=/; HttpOnly
33
+ X-Request-Id:
34
+ - 51e85e43daed7f402ca0923e440bad80
35
+ X-Runtime:
36
+ - '1.454548'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"count":596,"charges":[{"id":"pay_uxILF7D-heZaT2","description":"Golden
44
+ plan 2014-11-26","channel":"elavon","amount":"123.45","currency":"pln","state":"executed","client":"cli_90Pi6Jf0ndl_PP","created_at":1417030497,"card":{"company":"VI","last4":"4242","year":2019,"month":3,"first_name":"Jan","last_name":"Kowalski","authorized":null,"created_at":1416842254},"issuer_response_code":"00","reversable":true,"invoice":"in_tUCMhwlg2nkvAaL","subscription":"sub_8yYuCBKdywr7e2","transaction_id":"tn_mQKcgfsNw"},{"id":"pay_Wmu3hmXJIG4jsg","description":"Opis
45
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"executed","client":"cli_PQI_mlA6DXe1nP","created_at":1417009684,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_0pydA_RVa"},{"id":"pay_JEWqRdltANdqzH","description":"Opis
46
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"preauthorized","client":"cli_0Z-QNfJjl0R7J3","created_at":1417008454,"issuer_response_code":"00","completed":false,"reversable":true,"transaction_id":"tn_2WMKrXcW-"},{"id":"pay_kQmS_3RTfm4eix","description":"Opis
47
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"reversed","client":"cli_5rDoJyvKDM4RbM","created_at":1417005334,"issuer_response_code":"00","transaction_id":"tn_tAxxrivny"},{"id":"pay_b1Y2ZuJNXXRDM5","description":"Opis
48
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"reversed","client":"cli_VTsnOHjUohL02K","created_at":1416920783,"issuer_response_code":"00","transaction_id":"tn_mhAlwzK0x"},{"id":"pay_ftMx2WoXveVOdF","description":"Opis
49
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"reversed","client":"cli_84RAbl__uG21sV","created_at":1416920765,"issuer_response_code":"00","transaction_id":"tn_feetNVaqb"},{"id":"pay_mTOngouLTJWZ0w","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"executed","client":"cli_YM5tKz6-IfhN7T","created_at":1416917311,"issuer_response_code":"00","transaction_id":"tn_5puLXUWDf"},{"id":"pay_yBeZDDdvI9-xPs","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_As1e5K4jpHy5Aw","created_at":1416917203,"reject_reason":"card
50
+ expired","issuer_response_code":"54","transaction_id":"tn_sC6zyk_5F"},{"id":"pay_Mc4aIdi0mMTwqw","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_DYuoBap-1hJzBU","created_at":1416916959,"reject_reason":"card
51
+ expired","issuer_response_code":"54","transaction_id":"tn_a0UiElEVZ"},{"id":"pay_dNeWnyjbgh8mry","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_DAGc95pNHoYTup","created_at":1416916878,"reject_reason":"card
52
+ expired","issuer_response_code":"54","transaction_id":"tn_egEqc9QKG"},{"id":"pay_HxEZHsvAe_DKEf","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_7FXtokGKn71rBJ","created_at":1416916867,"reject_reason":"card
53
+ expired","issuer_response_code":"54","transaction_id":"tn_MfEarJeKF"},{"id":"pay_kabeiSF6rqkXhf","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_PRg_F5LPOzlaw0","created_at":1416916839,"reject_reason":"card
54
+ expired","issuer_response_code":"54","transaction_id":"tn_nDxoks8Nw"},{"id":"pay_AqipUAnHNnxk6e","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_Gq_WKAtb1sk-_H","created_at":1416916725,"reject_reason":"card
55
+ expired","issuer_response_code":"54","transaction_id":"tn_3Q5dbU_B_"},{"id":"pay_M_3aKKX3hEwdJR","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_ZAe6FMTGpAx2D1","created_at":1416916429,"reject_reason":"card
56
+ expired","issuer_response_code":"54","transaction_id":"tn_PyZneugYr"},{"id":"pay_sM6u2z1uvYuLtp","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_qRRYr2riz-IEqd","created_at":1416915972,"reject_reason":"card
57
+ expired","issuer_response_code":"54","transaction_id":"tn_RVWC2QZAL"},{"id":"pay_9dhQSFZ5ZoCTot","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_fxWPgeAkWOo1ZU","created_at":1416915851,"reject_reason":"card
58
+ expired","issuer_response_code":"54","transaction_id":"tn_uNcAmJQIP"},{"id":"pay_VhLoTUAI4SdKAQ","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_qaiHjuRdLKrDfy","created_at":1416915841,"reject_reason":"card
59
+ expired","issuer_response_code":"54","transaction_id":"tn_d7oo1A-83"},{"id":"pay_WtOOd39mtQ5U9A","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_9qUJ-X9sF-x8H4","created_at":1416915721,"reject_reason":"card
60
+ expired","issuer_response_code":"54","transaction_id":"tn_m-wM2cSAu"},{"id":"pay_NBdRkyjAUHCS4b","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_GO5IjkVbJJM8EP","created_at":1416915649,"reject_reason":"card
61
+ expired","issuer_response_code":"54","transaction_id":"tn_vHPyGDu76"},{"id":"pay_OA5PkgCKJXAfS4","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_Ays1Jh3WdgvwdF","created_at":1416915327,"reject_reason":"card
62
+ expired","issuer_response_code":"54","transaction_id":"tn_0E7kcajyW"},{"id":"pay_UJWQP-sGbC_7Wo","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_FqguquyelXPRme","created_at":1416915312,"reject_reason":"card
63
+ expired","issuer_response_code":"54","transaction_id":"tn_mFqUywuHv"},{"id":"pay_xfhHX_6-YRcCnp","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_n5hLfjUbGg9_kd","created_at":1416915291,"reject_reason":"card
64
+ expired","issuer_response_code":"54","transaction_id":"tn_FDIGDOPtr"},{"id":"pay_8UPROeEjy1mfiZ","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_3HMQxyuFUlqrof","created_at":1416915219,"issuer_response_code":"","transaction_id":"tn_zJrhC6LIg"},{"id":"pay_0dAV3hHjTOynda","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_dJ4AONo8kaB9dW","created_at":1416915092,"issuer_response_code":"","transaction_id":"tn_5Ye7_y71v"},{"id":"pay_q4YyzX_LopLa3V","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_BYyLfXi2Y1yD13","created_at":1416915011,"issuer_response_code":"","transaction_id":"tn_Zrkeox6AF"},{"id":"pay_YAM-5tPuCW7zc5","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_WbJy48Hih3qzLl","created_at":1416914988,"issuer_response_code":"","transaction_id":"tn_Zq0C-zIXS"},{"id":"pay_yAUVDCvLcKTdlt","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_RQ2JS7ZkuHmjTA","created_at":1416914971,"issuer_response_code":"","transaction_id":"tn__pAcdnNKx"},{"id":"pay_9Sol_CfGKSwfzu","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_S7FbD61XKua7hH","created_at":1416914232,"issuer_response_code":"","transaction_id":"tn_HN3yjWFhA"},{"id":"pay_F6X-6bq8NrP8TV","description":"payment_id:17","channel":"elavon","amount":"369.00","currency":"PLN","state":"executed","client":"cli_1_9zd3sba03Os5","created_at":1416827486,"issuer_response_code":"00","transaction_id":"tn_QelKAfJje"},{"id":"pay_SejDXvQj3EDuOM","description":"Opis
65
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"failed","client":"cli_bjyYV5SMWyqaHk","created_at":1416408068,"issuer_response_code":null,"transaction_id":"tn_n2vdQTxX6"}]}'
66
+ http_version:
67
+ recorded_at: Wed, 26 Nov 2014 21:46:12 GMT
68
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix/complete
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Content-Length:
13
+ - '0'
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ X-Meta-Request-Version:
26
+ - 0.2.2
27
+ X-Ua-Compatible:
28
+ - IE=Edge
29
+ Etag:
30
+ - '"5ea3eba9ebeccd2bc8a2947b54a444f1"'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Set-Cookie:
34
+ - _session_id=a9e1c248f6c9ddb1e3fd649c586736b1; path=/; HttpOnly
35
+ X-Request-Id:
36
+ - 11ef181ee556d7226d688cade112857d
37
+ X-Runtime:
38
+ - '1.217965'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin 1.5.0 codename Knife
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":"pay_kQmS_3RTfm4eix","description":"Opis transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"executed","client":"cli_5rDoJyvKDM4RbM","created_at":1417005334,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_tAxxrivny"}'
46
+ http_version:
47
+ recorded_at: Wed, 26 Nov 2014 12:37:15 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_Wmu3hmXJIG4jsg/complete
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Content-Length:
13
+ - '0'
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ X-Meta-Request-Version:
26
+ - 0.2.2
27
+ X-Ua-Compatible:
28
+ - IE=Edge
29
+ Etag:
30
+ - '"c1125d6013e41894d2706e947d6e942c"'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Set-Cookie:
34
+ - _session_id=0a801889719aa85d0cc346668d43d31e; path=/; HttpOnly
35
+ X-Request-Id:
36
+ - f5cabe682fb1e76967d5124e863f99a0
37
+ X-Runtime:
38
+ - '0.929976'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin 1.5.0 codename Knife
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":"pay_Wmu3hmXJIG4jsg","description":"Opis transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"executed","client":"cli_PQI_mlA6DXe1nP","created_at":1417009684,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_0pydA_RVa"}'
46
+ http_version:
47
+ recorded_at: Wed, 26 Nov 2014 13:48:17 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_kQmS_3RTfm4eix
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Meta-Request-Version:
24
+ - 0.2.2
25
+ X-Ua-Compatible:
26
+ - IE=Edge
27
+ Etag:
28
+ - '"e9b260d3d5b26ceec40f977d48e25614"'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Set-Cookie:
32
+ - _session_id=d6acb24518204a1267f6a2ccb130a48a; path=/; HttpOnly
33
+ X-Request-Id:
34
+ - b41422297a3e9f5c8b1143f80a34ffe0
35
+ X-Runtime:
36
+ - '1.450934'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":"pay_kQmS_3RTfm4eix","description":"Opis transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"reversed","client":"cli_5rDoJyvKDM4RbM","created_at":1417005334,"issuer_response_code":"00","transaction_id":"tn_tAxxrivny"}'
44
+ http_version:
45
+ recorded_at: Wed, 26 Nov 2014 12:41:24 GMT
46
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Meta-Request-Version:
24
+ - 0.2.2
25
+ X-Ua-Compatible:
26
+ - IE=Edge
27
+ Etag:
28
+ - '"6d312ed62c99eb849a825168a30a2cce"'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Set-Cookie:
32
+ - _session_id=b56c7678f15b1a9cc46c3afd57cc0b2e; path=/; HttpOnly
33
+ X-Request-Id:
34
+ - 8e3d15762204f9819148a17ef98b76c4
35
+ X-Runtime:
36
+ - '1.920712'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"count":589,"charges":[{"id":"pay_yBeZDDdvI9-xPs","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_As1e5K4jpHy5Aw","created_at":1416917203,"reject_reason":"card
44
+ expired","issuer_response_code":"54","transaction_id":"tn_sC6zyk_5F"},{"id":"pay_Mc4aIdi0mMTwqw","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_DYuoBap-1hJzBU","created_at":1416916959,"reject_reason":"card
45
+ expired","issuer_response_code":"54","transaction_id":"tn_a0UiElEVZ"},{"id":"pay_dNeWnyjbgh8mry","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_DAGc95pNHoYTup","created_at":1416916878,"reject_reason":"card
46
+ expired","issuer_response_code":"54","transaction_id":"tn_egEqc9QKG"},{"id":"pay_HxEZHsvAe_DKEf","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_7FXtokGKn71rBJ","created_at":1416916867,"reject_reason":"card
47
+ expired","issuer_response_code":"54","transaction_id":"tn_MfEarJeKF"},{"id":"pay_kabeiSF6rqkXhf","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_PRg_F5LPOzlaw0","created_at":1416916839,"reject_reason":"card
48
+ expired","issuer_response_code":"54","transaction_id":"tn_nDxoks8Nw"},{"id":"pay_AqipUAnHNnxk6e","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_Gq_WKAtb1sk-_H","created_at":1416916725,"reject_reason":"card
49
+ expired","issuer_response_code":"54","transaction_id":"tn_3Q5dbU_B_"},{"id":"pay_M_3aKKX3hEwdJR","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_ZAe6FMTGpAx2D1","created_at":1416916429,"reject_reason":"card
50
+ expired","issuer_response_code":"54","transaction_id":"tn_PyZneugYr"},{"id":"pay_sM6u2z1uvYuLtp","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_qRRYr2riz-IEqd","created_at":1416915972,"reject_reason":"card
51
+ expired","issuer_response_code":"54","transaction_id":"tn_RVWC2QZAL"},{"id":"pay_9dhQSFZ5ZoCTot","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_fxWPgeAkWOo1ZU","created_at":1416915851,"reject_reason":"card
52
+ expired","issuer_response_code":"54","transaction_id":"tn_uNcAmJQIP"},{"id":"pay_VhLoTUAI4SdKAQ","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_qaiHjuRdLKrDfy","created_at":1416915841,"reject_reason":"card
53
+ expired","issuer_response_code":"54","transaction_id":"tn_d7oo1A-83"},{"id":"pay_WtOOd39mtQ5U9A","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_9qUJ-X9sF-x8H4","created_at":1416915721,"reject_reason":"card
54
+ expired","issuer_response_code":"54","transaction_id":"tn_m-wM2cSAu"},{"id":"pay_NBdRkyjAUHCS4b","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_GO5IjkVbJJM8EP","created_at":1416915649,"reject_reason":"card
55
+ expired","issuer_response_code":"54","transaction_id":"tn_vHPyGDu76"},{"id":"pay_OA5PkgCKJXAfS4","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_Ays1Jh3WdgvwdF","created_at":1416915327,"reject_reason":"card
56
+ expired","issuer_response_code":"54","transaction_id":"tn_0E7kcajyW"},{"id":"pay_UJWQP-sGbC_7Wo","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_FqguquyelXPRme","created_at":1416915312,"reject_reason":"card
57
+ expired","issuer_response_code":"54","transaction_id":"tn_mFqUywuHv"},{"id":"pay_xfhHX_6-YRcCnp","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"rejected","client":"cli_n5hLfjUbGg9_kd","created_at":1416915291,"reject_reason":"card
58
+ expired","issuer_response_code":"54","transaction_id":"tn_FDIGDOPtr"},{"id":"pay_8UPROeEjy1mfiZ","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_3HMQxyuFUlqrof","created_at":1416915219,"issuer_response_code":"","transaction_id":"tn_zJrhC6LIg"},{"id":"pay_0dAV3hHjTOynda","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_dJ4AONo8kaB9dW","created_at":1416915092,"issuer_response_code":"","transaction_id":"tn_5Ye7_y71v"},{"id":"pay_q4YyzX_LopLa3V","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_BYyLfXi2Y1yD13","created_at":1416915011,"issuer_response_code":"","transaction_id":"tn_Zrkeox6AF"},{"id":"pay_YAM-5tPuCW7zc5","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_WbJy48Hih3qzLl","created_at":1416914988,"issuer_response_code":"","transaction_id":"tn_Zq0C-zIXS"},{"id":"pay_yAUVDCvLcKTdlt","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_RQ2JS7ZkuHmjTA","created_at":1416914971,"issuer_response_code":"","transaction_id":"tn__pAcdnNKx"},{"id":"pay_9Sol_CfGKSwfzu","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"new","client":"cli_S7FbD61XKua7hH","created_at":1416914232,"issuer_response_code":"","transaction_id":"tn_HN3yjWFhA"},{"id":"pay_F6X-6bq8NrP8TV","description":"payment_id:17","channel":"elavon","amount":"369.00","currency":"PLN","state":"executed","client":"cli_1_9zd3sba03Os5","created_at":1416827486,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_QelKAfJje"},{"id":"pay_SejDXvQj3EDuOM","description":"Opis
59
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"failed","client":"cli_bjyYV5SMWyqaHk","created_at":1416408068,"issuer_response_code":null,"transaction_id":"tn_n2vdQTxX6"},{"id":"pay_T9bUyYCB4OtlgM","description":"Opis
60
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"new","client":"cli_ZU8spNjAeUhjHj","created_at":1416327352,"issuer_response_code":"","transaction_id":"tn_lLp1v7o_b"},{"id":"pay_tNvmrEC2wf6n5E","description":"Opis
61
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"failed","client":"cli_z9bNfGIepiEmAq","created_at":1416326802,"issuer_response_code":"","transaction_id":"tn_bVlAe5A_X"},{"id":"pay_s10ZkQNKg3kBsG","description":"Opis
62
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"executed","client":"cli_HPQ4bkeh8_t_30","created_at":1416326700,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_nZQlA3gMz"},{"id":"pay_lQGyIon5qG59O5","description":"Opis
63
+ transakcji","channel":"elavon","amount":"49.99","currency":"pln","state":"executed","client":"cli_3szMS5l5b6pPyH","created_at":1416326675,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_QjFB6uVNP"},{"id":"pay_n6-jMhu_y7dvQA","description":"payment_id:16","channel":"elavon","amount":"123.00","currency":"PLN","state":"executed","client":"cli_BZIrW8KMAUnhG7","created_at":1416305855,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_c9D5RvtV-"},{"id":"pay_DhmxQKzDNH4WEB","description":"payment_id:15","channel":"elavon","amount":"123.00","currency":"PLN","state":"failed","client":"cli_qcKoI0l8A1o5xN","created_at":1416305551,"issuer_response_code":"","transaction_id":"tn_Rur-BLWIm"},{"id":"pay_f-a2sxhpVP6qSG","description":"Auth
64
+ AMEX e-comm","channel":"elavon","amount":"4.00","currency":"pln","state":"refunded","client":"cli_wyJopbPp_I1Ogv","created_at":1415962626,"issuer_response_code":"00","refund_amount":"4.0","transaction_id":"tn_riGwAsIh9"}]}'
65
+ http_version:
66
+ recorded_at: Tue, 25 Nov 2014 12:06:46 GMT
67
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ X-Meta-Request-Version:
24
+ - 0.2.2
25
+ X-Ua-Compatible:
26
+ - IE=Edge
27
+ Etag:
28
+ - '"76f2464efbd4d4b572cfb2082aefaa65"'
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Set-Cookie:
32
+ - _session_id=a96c21ecae477d2b6beccc4c244b4962; path=/; HttpOnly
33
+ X-Request-Id:
34
+ - 439cf8ff9ff17680379731a0cf7a7a92
35
+ X-Runtime:
36
+ - '1.759306'
37
+ Connection:
38
+ - close
39
+ Server:
40
+ - thin 1.5.0 codename Knife
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"id":"pay_mTOngouLTJWZ0w","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"executed","client":"cli_YM5tKz6-IfhN7T","created_at":1416917311,"issuer_response_code":"00","reversable":true,"transaction_id":"tn_5puLXUWDf"}'
44
+ http_version:
45
+ recorded_at: Tue, 25 Nov 2014 12:39:26 GMT
46
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges
6
+ body:
7
+ encoding: US-ASCII
8
+ string: amount=49.99&currency=PLN&description=Test12345&card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ X-Meta-Request-Version:
26
+ - 0.2.2
27
+ X-Ua-Compatible:
28
+ - IE=Edge
29
+ Etag:
30
+ - '"972a1a29ea0e1d4a67e169d8b84b506a"'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Set-Cookie:
34
+ - _session_id=d98575dab0f9a2cbdc9c8c91fab16247; path=/; HttpOnly
35
+ X-Request-Id:
36
+ - 2f00526303e5645e1c0a69f02d9a0afb
37
+ X-Runtime:
38
+ - '1.214083'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin 1.5.0 codename Knife
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":"pay_mTOngouLTJWZ0w","description":"Test12345","channel":"elavon","amount":"49.99","currency":"PLN","state":"executed","client":"cli_YM5tKz6-IfhN7T","created_at":1416917311,"card":{"company":"VI","last4":"4242","year":2015,"month":2,"first_name":"Jan","last_name":"Kowalski","authorized":null,"created_at":1416917311},"issuer_response_code":"00","reversable":true,"transaction_id":"tn_5puLXUWDf"}'
46
+ http_version:
47
+ recorded_at: Tue, 25 Nov 2014 12:08:32 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/charges/pay_lQGyIon5qG59O5/refund
6
+ body:
7
+ encoding: US-ASCII
8
+ string: charge_id=pay_lQGyIon5qG59O5
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ X-Meta-Request-Version:
26
+ - 0.2.2
27
+ X-Ua-Compatible:
28
+ - IE=Edge
29
+ Etag:
30
+ - '"cbdc619a2d93a369a022248154fbf661"'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Set-Cookie:
34
+ - _session_id=1d1df3d66484a4269b07826856230f97; path=/; HttpOnly
35
+ X-Request-Id:
36
+ - fa8ab1f40408cfdb01470c2547ad7525
37
+ X-Runtime:
38
+ - '1.375876'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin 1.5.0 codename Knife
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"id":"pay_lQGyIon5qG59O5","description":"Opis transakcji","amount":"49.99","refunded_amount":"49.99","currency":"pln","state":"refunded","client":"cli_3szMS5l5b6pPyH","created_at":1416326675,"card":{"company":null,"last4":null,"year":null,"month":null,"first_name":null,"last_name":null,"authorized":null,"created_at":null}}'
46
+ http_version:
47
+ recorded_at: Tue, 25 Nov 2014 13:44:33 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://app_id_test:app_password_test@sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/authorize
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.espago.v2+json
12
+ Content-Length:
13
+ - '0'
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ X-Meta-Request-Version:
26
+ - 0.2.2
27
+ X-Ua-Compatible:
28
+ - IE=Edge
29
+ Etag:
30
+ - '"a8faa080eae05fb1056ef92dfb0c0479"'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Set-Cookie:
34
+ - _session_id=4a24f8f2bb9095a707bf305ff0d23efc; path=/; HttpOnly
35
+ X-Request-Id:
36
+ - 631ce87a08bb2b6c26bdbf1f7485bbf4
37
+ X-Runtime:
38
+ - '1.818804'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin 1.5.0 codename Knife
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"email":null,"id":"cli_w0Se2smYwyQ0Uw","created_at":1417004837,"description":null,"card":{"company":"VI","last4":"1112","year":2020,"month":1,"first_name":"Jan","last_name":"Kowalski","authorized":true,"issuer_response_code":"00","created_at":1417004837},"deleted":false}'
46
+ http_version:
47
+ recorded_at: Wed, 26 Nov 2014 13:09:18 GMT
48
+ recorded_with: VCR 2.9.3