fat_zebra 2.0.13 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +5 -13
  2. data/.rubocop.yml +42 -0
  3. data/.travis.yml +9 -2
  4. data/Gemfile +1 -1
  5. data/{README.markdown → README.md} +19 -20
  6. data/Rakefile +2 -12
  7. data/fat_zebra.gemspec +27 -0
  8. data/lib/fat_zebra/api_operation/delete.rb +38 -0
  9. data/lib/fat_zebra/api_operation/find.rb +23 -0
  10. data/lib/fat_zebra/api_operation/save.rb +62 -0
  11. data/lib/fat_zebra/api_operation/search.rb +32 -0
  12. data/lib/fat_zebra/api_operation/void.rb +52 -0
  13. data/lib/fat_zebra/api_resource.rb +135 -0
  14. data/lib/fat_zebra/bank_account.rb +21 -0
  15. data/lib/fat_zebra/batch.rb +56 -0
  16. data/lib/fat_zebra/card.rb +22 -0
  17. data/lib/fat_zebra/config.rb +65 -25
  18. data/lib/fat_zebra/customer.rb +27 -0
  19. data/lib/fat_zebra/direct_credit.rb +27 -0
  20. data/lib/fat_zebra/direct_debit.rb +27 -0
  21. data/lib/fat_zebra/errors.rb +18 -4
  22. data/lib/fat_zebra/fat_zebra_object.rb +179 -0
  23. data/lib/fat_zebra/information.rb +25 -0
  24. data/lib/fat_zebra/payment_plan.rb +62 -0
  25. data/lib/fat_zebra/purchase.rb +99 -0
  26. data/lib/fat_zebra/refund.rb +25 -0
  27. data/lib/fat_zebra/request/multipart/epilogue.rb +23 -0
  28. data/lib/fat_zebra/request/multipart/file_io.rb +40 -0
  29. data/lib/fat_zebra/request/multipart/param.rb +37 -0
  30. data/lib/fat_zebra/request/multipart/part.rb +28 -0
  31. data/lib/fat_zebra/request/multipart/stream.rb +55 -0
  32. data/lib/fat_zebra/request.rb +162 -0
  33. data/lib/fat_zebra/util.rb +70 -0
  34. data/lib/fat_zebra/validation.rb +47 -0
  35. data/lib/fat_zebra/version.rb +1 -1
  36. data/lib/fat_zebra/web_hook.rb +23 -0
  37. data/lib/fat_zebra.rb +51 -55
  38. data/spec/cassettes/FatZebra_BankAccount/_create/1_1_1.yml +57 -0
  39. data/spec/cassettes/FatZebra_BankAccount/_create/1_1_2.yml +57 -0
  40. data/spec/cassettes/FatZebra_BankAccount/_create/validations/1_1_3_1.yml +57 -0
  41. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_1.yml +172 -0
  42. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_2.yml +172 -0
  43. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_3.yml +172 -0
  44. data/spec/cassettes/FatZebra_Batch/_create/1_1_1.yml +58 -0
  45. data/spec/cassettes/FatZebra_Batch/_create/1_1_2.yml +58 -0
  46. data/spec/cassettes/FatZebra_Batch/_create/validations/1_1_3_1.yml +57 -0
  47. data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_1.yml +58 -0
  48. data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_2.yml +58 -0
  49. data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_1.yml +58 -0
  50. data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_2.yml +58 -0
  51. data/spec/cassettes/FatZebra_Batch/_find/1_2_1.yml +109 -0
  52. data/spec/cassettes/FatZebra_Batch/_find/1_2_2.yml +109 -0
  53. data/spec/cassettes/FatZebra_Batch/_result/1_4_1.yml +160 -0
  54. data/spec/cassettes/FatZebra_Batch/_search/1_3_1.yml +54 -0
  55. data/spec/cassettes/FatZebra_Batch/_search/1_3_2.yml +54 -0
  56. data/spec/cassettes/FatZebra_Batch/_search/1_3_3.yml +54 -0
  57. data/spec/cassettes/FatZebra_Card/_create/1_1_1.yml +55 -0
  58. data/spec/cassettes/FatZebra_Card/_create/1_1_2.yml +55 -0
  59. data/spec/cassettes/FatZebra_Card/_create/1_1_3.yml +55 -0
  60. data/spec/cassettes/FatZebra_Card/_create/1_1_4.yml +55 -0
  61. data/spec/cassettes/FatZebra_Card/_create/1_1_5.yml +55 -0
  62. data/spec/cassettes/FatZebra_Card/_create/1_1_6.yml +55 -0
  63. data/spec/cassettes/FatZebra_Card/_create/validations/1_1_7_1.yml +56 -0
  64. data/spec/cassettes/FatZebra_Card/_update/1_2_1.yml +105 -0
  65. data/spec/cassettes/FatZebra_Card/_update/1_2_2.yml +105 -0
  66. data/spec/cassettes/FatZebra_Card/_update/1_2_3.yml +105 -0
  67. data/spec/cassettes/FatZebra_Card/_update/validations/1_2_4_1.yml +55 -0
  68. data/spec/cassettes/FatZebra_Customer/_create/1_1_1.yml +59 -0
  69. data/spec/cassettes/FatZebra_Customer/_create/1_1_2.yml +59 -0
  70. data/spec/cassettes/FatZebra_Customer/_create/1_1_3.yml +59 -0
  71. data/spec/cassettes/FatZebra_Customer/_create/1_1_4.yml +59 -0
  72. data/spec/cassettes/FatZebra_Customer/_create/1_1_5.yml +59 -0
  73. data/spec/cassettes/FatZebra_Customer/_create/1_1_6.yml +59 -0
  74. data/spec/cassettes/FatZebra_Customer/_create/validations/1_1_7_1.yml +56 -0
  75. data/spec/cassettes/FatZebra_Customer/_delete/1_4_1.yml +113 -0
  76. data/spec/cassettes/FatZebra_Customer/_delete/1_5_1.yml +113 -0
  77. data/spec/cassettes/FatZebra_Customer/_find/1_2_1.yml +111 -0
  78. data/spec/cassettes/FatZebra_Customer/_find/1_2_2.yml +111 -0
  79. data/spec/cassettes/FatZebra_Customer/_find/1_3_1.yml +111 -0
  80. data/spec/cassettes/FatZebra_Customer/_find/1_3_2.yml +111 -0
  81. data/spec/cassettes/FatZebra_Customer/_search/1_2_1.yml +56 -0
  82. data/spec/cassettes/FatZebra_Customer/_search/1_2_2.yml +56 -0
  83. data/spec/cassettes/FatZebra_Customer/_search/1_2_3.yml +56 -0
  84. data/spec/cassettes/FatZebra_Customer/_update/1_3_1.yml +114 -0
  85. data/spec/cassettes/FatZebra_Customer/_update/1_3_2.yml +114 -0
  86. data/spec/cassettes/FatZebra_Customer/_update/1_4_1.yml +114 -0
  87. data/spec/cassettes/FatZebra_Customer/_update/1_4_2.yml +114 -0
  88. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_1.yml +56 -0
  89. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_2.yml +56 -0
  90. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_3.yml +56 -0
  91. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_4.yml +56 -0
  92. data/spec/cassettes/FatZebra_DirectCredit/_create/validations/1_1_5_1.yml +59 -0
  93. data/spec/cassettes/FatZebra_DirectCredit/_delete/1_4_1.yml +109 -0
  94. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_1.yml +107 -0
  95. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_2.yml +107 -0
  96. data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_1.yml +160 -0
  97. data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_2.yml +160 -0
  98. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_1.yml +56 -0
  99. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_2.yml +56 -0
  100. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_3.yml +56 -0
  101. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_4.yml +56 -0
  102. data/spec/cassettes/FatZebra_DirectDebit/_create/validations/1_1_5_1.yml +59 -0
  103. data/spec/cassettes/FatZebra_DirectDebit/_delete/1_4_1.yml +109 -0
  104. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_1.yml +107 -0
  105. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_2.yml +107 -0
  106. data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_1.yml +160 -0
  107. data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_2.yml +160 -0
  108. data/spec/cassettes/FatZebra_Information/_ping/1_1_1.yml +54 -0
  109. data/spec/cassettes/FatZebra_Information/_ping/1_1_2.yml +54 -0
  110. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_7_1.yml +238 -0
  111. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_7_2.yml +238 -0
  112. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_1.yml +238 -0
  113. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_2.yml +238 -0
  114. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_1.yml +118 -0
  115. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_2.yml +118 -0
  116. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_3.yml +118 -0
  117. data/spec/cassettes/FatZebra_PaymentPlan/_create/validations/1_1_4_1.yml +55 -0
  118. data/spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_1.yml +172 -0
  119. data/spec/cassettes/FatZebra_PaymentPlan/_destroy/1_6_1.yml +172 -0
  120. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_1.yml +175 -0
  121. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_2.yml +175 -0
  122. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_3.yml +175 -0
  123. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_6_1.yml +178 -0
  124. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_6_2.yml +178 -0
  125. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_1.yml +178 -0
  126. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_2.yml +178 -0
  127. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_1.yml +172 -0
  128. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_2.yml +172 -0
  129. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_3.yml +172 -0
  130. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_1.yml +178 -0
  131. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_2.yml +178 -0
  132. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_1.yml +111 -0
  133. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_2.yml +111 -0
  134. data/spec/cassettes/FatZebra_Purchase/_capture/1_6_1.yml +111 -0
  135. data/spec/cassettes/FatZebra_Purchase/_capture/1_6_2.yml +111 -0
  136. data/spec/cassettes/FatZebra_Purchase/_create/1_1_1.yml +57 -0
  137. data/spec/cassettes/FatZebra_Purchase/_create/1_1_10.yml +57 -0
  138. data/spec/cassettes/FatZebra_Purchase/_create/1_1_11.yml +57 -0
  139. data/spec/cassettes/FatZebra_Purchase/_create/1_1_12.yml +57 -0
  140. data/spec/cassettes/FatZebra_Purchase/_create/1_1_2.yml +57 -0
  141. data/spec/cassettes/FatZebra_Purchase/_create/1_1_3.yml +57 -0
  142. data/spec/cassettes/FatZebra_Purchase/_create/1_1_4.yml +57 -0
  143. data/spec/cassettes/FatZebra_Purchase/_create/1_1_5.yml +57 -0
  144. data/spec/cassettes/FatZebra_Purchase/_create/1_1_6.yml +57 -0
  145. data/spec/cassettes/FatZebra_Purchase/_create/1_1_7.yml +57 -0
  146. data/spec/cassettes/FatZebra_Purchase/_create/1_1_8.yml +57 -0
  147. data/spec/cassettes/FatZebra_Purchase/_create/1_1_9.yml +57 -0
  148. data/spec/cassettes/FatZebra_Purchase/_find/1_2_1.yml +109 -0
  149. data/spec/cassettes/FatZebra_Purchase/_find/1_2_2.yml +109 -0
  150. data/spec/cassettes/FatZebra_Purchase/_find/1_2_3.yml +109 -0
  151. data/spec/cassettes/FatZebra_Purchase/_find/1_4_1.yml +109 -0
  152. data/spec/cassettes/FatZebra_Purchase/_find/1_4_2.yml +109 -0
  153. data/spec/cassettes/FatZebra_Purchase/_find/1_4_3.yml +109 -0
  154. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_1.yml +111 -0
  155. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_2.yml +111 -0
  156. data/spec/cassettes/FatZebra_Purchase/_refund/1_5_1.yml +111 -0
  157. data/spec/cassettes/FatZebra_Purchase/_refund/1_5_2.yml +111 -0
  158. data/spec/cassettes/FatZebra_Purchase/_search/1_3_1.yml +170 -0
  159. data/spec/cassettes/FatZebra_Purchase/_search/1_3_2.yml +170 -0
  160. data/spec/cassettes/FatZebra_Purchase/_search/1_3_3.yml +170 -0
  161. data/spec/cassettes/FatZebra_Purchase/_search/with_data/1_3_2_1.yml +164 -0
  162. data/spec/cassettes/FatZebra_Purchase/_search/with_data/1_3_2_2.yml +165 -0
  163. data/spec/cassettes/FatZebra_Purchase/_search/with_data/1_3_2_3.yml +164 -0
  164. data/spec/cassettes/FatZebra_Purchase/_search/without_data/1_3_1_1.yml +54 -0
  165. data/spec/cassettes/FatZebra_Purchase/_search/without_data/1_3_1_2.yml +54 -0
  166. data/spec/cassettes/FatZebra_Purchase/_search/without_data/1_3_1_3.yml +54 -0
  167. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_1.yml +613 -0
  168. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_2.yml +615 -0
  169. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_3.yml +617 -0
  170. data/spec/cassettes/FatZebra_Purchase/_void/1_6_1.yml +111 -0
  171. data/spec/cassettes/FatZebra_Purchase/_void/1_6_2.yml +111 -0
  172. data/spec/cassettes/FatZebra_Purchase/_void/1_6_3.yml +111 -0
  173. data/spec/cassettes/FatZebra_Purchase/_void/1_7_1.yml +111 -0
  174. data/spec/cassettes/FatZebra_Purchase/_void/1_7_2.yml +111 -0
  175. data/spec/cassettes/FatZebra_Purchase/_void/1_7_3.yml +111 -0
  176. data/spec/cassettes/FatZebra_Refund/_create/1_1_1.yml +111 -0
  177. data/spec/cassettes/FatZebra_Refund/_create/1_1_2.yml +111 -0
  178. data/spec/cassettes/FatZebra_Refund/_create/1_1_3.yml +111 -0
  179. data/spec/cassettes/FatZebra_Refund/_create/1_1_4.yml +111 -0
  180. data/spec/cassettes/FatZebra_Refund/_create/1_1_5.yml +111 -0
  181. data/spec/cassettes/FatZebra_Refund/_create/1_1_6.yml +111 -0
  182. data/spec/cassettes/FatZebra_Refund/_create/1_1_7.yml +111 -0
  183. data/spec/cassettes/FatZebra_Refund/_create/1_1_8.yml +111 -0
  184. data/spec/cassettes/FatZebra_Refund/_create/1_1_9.yml +111 -0
  185. data/spec/cassettes/FatZebra_Refund/_find/1_2_1.yml +163 -0
  186. data/spec/cassettes/FatZebra_Refund/_find/1_2_2.yml +163 -0
  187. data/spec/cassettes/FatZebra_Refund/_search/1_3_1.yml +281 -0
  188. data/spec/cassettes/FatZebra_Refund/_search/1_3_2.yml +281 -0
  189. data/spec/cassettes/FatZebra_Refund/_void/1_4_1.yml +165 -0
  190. data/spec/cassettes/FatZebra_Refund/_void/1_4_2.yml +165 -0
  191. data/spec/cassettes/FatZebra_Refund/_void/1_4_3.yml +165 -0
  192. data/spec/cassettes/FatZebra_WebHook/_create/1_1_1.yml +57 -0
  193. data/spec/cassettes/FatZebra_WebHook/_create/1_1_2.yml +57 -0
  194. data/spec/cassettes/FatZebra_WebHook/_create/1_1_3.yml +57 -0
  195. data/spec/cassettes/FatZebra_WebHook/_create/validations/1_1_4_1.yml +56 -0
  196. data/spec/cassettes/FatZebra_WebHook/_delete/1_4_1.yml +111 -0
  197. data/spec/cassettes/FatZebra_WebHook/_search/1_2_1.yml +222 -0
  198. data/spec/cassettes/FatZebra_WebHook/_search/1_2_2.yml +224 -0
  199. data/spec/cassettes/FatZebra_WebHook/_update/1_3_1.yml +112 -0
  200. data/spec/cassettes/FatZebra_WebHook/_update/1_3_2.yml +112 -0
  201. data/spec/fixtures/batch_test.csv +4 -0
  202. data/spec/lib/fat_zebra/bank_account_spec.rb +34 -0
  203. data/spec/lib/fat_zebra/batch_spec.rb +59 -0
  204. data/spec/lib/fat_zebra/card_spec.rb +41 -0
  205. data/spec/lib/fat_zebra/config_spec.rb +52 -0
  206. data/spec/lib/fat_zebra/customer_spec.rb +53 -0
  207. data/spec/lib/fat_zebra/direct_credit_spec.rb +53 -0
  208. data/spec/lib/fat_zebra/direct_debit_spec.rb +53 -0
  209. data/spec/lib/fat_zebra/fat_zebra_object_spec.rb +116 -0
  210. data/spec/lib/fat_zebra/information_spec.rb +13 -0
  211. data/spec/lib/fat_zebra/payment_plan_spec.rb +94 -0
  212. data/spec/lib/fat_zebra/purchase_spec.rb +92 -0
  213. data/spec/lib/fat_zebra/refund_spec.rb +72 -0
  214. data/spec/lib/fat_zebra/util_spec.rb +24 -0
  215. data/spec/lib/fat_zebra/validation_spec.rb +22 -0
  216. data/spec/lib/fat_zebra/web_hook_spec.rb +50 -0
  217. data/spec/spec_helper.rb +49 -3
  218. data/spec/support/payloads.rb +43 -0
  219. metadata +238 -65
  220. data/FatZebra.gemspec +0 -31
  221. data/lib/fat_zebra/constants.rb +0 -2
  222. data/lib/fat_zebra/gateway.rb +0 -292
  223. data/lib/fat_zebra/models/base.rb +0 -33
  224. data/lib/fat_zebra/models/card.rb +0 -49
  225. data/lib/fat_zebra/models/purchase.rb +0 -185
  226. data/lib/fat_zebra/models/refund.rb +0 -46
  227. data/lib/fat_zebra/models/response.rb +0 -33
  228. data/lib/rest-client/request_ext.rb +0 -15
  229. data/spec/config_spec.rb +0 -37
  230. data/spec/gateway_spec.rb +0 -120
  231. data/spec/models/purchase_spec.rb +0 -55
  232. data/spec/models/refund_spec.rb +0 -9
  233. data/spec/models/response_spec.rb +0 -25
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ Date:
26
+ - Mon, 03 Jul 2017 03:25:09 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 422 Unprocessable Entity
35
+ Cache-Control:
36
+ - no-store
37
+ X-Request-Version:
38
+ - 1.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - ac954bcc0aa98d0d4129181c2f5b79e0
43
+ X-Runtime:
44
+ - '0.069570'
45
+ X-Rack-Cache:
46
+ - invalidate, pass
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":false,"response":{"address":null,"events":null,"mode":null,"authentication_username":null,"authentication_password":"","is_active":null,"name":null,"id":null},"errors":["Address
52
+ can''t be blank","Events is not included in the list","Mode is not included
53
+ in the list"],"test":true}'
54
+ http_version:
55
+ recorded_at: Mon, 03 Jul 2017 03:25:09 GMT
56
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,111 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"events":"*","mode":"Test","name":"test hook","address":"http://stage.example.com.au/v1/api/hook_listener","test":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '120'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 06:22:39 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ X-Rack-Cache:
38
+ - invalidate, pass
39
+ Cache-Control:
40
+ - no-store
41
+ X-Request-Version:
42
+ - 1.19.41
43
+ X-Runtime:
44
+ - '0.045362'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - d82198d9e454456c3e8c944c76505182
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
54
+ hook","id":"071-WH-BS60OHSL"},"errors":[],"test":true}'
55
+ http_version:
56
+ recorded_at: Tue, 27 Jun 2017 06:22:39 GMT
57
+ - request:
58
+ method: delete
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks/071-WH-BS60OHSL
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"test":true}'
63
+ headers:
64
+ Accept:
65
+ - application/json
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ Content-Type:
69
+ - application/json
70
+ Content-Length:
71
+ - '13'
72
+ User-Agent:
73
+ - Ruby
74
+ Authorization:
75
+ - Basic VEVTVDpURVNU
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Date:
82
+ - Tue, 27 Jun 2017 06:22:39 GMT
83
+ Content-Type:
84
+ - application/json; charset=utf-8
85
+ Transfer-Encoding:
86
+ - chunked
87
+ Connection:
88
+ - keep-alive
89
+ Status:
90
+ - 200 OK
91
+ Cache-Control:
92
+ - no-store
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ Pragma:
96
+ - no-cache
97
+ X-Request-Id:
98
+ - 1a079c865e059ce2473f13655b0a17bc
99
+ X-Runtime:
100
+ - '0.021911'
101
+ X-Rack-Cache:
102
+ - invalidate, pass
103
+ X-Backend:
104
+ - sbox-priv-gateway-a
105
+ body:
106
+ encoding: UTF-8
107
+ string: '{"successful":true,"response":{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
108
+ hook","id":"071-WH-BS60OHSL"},"errors":[],"test":true}'
109
+ http_version:
110
+ recorded_at: Tue, 27 Jun 2017 06:22:39 GMT
111
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,222 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"events":"*","mode":"Test","name":"test hook","address":"http://stage.example.com.au/v1/api/hook_listener","test":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '120'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 06:22:38 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - fc7a17e6a45b2bd94101e268270a48a4
45
+ X-Runtime:
46
+ - '0.045006'
47
+ X-Rack-Cache:
48
+ - invalidate, pass
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
54
+ hook","id":"071-WH-C9E7VID0"},"errors":[],"test":true}'
55
+ http_version:
56
+ recorded_at: Tue, 27 Jun 2017 06:22:38 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"events":"*","mode":"Test","name":"test hook","address":"http://stage.example.com.au/v1/api/hook_listener","test":true}'
63
+ headers:
64
+ Accept:
65
+ - application/json
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ Content-Type:
69
+ - application/json
70
+ Content-Length:
71
+ - '120'
72
+ User-Agent:
73
+ - Ruby
74
+ Authorization:
75
+ - Basic VEVTVDpURVNU
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Date:
82
+ - Tue, 27 Jun 2017 06:22:38 GMT
83
+ Content-Type:
84
+ - application/json; charset=utf-8
85
+ Transfer-Encoding:
86
+ - chunked
87
+ Connection:
88
+ - keep-alive
89
+ Status:
90
+ - 200 OK
91
+ Cache-Control:
92
+ - no-store
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ Pragma:
96
+ - no-cache
97
+ X-Request-Id:
98
+ - 9917effd103def73bcdf88fc49549c00
99
+ X-Runtime:
100
+ - '0.032475'
101
+ X-Rack-Cache:
102
+ - invalidate, pass
103
+ X-Backend:
104
+ - sbox-priv-gateway-a
105
+ body:
106
+ encoding: UTF-8
107
+ string: '{"successful":true,"response":{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
108
+ hook","id":"071-WH-GB6XTWXV"},"errors":[],"test":true}'
109
+ http_version:
110
+ recorded_at: Tue, 27 Jun 2017 06:22:38 GMT
111
+ - request:
112
+ method: get
113
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks?limit=10&offets=0&test=true
114
+ body:
115
+ encoding: US-ASCII
116
+ string: ''
117
+ headers:
118
+ Accept:
119
+ - application/json
120
+ Accept-Encoding:
121
+ - gzip, deflate
122
+ Content-Type:
123
+ - application/json
124
+ User-Agent:
125
+ - Ruby
126
+ Authorization:
127
+ - Basic VEVTVDpURVNU
128
+ response:
129
+ status:
130
+ code: 200
131
+ message: OK
132
+ headers:
133
+ Date:
134
+ - Tue, 27 Jun 2017 06:22:38 GMT
135
+ Content-Type:
136
+ - application/json; charset=utf-8
137
+ Transfer-Encoding:
138
+ - chunked
139
+ Connection:
140
+ - keep-alive
141
+ Status:
142
+ - 200 OK
143
+ Cache-Control:
144
+ - no-store, private
145
+ X-Request-Version:
146
+ - 1.19.41
147
+ Pragma:
148
+ - no-cache
149
+ X-Request-Id:
150
+ - 342162290437f6b031e816cae5d5ea26
151
+ X-Runtime:
152
+ - '0.038527'
153
+ X-Rack-Cache:
154
+ - miss
155
+ X-Backend:
156
+ - sbox-priv-gateway-a
157
+ body:
158
+ encoding: UTF-8
159
+ string: '{"successful":true,"response":[{"address":"https://nosnch.in/cc300bb516","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":true,"name":"Test","id":"071-WH-3W2KM1L3"},{"address":"http://uat.enoahprojects.com/liresearchdemo/cron/direct-debit-hook-update","events":"*","mode":"Test","authentication_username":"null","authentication_password":"****","is_active":null,"name":"Direct
160
+ Debit Hook","id":"071-WH-J4G33MYG"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
161
+ hook","id":"071-WH-Y8I1QHVQ"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
162
+ hook","id":"071-WH-BZBI81OH"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
163
+ hook","id":"071-WH-BXWU3DBU"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
164
+ hook","id":"071-WH-QXLSMD5R"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
165
+ hook","id":"071-WH-2SUA282T"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
166
+ hook","id":"071-WH-6GQJLONY"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
167
+ hook","id":"071-WH-QGEPYZGZ"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
168
+ Test hook","id":"071-WH-AI1FSKC3"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
169
+ Test hook","id":"071-WH-Z9NM18Q"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
170
+ hook","id":"071-WH-H2MYQ4VD"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
171
+ hook","id":"071-WH-MQUPD96G"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
172
+ hook","id":"071-WH-AWEOFCEM"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
173
+ hook","id":"071-WH-UE6K5NIV"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
174
+ hook","id":"071-WH-K0CD9DRD"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
175
+ hook","id":"071-WH-IPG4JZXV"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
176
+ hook","id":"071-WH-6K30PDYN"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
177
+ Test hook","id":"071-WH-ATXL7633"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
178
+ Test hook","id":"071-WH-I4E0UFFG"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
179
+ hook","id":"071-WH-XHHFRVKZ"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
180
+ hook","id":"071-WH-XCXIWWKO"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
181
+ hook","id":"071-WH-24BZWC87"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
182
+ hook","id":"071-WH-B124NSTI"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
183
+ hook","id":"071-WH-ZQXX1VXV"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
184
+ hook","id":"071-WH-KCZB1293"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
185
+ hook","id":"071-WH-RXALO1VA"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
186
+ Test hook","id":"071-WH-ZI7W4X9B"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
187
+ Test hook","id":"071-WH-ND86EP93"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
188
+ hook","id":"071-WH-7PUI7P3R"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
189
+ hook","id":"071-WH-GTM8HXKX"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
190
+ hook","id":"071-WH-G25VW8TJ"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
191
+ hook","id":"071-WH-IOL97DYK"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
192
+ hook","id":"071-WH-LIRP3625"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
193
+ hook","id":"071-WH-USE4X72S"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
194
+ hook","id":"071-WH-3CKJ8ZMF"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
195
+ Test hook","id":"071-WH-HP2Q8T0"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
196
+ Test hook","id":"071-WH-C89JEPMN"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
197
+ hook","id":"071-WH-99TVKK0M"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
198
+ hook","id":"071-WH-CZ6GOJB7"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
199
+ hook","id":"071-WH-ETR36VQG"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
200
+ hook","id":"071-WH-2W9J7530"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
201
+ hook","id":"071-WH-ESAWUVEE"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
202
+ hook","id":"071-WH-RQBOY87X"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
203
+ hook","id":"071-WH-584PDXG8"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
204
+ Test hook","id":"071-WH-RHW3J2VE"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
205
+ Test hook","id":"071-WH-FFS11K56"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
206
+ hook","id":"071-WH-J4GNXACW"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
207
+ hook","id":"071-WH-WEUKU525"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
208
+ hook","id":"071-WH-N47D3H56"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
209
+ hook","id":"071-WH-SJ33SKWN"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
210
+ hook","id":"071-WH-3PN0HRZN"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
211
+ hook","id":"071-WH-1L7KCIGX"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
212
+ hook","id":"071-WH-L3OQ2T4Z"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
213
+ Test hook","id":"071-WH-5MNPSQMN"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"New
214
+ Test hook","id":"071-WH-A53E6QPY"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
215
+ hook","id":"071-WH-CF230O8U"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
216
+ hook","id":"071-WH-C9E7VID0"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
217
+ hook","id":"071-WH-GB6XTWXV"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
218
+ hook","id":"071-WH-SCGDLAI6"},{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
219
+ hook","id":"071-WH-8PHUB38P"}],"errors":[],"test":true,"records":61,"total_records":61,"page":1,"total_pages":1}'
220
+ http_version:
221
+ recorded_at: Tue, 27 Jun 2017 06:22:38 GMT
222
+ recorded_with: VCR 3.0.3