fat_zebra_multi 3.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +0 -0
  4. data/.rubocop.yml +44 -0
  5. data/.travis.yml +10 -0
  6. data/Gemfile +4 -0
  7. data/README.md +104 -0
  8. data/Rakefile +11 -0
  9. data/fat_zebra_multi.gemspec +27 -0
  10. data/lib/fat_zebra.rb +65 -0
  11. data/lib/fat_zebra/api_helper.rb +91 -0
  12. data/lib/fat_zebra/api_operation/delete.rb +38 -0
  13. data/lib/fat_zebra/api_operation/find.rb +30 -0
  14. data/lib/fat_zebra/api_operation/save.rb +67 -0
  15. data/lib/fat_zebra/api_operation/search.rb +39 -0
  16. data/lib/fat_zebra/api_operation/void.rb +52 -0
  17. data/lib/fat_zebra/api_resource.rb +88 -0
  18. data/lib/fat_zebra/bank_account.rb +20 -0
  19. data/lib/fat_zebra/batch.rb +60 -0
  20. data/lib/fat_zebra/card.rb +23 -0
  21. data/lib/fat_zebra/config.rb +90 -0
  22. data/lib/fat_zebra/customer.rb +26 -0
  23. data/lib/fat_zebra/direct_credit.rb +26 -0
  24. data/lib/fat_zebra/direct_debit.rb +26 -0
  25. data/lib/fat_zebra/errors.rb +37 -0
  26. data/lib/fat_zebra/fat_zebra_object.rb +68 -0
  27. data/lib/fat_zebra/information.rb +29 -0
  28. data/lib/fat_zebra/object_helper.rb +119 -0
  29. data/lib/fat_zebra/payment_plan.rb +61 -0
  30. data/lib/fat_zebra/purchase.rb +96 -0
  31. data/lib/fat_zebra/refund.rb +27 -0
  32. data/lib/fat_zebra/request.rb +174 -0
  33. data/lib/fat_zebra/request/multipart/epilogue.rb +23 -0
  34. data/lib/fat_zebra/request/multipart/file_io.rb +40 -0
  35. data/lib/fat_zebra/request/multipart/param.rb +37 -0
  36. data/lib/fat_zebra/request/multipart/part.rb +28 -0
  37. data/lib/fat_zebra/request/multipart/stream.rb +57 -0
  38. data/lib/fat_zebra/util.rb +71 -0
  39. data/lib/fat_zebra/validation.rb +67 -0
  40. data/lib/fat_zebra/version.rb +3 -0
  41. data/lib/fat_zebra/web_hook.rb +22 -0
  42. data/spec/cassettes/FatZebra_BankAccount/_create/1_1_1.yml +53 -0
  43. data/spec/cassettes/FatZebra_BankAccount/_create/1_1_2.yml +53 -0
  44. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_1.yml +164 -0
  45. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_2.yml +164 -0
  46. data/spec/cassettes/FatZebra_BankAccount/_search/1_2_3.yml +164 -0
  47. data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_1.yml +61 -0
  48. data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_2.yml +61 -0
  49. data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_1.yml +61 -0
  50. data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_2.yml +61 -0
  51. data/spec/cassettes/FatZebra_Batch/_find/1_2_1.yml +112 -0
  52. data/spec/cassettes/FatZebra_Batch/_find/1_2_2.yml +112 -0
  53. data/spec/cassettes/FatZebra_Batch/_result/1_4_1.yml +163 -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 +54 -0
  58. data/spec/cassettes/FatZebra_Card/_create/1_1_2.yml +54 -0
  59. data/spec/cassettes/FatZebra_Card/_create/1_1_3.yml +54 -0
  60. data/spec/cassettes/FatZebra_Card/_create/1_1_4.yml +54 -0
  61. data/spec/cassettes/FatZebra_Card/_create/1_1_5.yml +54 -0
  62. data/spec/cassettes/FatZebra_Card/_create/1_1_6.yml +54 -0
  63. data/spec/cassettes/FatZebra_Card/_update/1_2_1.yml +105 -0
  64. data/spec/cassettes/FatZebra_Card/_update/1_2_2.yml +105 -0
  65. data/spec/cassettes/FatZebra_Card/_update/1_2_3.yml +105 -0
  66. data/spec/cassettes/FatZebra_Card/_update/validations/1_2_4_1.yml +54 -0
  67. data/spec/cassettes/FatZebra_Customer/_create/1_1_1.yml +55 -0
  68. data/spec/cassettes/FatZebra_Customer/_create/1_1_2.yml +55 -0
  69. data/spec/cassettes/FatZebra_Customer/_create/1_1_3.yml +55 -0
  70. data/spec/cassettes/FatZebra_Customer/_create/1_1_4.yml +55 -0
  71. data/spec/cassettes/FatZebra_Customer/_create/1_1_5.yml +55 -0
  72. data/spec/cassettes/FatZebra_Customer/_create/1_1_6.yml +55 -0
  73. data/spec/cassettes/FatZebra_Customer/_delete/1_5_1.yml +103 -0
  74. data/spec/cassettes/FatZebra_Customer/_find/1_3_1.yml +107 -0
  75. data/spec/cassettes/FatZebra_Customer/_find/1_3_2.yml +107 -0
  76. data/spec/cassettes/FatZebra_Customer/_search/1_2_1.yml +60 -0
  77. data/spec/cassettes/FatZebra_Customer/_search/1_2_2.yml +60 -0
  78. data/spec/cassettes/FatZebra_Customer/_search/1_2_3.yml +60 -0
  79. data/spec/cassettes/FatZebra_Customer/_update/1_4_1.yml +106 -0
  80. data/spec/cassettes/FatZebra_Customer/_update/1_4_2.yml +106 -0
  81. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_1.yml +52 -0
  82. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_2.yml +52 -0
  83. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_3.yml +52 -0
  84. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_4.yml +52 -0
  85. data/spec/cassettes/FatZebra_DirectCredit/_create/validations/valid/1_1_5_1_1.yml +52 -0
  86. data/spec/cassettes/FatZebra_DirectCredit/_delete/1_4_1.yml +99 -0
  87. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_1.yml +103 -0
  88. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_2.yml +103 -0
  89. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_3.yml +103 -0
  90. data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_1.yml +152 -0
  91. data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_2.yml +152 -0
  92. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_1.yml +52 -0
  93. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_2.yml +52 -0
  94. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_3.yml +52 -0
  95. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_4.yml +52 -0
  96. data/spec/cassettes/FatZebra_DirectDebit/_create/validations/valid/1_1_5_1_1.yml +52 -0
  97. data/spec/cassettes/FatZebra_DirectDebit/_delete/1_4_1.yml +99 -0
  98. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_1.yml +103 -0
  99. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_2.yml +103 -0
  100. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_3.yml +103 -0
  101. data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_1.yml +152 -0
  102. data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_2.yml +152 -0
  103. data/spec/cassettes/FatZebra_Information/_ping/1_1_1.yml +54 -0
  104. data/spec/cassettes/FatZebra_Information/_ping/1_1_2.yml +54 -0
  105. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_1.yml +222 -0
  106. data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_2.yml +222 -0
  107. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_1.yml +110 -0
  108. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_2.yml +110 -0
  109. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_3.yml +110 -0
  110. data/spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_1.yml +158 -0
  111. data/spec/cassettes/FatZebra_PaymentPlan/_destroy/1_6_1.yml +158 -0
  112. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_1.yml +167 -0
  113. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_2.yml +167 -0
  114. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_3.yml +167 -0
  115. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_1.yml +166 -0
  116. data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_2.yml +166 -0
  117. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_1.yml +160 -0
  118. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_2.yml +160 -0
  119. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_3.yml +160 -0
  120. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_1.yml +166 -0
  121. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_2.yml +166 -0
  122. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_1.yml +115 -0
  123. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_2.yml +115 -0
  124. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_3.yml +115 -0
  125. data/spec/cassettes/FatZebra_Purchase/_create/1_1_1.yml +53 -0
  126. data/spec/cassettes/FatZebra_Purchase/_create/1_1_10.yml +53 -0
  127. data/spec/cassettes/FatZebra_Purchase/_create/1_1_11.yml +53 -0
  128. data/spec/cassettes/FatZebra_Purchase/_create/1_1_12.yml +53 -0
  129. data/spec/cassettes/FatZebra_Purchase/_create/1_1_13.yml +53 -0
  130. data/spec/cassettes/FatZebra_Purchase/_create/1_1_2.yml +53 -0
  131. data/spec/cassettes/FatZebra_Purchase/_create/1_1_3.yml +53 -0
  132. data/spec/cassettes/FatZebra_Purchase/_create/1_1_4.yml +53 -0
  133. data/spec/cassettes/FatZebra_Purchase/_create/1_1_5.yml +53 -0
  134. data/spec/cassettes/FatZebra_Purchase/_create/1_1_6.yml +53 -0
  135. data/spec/cassettes/FatZebra_Purchase/_create/1_1_7.yml +53 -0
  136. data/spec/cassettes/FatZebra_Purchase/_create/1_1_8.yml +53 -0
  137. data/spec/cassettes/FatZebra_Purchase/_create/1_1_9.yml +53 -0
  138. data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_1.yml +55 -0
  139. data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_2.yml +55 -0
  140. data/spec/cassettes/FatZebra_Purchase/_find/1_2_1.yml +117 -0
  141. data/spec/cassettes/FatZebra_Purchase/_find/1_2_2.yml +117 -0
  142. data/spec/cassettes/FatZebra_Purchase/_find/1_2_3.yml +117 -0
  143. data/spec/cassettes/FatZebra_Purchase/_find/1_2_4.yml +117 -0
  144. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_1.yml +115 -0
  145. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_2.yml +115 -0
  146. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_3.yml +115 -0
  147. data/spec/cassettes/FatZebra_Purchase/_search/1_3_1.yml +164 -0
  148. data/spec/cassettes/FatZebra_Purchase/_search/1_3_2.yml +164 -0
  149. data/spec/cassettes/FatZebra_Purchase/_search/1_3_3.yml +164 -0
  150. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_1.yml +652 -0
  151. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_2.yml +652 -0
  152. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_3.yml +652 -0
  153. data/spec/cassettes/FatZebra_Purchase/_void/1_6_1.yml +103 -0
  154. data/spec/cassettes/FatZebra_Purchase/_void/1_6_2.yml +103 -0
  155. data/spec/cassettes/FatZebra_Purchase/_void/1_6_3.yml +103 -0
  156. data/spec/cassettes/FatZebra_Purchase/_void/1_6_4.yml +103 -0
  157. data/spec/cassettes/FatZebra_Purchase/_void/1_7_1.yml +103 -0
  158. data/spec/cassettes/FatZebra_Purchase/_void/1_7_2.yml +103 -0
  159. data/spec/cassettes/FatZebra_Purchase/_void/1_7_3.yml +103 -0
  160. data/spec/cassettes/FatZebra_Purchase/_void/1_7_4.yml +103 -0
  161. data/spec/cassettes/FatZebra_Refund/_create/1_1_1.yml +103 -0
  162. data/spec/cassettes/FatZebra_Refund/_create/1_1_10.yml +103 -0
  163. data/spec/cassettes/FatZebra_Refund/_create/1_1_2.yml +103 -0
  164. data/spec/cassettes/FatZebra_Refund/_create/1_1_3.yml +103 -0
  165. data/spec/cassettes/FatZebra_Refund/_create/1_1_4.yml +103 -0
  166. data/spec/cassettes/FatZebra_Refund/_create/1_1_5.yml +103 -0
  167. data/spec/cassettes/FatZebra_Refund/_create/1_1_6.yml +103 -0
  168. data/spec/cassettes/FatZebra_Refund/_create/1_1_7.yml +103 -0
  169. data/spec/cassettes/FatZebra_Refund/_create/1_1_8.yml +103 -0
  170. data/spec/cassettes/FatZebra_Refund/_create/1_1_9.yml +103 -0
  171. data/spec/cassettes/FatZebra_Refund/_find/1_2_1.yml +155 -0
  172. data/spec/cassettes/FatZebra_Refund/_find/1_2_2.yml +155 -0
  173. data/spec/cassettes/FatZebra_Refund/_find/1_2_3.yml +155 -0
  174. data/spec/cassettes/FatZebra_Refund/_search/responds_with_the_newly-created_refunds.yml +214 -0
  175. data/spec/cassettes/FatZebra_Refund/_void/1_4_1.yml +153 -0
  176. data/spec/cassettes/FatZebra_Refund/_void/1_4_2.yml +153 -0
  177. data/spec/cassettes/FatZebra_Refund/_void/1_4_3.yml +153 -0
  178. data/spec/cassettes/FatZebra_Refund/_void/1_4_4.yml +153 -0
  179. data/spec/cassettes/FatZebra_WebHook/_create/1_1_1.yml +53 -0
  180. data/spec/cassettes/FatZebra_WebHook/_create/1_1_2.yml +53 -0
  181. data/spec/cassettes/FatZebra_WebHook/_create/1_1_3.yml +53 -0
  182. data/spec/cassettes/FatZebra_WebHook/_delete/1_4_1.yml +101 -0
  183. data/spec/cassettes/FatZebra_WebHook/_search/1_2_1.yml +298 -0
  184. data/spec/cassettes/FatZebra_WebHook/_search/1_2_2.yml +300 -0
  185. data/spec/cassettes/FatZebra_WebHook/_update/1_3_1.yml +104 -0
  186. data/spec/cassettes/FatZebra_WebHook/_update/1_3_2.yml +104 -0
  187. data/spec/cassettes/Multiple_accounts/The_basics/1_1_5.yml +59 -0
  188. data/spec/cassettes/Multiple_accounts/The_basics/1_1_6.yml +59 -0
  189. data/spec/fixtures/batch_test.csv +4 -0
  190. data/spec/lib/fat_zebra/api_resource_spec.rb +25 -0
  191. data/spec/lib/fat_zebra/bank_account_spec.rb +34 -0
  192. data/spec/lib/fat_zebra/batch_spec.rb +59 -0
  193. data/spec/lib/fat_zebra/card_spec.rb +41 -0
  194. data/spec/lib/fat_zebra/config_spec.rb +69 -0
  195. data/spec/lib/fat_zebra/customer_spec.rb +53 -0
  196. data/spec/lib/fat_zebra/direct_credit_spec.rb +74 -0
  197. data/spec/lib/fat_zebra/direct_debit_spec.rb +74 -0
  198. data/spec/lib/fat_zebra/fat_zebra_object_spec.rb +117 -0
  199. data/spec/lib/fat_zebra/information_spec.rb +13 -0
  200. data/spec/lib/fat_zebra/multiple_accounts_spec.rb +69 -0
  201. data/spec/lib/fat_zebra/payment_plan_spec.rb +94 -0
  202. data/spec/lib/fat_zebra/purchase_spec.rb +105 -0
  203. data/spec/lib/fat_zebra/refund_spec.rb +95 -0
  204. data/spec/lib/fat_zebra/request_spec.rb +59 -0
  205. data/spec/lib/fat_zebra/util_spec.rb +43 -0
  206. data/spec/lib/fat_zebra/validation_spec.rb +22 -0
  207. data/spec/lib/fat_zebra/web_hook_spec.rb +50 -0
  208. data/spec/spec_helper.rb +68 -0
  209. data/spec/support/payloads.rb +43 -0
  210. data/vendor/cacert.pem +3390 -0
  211. metadata +338 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","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: 201
