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,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
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 04:16:10 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
+ X-Rack-Cache:
36
+ - invalidate, pass
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ X-Runtime:
42
+ - '0.043555'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - 8c38f98dd12ec9b9b9b72d3914ed50d9
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":false,"response":{"id":null,"amount":0.0,"bsb":null,"account_number":null,"account_name":null,"description":null,"reference":null,"date":"2017-07-03","process_date":null,"status":"New","result":null,"metadata":{}},"errors":["Account
52
+ number can''t be blank","Account number is not a number","Account number is
53
+ too short (minimum is 1 characters)","Account number must be numbers only","Account
54
+ name can''t be blank","Bsb can''t be blank","Bsb is the incorrect format -
55
+ expecting 111-222","Description can''t be blank","Amount must be greater than
56
+ 0"],"test":true}'
57
+ http_version:
58
+ recorded_at: Mon, 03 Jul 2017 04:16:10 GMT
59
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,109 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"description":"Confirmation","amount":42,"bsb":"123-123","account_name":"Test","account_number":"012345678","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
+ - '121'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 00:01:44 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 201 Created
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.037984'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 414caa6d1214fe21ef44f6fb52e744f9
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-DD-5NQIZ7LU","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-5NQIZ7LU","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
54
+ http_version:
55
+ recorded_at: Tue, 27 Jun 2017 00:01:44 GMT
56
+ - request:
57
+ method: delete
58
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits/071-DD-5NQIZ7LU
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"test":true}'
62
+ headers:
63
+ Accept:
64
+ - application/json
65
+ Accept-Encoding:
66
+ - gzip, deflate
67
+ Content-Type:
68
+ - application/json
69
+ Content-Length:
70
+ - '13'
71
+ User-Agent:
72
+ - Ruby
73
+ Authorization:
74
+ - Basic VEVTVDpURVNU
75
+ response:
76
+ status:
77
+ code: 200
78
+ message: OK
79
+ headers:
80
+ Date:
81
+ - Tue, 27 Jun 2017 00:01:44 GMT
82
+ Content-Type:
83
+ - application/json; charset=utf-8
84
+ Transfer-Encoding:
85
+ - chunked
86
+ Connection:
87
+ - keep-alive
88
+ Status:
89
+ - 200 OK
90
+ Cache-Control:
91
+ - no-store
92
+ X-Request-Version:
93
+ - 1.19.41
94
+ Pragma:
95
+ - no-cache
96
+ X-Request-Id:
97
+ - 5fdb0b485b6fbd605b51e0e8d281efaa
98
+ X-Runtime:
99
+ - '0.063071'
100
+ X-Rack-Cache:
101
+ - invalidate, pass
102
+ X-Backend:
103
+ - sbox-priv-gateway-a
104
+ body:
105
+ encoding: UTF-8
106
+ string: '{"successful":true,"response":{"id":"071-DD-5NQIZ7LU","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-5NQIZ7LU","date":"2017-06-27","process_date":null,"status":"Deleted","result":null,"metadata":{}},"errors":[],"test":true}'
107
+ http_version:
108
+ recorded_at: Tue, 27 Jun 2017 00:01:44 GMT
109
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"description":"Confirmation","amount":42,"bsb":"123-123","account_name":"Test","account_number":"012345678","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
+ - '121'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 00:01:43 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 201 Created
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - e7b916d91fc59f5972241527cdbdde4f
45
+ X-Runtime:
46
+ - '0.051946'
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":{"id":"071-DD-3STTD8WL","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-3STTD8WL","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
54
+ http_version:
55
+ recorded_at: Tue, 27 Jun 2017 00:01:43 GMT
56
+ - request:
57
+ method: get
58
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits/071-DD-3STTD8WL?test=true
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ''
62
+ headers:
63
+ Accept:
64
+ - application/json
65
+ Accept-Encoding:
66
+ - gzip, deflate
67
+ Content-Type:
68
+ - application/json
69
+ User-Agent:
70
+ - Ruby
71
+ Authorization:
72
+ - Basic VEVTVDpURVNU
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Date:
79
+ - Tue, 27 Jun 2017 00:01:43 GMT
80
+ Content-Type:
81
+ - application/json; charset=utf-8
82
+ Transfer-Encoding:
83
+ - chunked
84
+ Connection:
85
+ - keep-alive
86
+ Status:
87
+ - 200 OK
88
+ X-Rack-Cache:
89
+ - miss
90
+ Cache-Control:
91
+ - no-store, private
92
+ X-Request-Version:
93
+ - 1.19.41
94
+ X-Runtime:
95
+ - '0.022407'
96
+ Pragma:
97
+ - no-cache
98
+ X-Request-Id:
99
+ - f6b70edf8c13985866b269e876747016
100
+ X-Backend:
101
+ - sbox-priv-gateway-a
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"successful":true,"response":{"id":"071-DD-3STTD8WL","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-3STTD8WL","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Tue, 27 Jun 2017 00:01:43 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"description":"Confirmation","amount":42,"bsb":"123-123","account_name":"Test","account_number":"012345678","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
+ - '121'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 00:01:43 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 201 Created
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - 239d7f0c15b89df1039dcbf5a5b35676
45
+ X-Runtime:
46
+ - '0.040344'
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":{"id":"071-DD-X2U7DQX5","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-X2U7DQX5","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
54
+ http_version:
55
+ recorded_at: Tue, 27 Jun 2017 00:01:43 GMT
56
+ - request:
57
+ method: get
58
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits/071-DD-X2U7DQX5?test=true
59
+ body:
60
+ encoding: US-ASCII
61
+ string: ''
62
+ headers:
63
+ Accept:
64
+ - application/json
65
+ Accept-Encoding:
66
+ - gzip, deflate
67
+ Content-Type:
68
+ - application/json
69
+ User-Agent:
70
+ - Ruby
71
+ Authorization:
72
+ - Basic VEVTVDpURVNU
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Date:
79
+ - Tue, 27 Jun 2017 00:01:43 GMT
80
+ Content-Type:
81
+ - application/json; charset=utf-8
82
+ Transfer-Encoding:
83
+ - chunked
84
+ Connection:
85
+ - keep-alive
86
+ Status:
87
+ - 200 OK
88
+ X-Rack-Cache:
89
+ - miss
90
+ Cache-Control:
91
+ - no-store, private
92
+ X-Request-Version:
93
+ - 1.19.41
94
+ X-Runtime:
95
+ - '0.017414'
96
+ Pragma:
97
+ - no-cache
98
+ X-Request-Id:
99
+ - d647f25f14e825b962e2a3d996865710
100
+ X-Backend:
101
+ - sbox-priv-gateway-a
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"successful":true,"response":{"id":"071-DD-X2U7DQX5","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-X2U7DQX5","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Tue, 27 Jun 2017 00:01:43 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,160 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"description":"Confirmation","amount":42,"bsb":"123-123","account_name":"Test","account_number":"012345678","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
+ - '121'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic VEVTVDpURVNU
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Tue, 27 Jun 2017 00:01:43 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 201 Created
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - 634a1fe55897ab91cfabd80a9d619a44
45
+ X-Runtime:
46
+ - '0.038041'
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":{"id":"071-DD-TAXICWM9","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-TAXICWM9","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
54
+ http_version:
55
+ recorded_at: Tue, 27 Jun 2017 00:01:43 GMT
56
+ - request:
57
+ method: post
58
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits
59
+ body:
60
+ encoding: UTF-8
61
+ string: '{"description":"Confirmation","amount":42,"bsb":"123-123","account_name":"Test","account_number":"012345678","test":true}'
62
+ headers:
63
+ Accept:
64
+ - application/json
65
+ Accept-Encoding:
66
+ - gzip, deflate
67
+ Content-Type:
68
+ - application/json
69
+ Content-Length:
70
+ - '121'
71
+ User-Agent:
72
+ - Ruby
73
+ Authorization:
74
+ - Basic VEVTVDpURVNU
75
+ response:
76
+ status:
77
+ code: 201
78
+ message: Created
79
+ headers:
80
+ Date:
81
+ - Tue, 27 Jun 2017 00:01:44 GMT
82
+ Content-Type:
83
+ - application/json; charset=utf-8
84
+ Transfer-Encoding:
85
+ - chunked
86
+ Connection:
87
+ - keep-alive
88
+ Status:
89
+ - 201 Created
90
+ X-Rack-Cache:
91
+ - invalidate, pass
92
+ Cache-Control:
93
+ - no-store
94
+ X-Request-Version:
95
+ - 1.19.41
96
+ X-Runtime:
97
+ - '0.056564'
98
+ Pragma:
99
+ - no-cache
100
+ X-Request-Id:
101
+ - 9f8d0e5090039bc8d80d5184ab1fe967
102
+ X-Backend:
103
+ - sbox-priv-gateway-a
104
+ body:
105
+ encoding: UTF-8
106
+ string: '{"successful":true,"response":{"id":"071-DD-KPJKWNKK","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-KPJKWNKK","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
107
+ http_version:
108
+ recorded_at: Tue, 27 Jun 2017 00:01:44 GMT
109
+ - request:
110
+ method: get
111
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits?limit=10&offets=0&test=true
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ headers:
116
+ Accept:
117
+ - application/json
118
+ Accept-Encoding:
119
+ - gzip, deflate
120
+ Content-Type:
121
+ - application/json
122
+ User-Agent:
123
+ - Ruby
124
+ Authorization:
125
+ - Basic VEVTVDpURVNU
126
+ response:
127
+ status:
128
+ code: 200
129
+ message: OK
130
+ headers:
131
+ Date:
132
+ - Tue, 27 Jun 2017 00:01:44 GMT
133
+ Content-Type:
134
+ - application/json; charset=utf-8
135
+ Transfer-Encoding:
136
+ - chunked
137
+ Connection:
138
+ - keep-alive
139
+ Status:
140
+ - 200 OK
141
+ Cache-Control:
142
+ - no-store, private
143
+ X-Request-Version:
144
+ - 1.19.41
145
+ Pragma:
146
+ - no-cache
147
+ X-Request-Id:
148
+ - d6372b31ad76a9e32e513b0dcffc761e
149
+ X-Runtime:
150
+ - '0.025099'
151
+ X-Rack-Cache:
152
+ - miss
153
+ X-Backend:
154
+ - sbox-priv-gateway-a
155
+ body:
156
+ encoding: UTF-8
157
+ string: '{"successful":true,"response":[{"id":"071-DD-KPJKWNKK","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-KPJKWNKK","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-TAXICWM9","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-TAXICWM9","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-X2U7DQX5","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-X2U7DQX5","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-3STTD8WL","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-3STTD8WL","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-KBM9K5VJ","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-KBM9K5VJ","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-3S6GT0F3","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-3S6GT0F3","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-ZKGNC1DV","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-ZKGNC1DV","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-F78AHRY9","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-F78AHRY9","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}},{"id":"071-DD-BWOOXELW","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-BWOOXELW","date":"2017-06-27","process_date":null,"status":"Deleted","result":null,"metadata":{}},{"id":"071-DD-O7K8FB3O","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-O7K8FB3O","date":"2017-06-27","process_date":null,"status":"New","result":null,"metadata":{}}],"errors":[],"test":true,"records":10,"total_records":394,"page":1,"total_pages":40}'
158
+ http_version:
159
+ recorded_at: Tue, 27 Jun 2017 00:01:44 GMT
160
+ recorded_with: VCR 3.0.3