23
+ message: Created
24
+ headers:
25
+ Date:
26
+ - Mon, 29 Apr 2019 09:16:37 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 201 Created
35
+ Cache-Control:
36
+ - no-store
37
+ X-Request-Version:
38
+ - 1.16.9-3941@c1d8236
39
+ X-Runtime:
40
+ - '0.036864'
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - 06bc41f8a0a10f04c901776c
45
+ X-Backend:
46
+ - sbox-priv-gateway-a
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"successful":true,"response":{"id":"071-B-2M5V5CKZ","account_name":"Test
50
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:37+10:00"},"errors":[],"test":true}'
51
+ http_version:
52
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
53
+ - request:
54
+ method: post
55
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
59
+ headers:
60
+ Accept-Encoding:
61
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
62
+ Accept:
63
+ - application/json
64
+ User-Agent:
65
+ - Ruby
66
+ Authorization:
67
+ - Basic VEVTVDpURVNU
68
+ Content-Type:
69
+ - application/json
70
+ response:
71
+ status:
72
+ code: 201
73
+ message: Created
74
+ headers:
75
+ Date:
76
+ - Mon, 29 Apr 2019 09:16:37 GMT
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ Transfer-Encoding:
80
+ - chunked
81
+ Connection:
82
+ - keep-alive
83
+ Status:
84
+ - 201 Created
85
+ Cache-Control:
86
+ - no-store
87
+ X-Request-Version:
88
+ - 1.16.9-3941@c1d8236
89
+ X-Runtime:
90
+ - '0.038643'
91
+ Pragma:
92
+ - no-cache
93
+ X-Request-Id:
94
+ - 63b0ba58292807544afe12c0
95
+ X-Backend:
96
+ - sbox-priv-gateway-a
97
+ body:
98
+ encoding: UTF-8
99
+ string: '{"successful":true,"response":{"id":"071-B-5RE5YL03","account_name":"Test
100
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:37+10:00"},"errors":[],"test":true}'
101
+ http_version:
102
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
103
+ - request:
104
+ method: get
105
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts?limit=10&offset=0&test=true
106
+ body:
107
+ encoding: US-ASCII
108
+ string: ''
109
+ headers:
110
+ Accept-Encoding:
111
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
112
+ Accept:
113
+ - application/json
114
+ User-Agent:
115
+ - Ruby
116
+ Host:
117
+ - gateway.sandbox.fatzebra.com.au
118
+ Authorization:
119
+ - Basic VEVTVDpURVNU
120
+ Content-Type:
121
+ - application/json
122
+ response:
123
+ status:
124
+ code: 200
125
+ message: OK
126
+ headers:
127
+ Date:
128
+ - Mon, 29 Apr 2019 09:16:37 GMT
129
+ Content-Type:
130
+ - application/json; charset=utf-8
131
+ Transfer-Encoding:
132
+ - chunked
133
+ Connection:
134
+ - keep-alive
135
+ Status:
136
+ - 200 OK
137
+ Cache-Control:
138
+ - no-store
139
+ X-Request-Version:
140
+ - 1.16.9-3941@c1d8236
141
+ X-Runtime:
142
+ - '0.031986'
143
+ Pragma:
144
+ - no-cache
145
+ X-Request-Id:
146
+ - b600730b51521b2aacf3dcbf
147
+ X-Backend:
148
+ - sbox-priv-gateway-a
149
+ body:
150
+ encoding: UTF-8
151
+ string: '{"successful":true,"response":[{"id":"071-B-5RE5YL03","account_name":"Test
152
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:37+10:00"},{"id":"071-B-2M5V5CKZ","account_name":"Test
153
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:37+10:00"},{"id":"071-B-4EKGYJU6","account_name":"Test
154
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-D2KTTBC2","account_name":"Test
155
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-HKVNN1S7","account_name":"Test
156
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SVV00D45","account_name":"Test
157
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-VKNWPPF6","account_name":"Test
158
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SI80AR5J","account_name":"Test
159
+ name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-BSJIIRMH","account_name":"Client
160
+ Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:45:26+10:00"},{"id":"071-B-E7TA7XAT","account_name":"Client
161
+ Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:31:17+10:00"}],"errors":[],"test":true,"records":10,"total_records":15232,"page":0,"total_pages":1524}'
162
+ http_version:
163
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
164
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/BATCH-v1-PURCHASE-TEST-20190429-d1348b2d0b4b751ab80db4337b62839d.csv
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"BATCH-v1-PURCHASE-TEST-20190429-d1348b2d0b4b751ab80db4337b62839d.csv\";
9
+ filename=\"BATCH-v1-PURCHASE-TEST-20190429-d1348b2d0b4b751ab80db4337b62839d.csv\"\r\nContent-Length:
10
+ \r\nContent-Type: text/csv\r\nContent-Transfer-Encoding: binary\r\n\r\n1000,AUD,Order12345,John
11
+ Doe 1,4444333322221111,12/2020,,Gizmo ABC 1\n2051,AUD,Order22345,John Doe
12
+ 2,4444333322221111,12/2020,,Gizmo ABC 2\n3000,AUD,Order32345,John Doe 3,4444333322221111,12/2020,,Gizmo
13
+ ABC 3\n4000,AUD,Order42345,John Doe 4,4444333322221111,12/2020,,Gizmo ABC
14
+ 4\n\r\n------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nBATCH-v1-PURCHASE-TEST-20190429-d1348b2d0b4b751ab80db4337b62839d.csv------FatZebraMultipartPost\r\nContent-Disposition:
15
+ form-data; name=\"test\"\r\n\r\ntrue------FatZebraMultipartPost--\r\n"
16
+ headers:
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ User-Agent:
22
+ - Ruby
23
+ Authorization:
24
+ - Basic VEVTVDpURVNU
25
+ Content-Length:
26
+ - '835'
27
+ Content-Type:
28
+ - multipart/form-data; boundary=----FatZebraMultipartPost
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Date:
35
+ - Mon, 29 Apr 2019 09:16:37 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Connection:
41
+ - keep-alive
42
+ Status:
43
+ - 201 Created
44
+ Cache-Control:
45
+ - no-store
46
+ X-Request-Version:
47
+ - 1.16.9-3941@c1d8236
48
+ X-Runtime:
49
+ - '0.142416'
50
+ Pragma:
51
+ - no-cache
52
+ X-Request-Id:
53
+ - 2164722329b81bafaba97052
54
+ X-Backend:
55
+ - sbox-priv-gateway-a
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"successful":true,"response":{"id":"071-BF-T8U7V6UT","filename":"BATCH-v1-PURCHASE-TEST-20190429-d1348b2d0b4b751ab80db4337b62839d.csv","created_at":"2019-04-29T19:16:37+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"d1348b2d0b4b751ab80db4337b62839d"},"errors":[],"test":false}'
59
+ http_version:
60
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
61
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/BATCH-v1-PURCHASE-TEST-20190429-68ed4c5d1d68590a83a6883bd5288984.csv
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"BATCH-v1-PURCHASE-TEST-20190429-68ed4c5d1d68590a83a6883bd5288984.csv\";
9
+ filename=\"BATCH-v1-PURCHASE-TEST-20190429-68ed4c5d1d68590a83a6883bd5288984.csv\"\r\nContent-Length:
10
+ \r\nContent-Type: text/csv\r\nContent-Transfer-Encoding: binary\r\n\r\n1000,AUD,Order12345,John
11
+ Doe 1,4444333322221111,12/2020,,Gizmo ABC 1\n2051,AUD,Order22345,John Doe
12
+ 2,4444333322221111,12/2020,,Gizmo ABC 2\n3000,AUD,Order32345,John Doe 3,4444333322221111,12/2020,,Gizmo
13
+ ABC 3\n4000,AUD,Order42345,John Doe 4,4444333322221111,12/2020,,Gizmo ABC
14
+ 4\n\r\n------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nBATCH-v1-PURCHASE-TEST-20190429-68ed4c5d1d68590a83a6883bd5288984.csv------FatZebraMultipartPost\r\nContent-Disposition:
15
+ form-data; name=\"test\"\r\n\r\ntrue------FatZebraMultipartPost--\r\n"
16
+ headers:
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ User-Agent:
22
+ - Ruby
23
+ Authorization:
24
+ - Basic VEVTVDpURVNU
25
+ Content-Length:
26
+ - '835'
27
+ Content-Type:
28
+ - multipart/form-data; boundary=----FatZebraMultipartPost
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Date:
35
+ - Mon, 29 Apr 2019 09:16:37 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Connection:
41
+ - keep-alive
42
+ Status:
43
+ - 201 Created
44
+ Cache-Control:
45
+ - no-store
46
+ X-Request-Version:
47
+ - 1.16.9-3941@c1d8236
48
+ X-Runtime:
49
+ - '0.097505'
50
+ Pragma:
51
+ - no-cache
52
+ X-Request-Id:
53
+ - ea833b655c6005a46a20ba76
54
+ X-Backend:
55
+ - sbox-priv-gateway-a
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"successful":true,"response":{"id":"071-BF-7EASJE9I","filename":"BATCH-v1-PURCHASE-TEST-20190429-68ed4c5d1d68590a83a6883bd5288984.csv","created_at":"2019-04-29T19:16:37+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"68ed4c5d1d68590a83a6883bd5288984"},"errors":[],"test":false}'
59
+ http_version:
60
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
61
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/BATCH-v1-PURCHASE-TEST-20190429-e6c52165c040834df09a36e316fab7c9.csv
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nBATCH-v1-PURCHASE-TEST-20190429-e6c52165c040834df09a36e316fab7c9.csv------FatZebraMultipartPost\r\nContent-Disposition:
9
+ form-data; name=\"BATCH-v1-PURCHASE-TEST-20190429-e6c52165c040834df09a36e316fab7c9.csv\";
10
+ filename=\"BATCH-v1-PURCHASE-TEST-20190429-e6c52165c040834df09a36e316fab7c9.csv\"\r\nContent-Length:
11
+ \r\nContent-Type: text/csv\r\nContent-Transfer-Encoding: binary\r\n\r\n1000,AUD,Order12345,John
12
+ Doe 1,4444333322221111,12/2020,,Gizmo ABC 1\n2051,AUD,Order22345,John Doe
13
+ 2,4444333322221111,12/2020,,Gizmo ABC 2\n3000,AUD,Order32345,John Doe 3,4444333322221111,12/2020,,Gizmo
14
+ ABC 3\n4000,AUD,Order42345,John Doe 4,4444333322221111,12/2020,,Gizmo ABC
15
+ 4\n\r\n------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"test\"\r\n\r\ntrue------FatZebraMultipartPost--\r\n"
16
+ headers:
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ User-Agent:
22
+ - Ruby
23
+ Authorization:
24
+ - Basic VEVTVDpURVNU
25
+ Content-Length:
26
+ - '835'
27
+ Content-Type:
28
+ - multipart/form-data; boundary=----FatZebraMultipartPost
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Date:
35
+ - Mon, 29 Apr 2019 09:16:37 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Connection:
41
+ - keep-alive
42
+ Status:
43
+ - 201 Created
44
+ Cache-Control:
45
+ - no-store
46
+ X-Request-Version:
47
+ - 1.16.9-3941@c1d8236
48
+ X-Runtime:
49
+ - '0.140717'
50
+ Pragma:
51
+ - no-cache
52
+ X-Request-Id:
53
+ - 830e86c8feaebe8f81022f20
54
+ X-Backend:
55
+ - sbox-priv-gateway-a
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"successful":true,"response":{"id":"071-BF-R2WSJQGM","filename":"BATCH-v1-PURCHASE-TEST-20190429-e6c52165c040834df09a36e316fab7c9.csv","created_at":"2019-04-29T19:16:37+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"e6c52165c040834df09a36e316fab7c9"},"errors":[],"test":false}'
59
+ http_version:
60
+ recorded_at: Mon, 29 Apr 2019 09:16:37 GMT
61
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/BATCH-v1-PURCHASE-TEST-20190429-b2aa5a5a325b043f2e044e862afc3215.csv
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nBATCH-v1-PURCHASE-TEST-20190429-b2aa5a5a325b043f2e044e862afc3215.csv------FatZebraMultipartPost\r\nContent-Disposition:
9
+ form-data; name=\"BATCH-v1-PURCHASE-TEST-20190429-b2aa5a5a325b043f2e044e862afc3215.csv\";
10
+ filename=\"BATCH-v1-PURCHASE-TEST-20190429-b2aa5a5a325b043f2e044e862afc3215.csv\"\r\nContent-Length:
11
+ \r\nContent-Type: text/csv\r\nContent-Transfer-Encoding: binary\r\n\r\n1000,AUD,Order12345,John
12
+ Doe 1,4444333322221111,12/2020,,Gizmo ABC 1\n2051,AUD,Order22345,John Doe
13
+ 2,4444333322221111,12/2020,,Gizmo ABC 2\n3000,AUD,Order32345,John Doe 3,4444333322221111,12/2020,,Gizmo
14
+ ABC 3\n4000,AUD,Order42345,John Doe 4,4444333322221111,12/2020,,Gizmo ABC
15
+ 4\n\r\n------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"test\"\r\n\r\ntrue------FatZebraMultipartPost--\r\n"
16
+ headers:
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ User-Agent:
22
+ - Ruby
23
+ Authorization:
24
+ - Basic VEVTVDpURVNU
25
+ Content-Length:
26
+ - '835'
27
+ Content-Type:
28
+ - multipart/form-data; boundary=----FatZebraMultipartPost
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Date:
35
+ - Mon, 29 Apr 2019 09:16:38 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Connection:
41
+ - keep-alive
42
+ Status:
43
+ - 201 Created
44
+ Cache-Control:
45
+ - no-store
46
+ X-Request-Version:
47
+ - 1.16.9-3941@c1d8236
48
+ X-Runtime:
49
+ - '0.094806'
50
+ Pragma:
51
+ - no-cache
52
+ X-Request-Id:
53
+ - 224cac923b2e3c8fa5861c76
54
+ X-Backend:
55
+ - sbox-priv-gateway-a
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"successful":true,"response":{"id":"071-BF-E568PT00","filename":"BATCH-v1-PURCHASE-TEST-20190429-b2aa5a5a325b043f2e044e862afc3215.csv","created_at":"2019-04-29T19:16:38+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"b2aa5a5a325b043f2e044e862afc3215"},"errors":[],"test":false}'
59
+ http_version:
60
+ recorded_at: Mon, 29 Apr 2019 09:16:38 GMT
61
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,112 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/BATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"BATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv\";
9
+ filename=\"BATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv\"\r\nContent-Length:
10
+ \r\nContent-Type: text/csv\r\nContent-Transfer-Encoding: binary\r\n\r\n1000,AUD,Order12345,John
11
+ Doe 1,4444333322221111,12/2020,,Gizmo ABC 1\n2051,AUD,Order22345,John Doe
12
+ 2,4444333322221111,12/2020,,Gizmo ABC 2\n3000,AUD,Order32345,John Doe 3,4444333322221111,12/2020,,Gizmo
13
+ ABC 3\n4000,AUD,Order42345,John Doe 4,4444333322221111,12/2020,,Gizmo ABC
14
+ 4\n\r\n------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nBATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv------FatZebraMultipartPost\r\nContent-Disposition:
15
+ form-data; name=\"test\"\r\n\r\ntrue------FatZebraMultipartPost--\r\n"
16
+ headers:
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ User-Agent:
22
+ - Ruby
23
+ Authorization:
24
+ - Basic VEVTVDpURVNU
25
+ Content-Length:
26
+ - '835'
27
+ Content-Type:
28
+ - multipart/form-data; boundary=----FatZebraMultipartPost
29
+ response:
30
+ status:
31
+ code: 201
32
+ message: Created
33
+ headers:
34
+ Date:
35
+ - Mon, 29 Apr 2019 09:16:38 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8
38
+ Transfer-Encoding:
39
+ - chunked
40
+ Connection:
41
+ - keep-alive
42
+ Status:
43
+ - 201 Created
44
+ Cache-Control:
45
+ - no-store
46
+ X-Request-Version:
47
+ - 1.16.9-3941@c1d8236
48
+ X-Runtime:
49
+ - '0.094179'
50
+ Pragma:
51
+ - no-cache
52
+ X-Request-Id:
53
+ - 616099b298d57f59d4e000ec
54
+ X-Backend:
55
+ - sbox-priv-gateway-a
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"successful":true,"response":{"id":"071-BF-1YWLB49L","filename":"BATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv","created_at":"2019-04-29T19:16:38+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"8b1e43145aff17bfd876abb8f676bb6c"},"errors":[],"test":false}'
59
+ http_version:
60
+ recorded_at: Mon, 29 Apr 2019 09:16:38 GMT
61
+ - request:
62
+ method: get
63
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/8b1e43145aff17bfd876abb8f676bb6c?test=true
64
+ body:
65
+ encoding: US-ASCII
66
+ string: ''
67
+ headers:
68
+ Accept-Encoding:
69
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
70
+ Accept:
71
+ - application/json
72
+ User-Agent:
73
+ - Ruby
74
+ Host:
75
+ - gateway.sandbox.fatzebra.com.au
76
+ Authorization:
77
+ - Basic VEVTVDpURVNU
78
+ Content-Type:
79
+ - application/json
80
+ response:
81
+ status:
82
+ code: 200
83
+ message: OK
84
+ headers:
85
+ Date:
86
+ - Mon, 29 Apr 2019 09:16:38 GMT
87
+ Content-Type:
88
+ - application/json; charset=utf-8
89
+ Transfer-Encoding:
90
+ - chunked
91
+ Connection:
92
+ - keep-alive
93
+ Status:
94
+ - 200 OK
95
+ Cache-Control:
96
+ - no-store
97
+ X-Request-Version:
98
+ - 1.16.9-3941@c1d8236
99
+ X-Runtime:
100
+ - '0.016571'
101
+ Pragma:
102
+ - no-cache
103
+ X-Request-Id:
104
+ - a5b06e572efbd1ebbf7e7cc4
105
+ X-Backend:
106
+ - sbox-priv-gateway-a
107
+ body:
108
+ encoding: UTF-8
109
+ string: '{"successful":true,"response":{"id":"071-BF-1YWLB49L","filename":"BATCH-v1-PURCHASE-TEST-20190429-8b1e43145aff17bfd876abb8f676bb6c.csv","created_at":"2019-04-29T19:16:38+10:00","process_date":"2019-04-29","start_date":null,"completed_date":null,"status":"Ingesting","type":"PURCHASE","reference":"8b1e43145aff17bfd876abb8f676bb6c"},"errors":[],"test":true}'
110
+ http_version:
111
+ recorded_at: Mon, 29 Apr 2019 09:16:38 GMT
112
+ recorded_with: VCR 3.0.3