fat_zebra 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -1
  3. data/fat_zebra.gemspec +4 -4
  4. data/lib/fat_zebra/api_helper.rb +95 -0
  5. data/lib/fat_zebra/api_operation/find.rb +18 -11
  6. data/lib/fat_zebra/api_operation/save.rb +2 -2
  7. data/lib/fat_zebra/api_operation/search.rb +19 -12
  8. data/lib/fat_zebra/api_operation/void.rb +1 -1
  9. data/lib/fat_zebra/api_resource.rb +7 -73
  10. data/lib/fat_zebra/bank_account.rb +1 -2
  11. data/lib/fat_zebra/batch.rb +5 -3
  12. data/lib/fat_zebra/card.rb +5 -4
  13. data/lib/fat_zebra/config.rb +31 -18
  14. data/lib/fat_zebra/customer.rb +2 -3
  15. data/lib/fat_zebra/direct_credit.rb +2 -3
  16. data/lib/fat_zebra/direct_debit.rb +2 -3
  17. data/lib/fat_zebra/errors.rb +22 -4
  18. data/lib/fat_zebra/fat_zebra_object.rb +4 -115
  19. data/lib/fat_zebra/object_helper.rb +118 -0
  20. data/lib/fat_zebra/payment_plan.rb +1 -2
  21. data/lib/fat_zebra/purchase.rb +3 -6
  22. data/lib/fat_zebra/refund.rb +2 -4
  23. data/lib/fat_zebra/request.rb +12 -8
  24. data/lib/fat_zebra/util.rb +17 -1
  25. data/lib/fat_zebra/version.rb +1 -1
  26. data/lib/fat_zebra/web_hook.rb +1 -2
  27. data/lib/fat_zebra.rb +2 -0
  28. data/spec/cassettes/FatZebra_BankAccount/_create/1_1_3.yml +55 -0
  29. data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_3.yml +65 -0
  30. data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_3.yml +65 -0
  31. data/spec/cassettes/FatZebra_Batch/_find/1_2_3.yml +118 -0
  32. data/spec/cassettes/FatZebra_Card/_create/1_1_7.yml +55 -0
  33. data/spec/cassettes/FatZebra_Card/_update/1_2_4.yml +105 -0
  34. data/spec/cassettes/FatZebra_Card/_update/validations/1_2_5_1.yml +55 -0
  35. data/spec/cassettes/FatZebra_Customer/_create/1_1_7.yml +57 -0
  36. data/spec/cassettes/FatZebra_Customer/_delete/1_5_2.yml +107 -0
  37. data/spec/cassettes/FatZebra_Customer/_find/1_3_3.yml +111 -0
  38. data/spec/cassettes/FatZebra_Customer/_update/1_4_3.yml +108 -0
  39. data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_5.yml +54 -0
  40. data/spec/cassettes/FatZebra_DirectCredit/_delete/1_4_2.yml +103 -0
  41. data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_3.yml +107 -0
  42. data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_5.yml +54 -0
  43. data/spec/cassettes/FatZebra_DirectDebit/_delete/1_4_2.yml +103 -0
  44. data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_3.yml +107 -0
  45. data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_4.yml +114 -0
  46. data/spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_2.yml +164 -0
  47. data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_4.yml +173 -0
  48. data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_4.yml +164 -0
  49. data/spec/cassettes/FatZebra_Purchase/_capture/1_5_3.yml +107 -0
  50. data/spec/cassettes/FatZebra_Purchase/_capture/1_6_3.yml +107 -0
  51. data/spec/cassettes/FatZebra_Purchase/_create/1_1_13.yml +55 -0
  52. data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_1.yml +57 -0
  53. data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_2.yml +57 -0
  54. data/spec/cassettes/FatZebra_Purchase/_find/1_2_4.yml +109 -0
  55. data/spec/cassettes/FatZebra_Purchase/_find/1_3_1.yml +109 -0
  56. data/spec/cassettes/FatZebra_Purchase/_find/1_3_2.yml +109 -0
  57. data/spec/cassettes/FatZebra_Purchase/_find/1_3_3.yml +109 -0
  58. data/spec/cassettes/FatZebra_Purchase/_find/1_3_4.yml +109 -0
  59. data/spec/cassettes/FatZebra_Purchase/_refund/1_4_3.yml +107 -0
  60. data/spec/cassettes/FatZebra_Purchase/_refund/1_5_3.yml +107 -0
  61. data/spec/cassettes/FatZebra_Purchase/_search/1_3_4.yml +170 -0
  62. data/spec/cassettes/FatZebra_Purchase/_search/1_4_1.yml +170 -0
  63. data/spec/cassettes/FatZebra_Purchase/_search/1_4_2.yml +170 -0
  64. data/spec/cassettes/FatZebra_Purchase/_search/1_4_3.yml +170 -0
  65. data/spec/cassettes/FatZebra_Purchase/_search/1_4_4.yml +170 -0
  66. data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_4.yml +842 -0
  67. data/spec/cassettes/FatZebra_Purchase/_settlement/1_9_1.yml +828 -0
  68. data/spec/cassettes/FatZebra_Purchase/_settlement/1_9_2.yml +830 -0
  69. data/spec/cassettes/FatZebra_Purchase/_settlement/1_9_3.yml +832 -0
  70. data/spec/cassettes/FatZebra_Purchase/_settlement/1_9_4.yml +834 -0
  71. data/spec/cassettes/FatZebra_Purchase/_void/1_6_4.yml +107 -0
  72. data/spec/cassettes/FatZebra_Purchase/_void/1_7_4.yml +107 -0
  73. data/spec/cassettes/FatZebra_Purchase/_void/1_8_1.yml +107 -0
  74. data/spec/cassettes/FatZebra_Purchase/_void/1_8_2.yml +107 -0
  75. data/spec/cassettes/FatZebra_Purchase/_void/1_8_3.yml +107 -0
  76. data/spec/cassettes/FatZebra_Purchase/_void/1_8_4.yml +107 -0
  77. data/spec/cassettes/FatZebra_Refund/_create/1_1_10.yml +107 -0
  78. data/spec/cassettes/FatZebra_Refund/_find/1_2_3.yml +161 -0
  79. data/spec/cassettes/FatZebra_Refund/_void/1_4_4.yml +159 -0
  80. data/spec/cassettes/FatZebra_WebHook/_create/1_1_4.yml +55 -0
  81. data/spec/cassettes/FatZebra_WebHook/_delete/1_4_2.yml +105 -0
  82. data/spec/cassettes/FatZebra_WebHook/_update/1_3_3.yml +106 -0
  83. data/spec/lib/fat_zebra/bank_account_spec.rb +2 -2
  84. data/spec/lib/fat_zebra/batch_spec.rb +4 -4
  85. data/spec/lib/fat_zebra/card_spec.rb +2 -2
  86. data/spec/lib/fat_zebra/config_spec.rb +22 -4
  87. data/spec/lib/fat_zebra/customer_spec.rb +5 -5
  88. data/spec/lib/fat_zebra/direct_credit_spec.rb +4 -4
  89. data/spec/lib/fat_zebra/direct_debit_spec.rb +4 -4
  90. data/spec/lib/fat_zebra/fat_zebra_object_spec.rb +3 -2
  91. data/spec/lib/fat_zebra/payment_plan_spec.rb +4 -4
  92. data/spec/lib/fat_zebra/purchase_spec.rb +16 -3
  93. data/spec/lib/fat_zebra/refund_spec.rb +5 -2
  94. data/spec/lib/fat_zebra/util_spec.rb +5 -0
  95. data/spec/lib/fat_zebra/web_hook_spec.rb +4 -4
  96. data/spec/spec_helper.rb +1 -1
  97. metadata +76 -19
@@ -0,0 +1,107 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/purchases
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"amount":10000,"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"reference":"1a0070f70f4d1bd1d80d08dcff9fcb59","customer_ip":"1.2.3.4","currency":"AUD","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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:16 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
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.336153'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - 1d0acb004065502c3f0b2934442cb59d
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"authorization":"486885","id":"071-P-210D4310","card_number":"512345XXXXXX2346","card_holder":"Matthew
52
+ Savage","card_expiry":"2030-02-28","card_token":"fke86c5u","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","amount":10000,"decimal_amount":100.0,"successful":true,"message":"Approved","reference":"1a0070f70f4d1bd1d80d08dcff9fcb59","currency":"AUD","transaction_id":"071-P-210D4310","settlement_date":"2017-07-05","transaction_date":"2017-07-05T15:53:16+10:00","response_code":"00","captured":true,"captured_amount":10000,"rrn":"071P210D4310","cvv_match":"M","metadata":{},"addendum_data":{}},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:16 GMT
55
+ - request:
56
+ method: post
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/refunds
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"transaction_id":"071-P-210D4310","amount":10000,"reference":"1a0070f70f4d1bd1d80d08dcff9fcb59","test":true}'
61
+ headers:
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - application/json
66
+ User-Agent:
67
+ - Ruby
68
+ Authorization:
69
+ - Basic VEVTVDpURVNU
70
+ Content-Type:
71
+ - application/json
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Wed, 05 Jul 2017 05:53:16 GMT
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Status:
86
+ - 200 OK
87
+ Cache-Control:
88
+ - no-store
89
+ X-Request-Version:
90
+ - 1.19.41
91
+ Pragma:
92
+ - no-cache
93
+ X-Request-Id:
94
+ - fbf5c94163b425b3028a249ce45b5ff6
95
+ X-Runtime:
96
+ - '0.147003'
97
+ X-Rack-Cache:
98
+ - invalidate, pass
99
+ X-Backend:
100
+ - sbox-priv-gateway-a
101
+ body:
102
+ encoding: UTF-8
103
+ string: '{"successful":true,"response":{"authorization":1499233996,"id":"071-R-RXC43DLL","amount":10000,"refunded":"Approved","message":"Approved","card_holder":"Matthew
104
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","transaction_id":"071-R-RXC43DLL","reference":"1a0070f70f4d1bd1d80d08dcff9fcb59","currency":"AUD","successful":true,"transaction_date":"2017-07-05T15:53:16+10:00","response_code":"00","settlement_date":"2017-07-06","metadata":{},"standalone":false,"rrn":"071RRXC43DLL"},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Wed, 05 Jul 2017 05:53:16 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,161 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/purchases
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"amount":10000,"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"reference":"ee5a81bdbcc1d22858e7d1f6adadbb3e","customer_ip":"1.2.3.4","currency":"AUD","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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:17 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
35
+ Cache-Control:
36
+ - no-store
37
+ X-Request-Version:
38
+ - 1.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - 7fad81a1250e0a2705450179c47513c8
43
+ X-Runtime:
44
+ - '0.382646'
45
+ X-Rack-Cache:
46
+ - invalidate, pass
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"authorization":"472059","id":"071-P-LUNCRKAC","card_number":"512345XXXXXX2346","card_holder":"Matthew
52
+ Savage","card_expiry":"2030-02-28","card_token":"fke86c5u","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","amount":10000,"decimal_amount":100.0,"successful":true,"message":"Approved","reference":"ee5a81bdbcc1d22858e7d1f6adadbb3e","currency":"AUD","transaction_id":"071-P-LUNCRKAC","settlement_date":"2017-07-05","transaction_date":"2017-07-05T15:53:17+10:00","response_code":"00","captured":true,"captured_amount":10000,"rrn":"071PLUNCRKAC","cvv_match":"M","metadata":{},"addendum_data":{}},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:17 GMT
55
+ - request:
56
+ method: post
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/refunds
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"transaction_id":"071-P-LUNCRKAC","amount":10000,"reference":"ee5a81bdbcc1d22858e7d1f6adadbb3e","test":true}'
61
+ headers:
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - application/json
66
+ User-Agent:
67
+ - Ruby
68
+ Authorization:
69
+ - Basic VEVTVDpURVNU
70
+ Content-Type:
71
+ - application/json
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Wed, 05 Jul 2017 05:53:17 GMT
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Status:
86
+ - 200 OK
87
+ Cache-Control:
88
+ - no-store
89
+ X-Request-Version:
90
+ - 1.19.41
91
+ Pragma:
92
+ - no-cache
93
+ X-Request-Id:
94
+ - ffb5a2eeca88b05220d2f043ac770665
95
+ X-Runtime:
96
+ - '0.173219'
97
+ X-Rack-Cache:
98
+ - invalidate, pass
99
+ X-Backend:
100
+ - sbox-priv-gateway-a
101
+ body:
102
+ encoding: UTF-8
103
+ string: '{"successful":true,"response":{"authorization":1499233997,"id":"071-R-JS4KU89V","amount":10000,"refunded":"Approved","message":"Approved","card_holder":"Matthew
104
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","transaction_id":"071-R-JS4KU89V","reference":"ee5a81bdbcc1d22858e7d1f6adadbb3e","currency":"AUD","successful":true,"transaction_date":"2017-07-05T15:53:17+10:00","response_code":"00","settlement_date":"2017-07-06","metadata":{},"standalone":false,"rrn":"071RJS4KU89V"},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Wed, 05 Jul 2017 05:53:17 GMT
107
+ - request:
108
+ method: get
109
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/refunds/ee5a81bdbcc1d22858e7d1f6adadbb3e?test=true
110
+ body:
111
+ encoding: US-ASCII
112
+ string: ''
113
+ headers:
114
+ Accept-Encoding:
115
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
116
+ Accept:
117
+ - application/json
118
+ User-Agent:
119
+ - Ruby
120
+ Host:
121
+ - gateway.sandbox.fatzebra.com.au
122
+ Authorization:
123
+ - Basic VEVTVDpURVNU
124
+ Content-Type:
125
+ - application/json
126
+ response:
127
+ status:
128
+ code: 200
129
+ message: OK
130
+ headers:
131
+ Date:
132
+ - Wed, 05 Jul 2017 05:53:17 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
+ X-Rack-Cache:
142
+ - miss
143
+ Cache-Control:
144
+ - no-store, private
145
+ X-Request-Version:
146
+ - 1.19.41
147
+ X-Runtime:
148
+ - '0.024820'
149
+ Pragma:
150
+ - no-cache
151
+ X-Request-Id:
152
+ - 14fb9f40620851470cffcb96ea1e6ab5
153
+ X-Backend:
154
+ - sbox-priv-gateway-a
155
+ body:
156
+ encoding: UTF-8
157
+ string: '{"successful":true,"response":{"authorization":"1499233997","id":"071-R-JS4KU89V","amount":10000,"refunded":"Approved","message":"Approved","card_holder":"Matthew
158
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","transaction_id":"071-R-JS4KU89V","reference":"ee5a81bdbcc1d22858e7d1f6adadbb3e","currency":"AUD","successful":true,"transaction_date":"2017-07-05T15:53:17+10:00","response_code":"00","settlement_date":"2017-07-06","metadata":{},"standalone":false,"rrn":"071RJS4KU89V"},"errors":[],"test":true}'
159
+ http_version:
160
+ recorded_at: Wed, 05 Jul 2017 05:53:17 GMT
161
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,159 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/purchases
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"amount":10000,"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"reference":"72e79fd0baad3ca310d792317affb031","customer_ip":"1.2.3.4","currency":"AUD","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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:18 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
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.356636'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - 558bc103b44cf9b270772402b3e6d377
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"authorization":"541948","id":"071-P-MAL6PO97","card_number":"512345XXXXXX2346","card_holder":"Matthew
52
+ Savage","card_expiry":"2030-02-28","card_token":"fke86c5u","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","amount":10000,"decimal_amount":100.0,"successful":true,"message":"Approved","reference":"72e79fd0baad3ca310d792317affb031","currency":"AUD","transaction_id":"071-P-MAL6PO97","settlement_date":"2017-07-05","transaction_date":"2017-07-05T15:53:18+10:00","response_code":"00","captured":true,"captured_amount":10000,"rrn":"071PMAL6PO97","cvv_match":"M","metadata":{},"addendum_data":{}},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
55
+ - request:
56
+ method: post
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/refunds
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"transaction_id":"071-P-MAL6PO97","amount":10000,"reference":"72e79fd0baad3ca310d792317affb031","test":true}'
61
+ headers:
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - application/json
66
+ User-Agent:
67
+ - Ruby
68
+ Authorization:
69
+ - Basic VEVTVDpURVNU
70
+ Content-Type:
71
+ - application/json
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Wed, 05 Jul 2017 05:53:18 GMT
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Status:
86
+ - 200 OK
87
+ Cache-Control:
88
+ - no-store
89
+ X-Request-Version:
90
+ - 1.19.41
91
+ Pragma:
92
+ - no-cache
93
+ X-Request-Id:
94
+ - 3257f42d45f6d2a2f4bbb972ea085d37
95
+ X-Runtime:
96
+ - '0.170452'
97
+ X-Rack-Cache:
98
+ - invalidate, pass
99
+ X-Backend:
100
+ - sbox-priv-gateway-a
101
+ body:
102
+ encoding: UTF-8
103
+ string: '{"successful":true,"response":{"authorization":1499233998,"id":"071-R-X6JLYZEA","amount":10000,"refunded":"Approved","message":"Approved","card_holder":"Matthew
104
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","transaction_id":"071-R-X6JLYZEA","reference":"72e79fd0baad3ca310d792317affb031","currency":"AUD","successful":true,"transaction_date":"2017-07-05T15:53:18+10:00","response_code":"00","settlement_date":"2017-07-06","metadata":{},"standalone":false,"rrn":"071RX6JLYZEA"},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
107
+ - request:
108
+ method: post
109
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/refunds/void
110
+ body:
111
+ encoding: UTF-8
112
+ string: '{"id":"071-R-X6JLYZEA","test":true}'
113
+ headers:
114
+ Accept-Encoding:
115
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
116
+ Accept:
117
+ - application/json
118
+ User-Agent:
119
+ - Ruby
120
+ Authorization:
121
+ - Basic VEVTVDpURVNU
122
+ Content-Type:
123
+ - application/json
124
+ response:
125
+ status:
126
+ code: 200
127
+ message: OK
128
+ headers:
129
+ Date:
130
+ - Wed, 05 Jul 2017 05:53:18 GMT
131
+ Content-Type:
132
+ - application/json; charset=utf-8
133
+ Transfer-Encoding:
134
+ - chunked
135
+ Connection:
136
+ - keep-alive
137
+ Status:
138
+ - 200 OK
139
+ Cache-Control:
140
+ - no-store
141
+ X-Request-Version:
142
+ - 1.19.41
143
+ Pragma:
144
+ - no-cache
145
+ X-Request-Id:
146
+ - 5fdd7a9f9c722ec2b0ffa9be5feb929e
147
+ X-Runtime:
148
+ - '0.049105'
149
+ X-Rack-Cache:
150
+ - invalidate, pass
151
+ X-Backend:
152
+ - sbox-priv-gateway-a
153
+ body:
154
+ encoding: UTF-8
155
+ string: '{"successful":true,"response":{"authorization":"1499233998","id":"071-R-X6JLYZEA","amount":10000,"refunded":"Voided","message":"Voided","card_holder":"Matthew
156
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","transaction_id":"071-R-X6JLYZEA","reference":"72e79fd0baad3ca310d792317affb031","currency":"AUD","successful":false,"transaction_date":"2017-07-05T15:53:18+10:00","response_code":"99","settlement_date":"2017-07-06","metadata":{},"standalone":false,"rrn":"071RX6JLYZEA"},"errors":[],"test":true}'
157
+ http_version:
158
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
159
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,55 @@
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-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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:18 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
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.032935'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - cab68bef7cf57159872053ca9a4c8145
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ 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
52
+ hook","id":"071-WH-KM1PM2R7"},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
55
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,105 @@
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-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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:19 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
35
+ Cache-Control:
36
+ - no-store
37
+ X-Request-Version:
38
+ - 1.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - e6b13d3e528c74cf63966e90fa6362d5
43
+ X-Runtime:
44
+ - '0.031537'
45
+ X-Rack-Cache:
46
+ - invalidate, pass
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ 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
52
+ hook","id":"071-WH-E7YKEP55"},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:19 GMT
55
+ - request:
56
+ method: delete
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks/071-WH-E7YKEP55
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"test":true}'
61
+ headers:
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - "*/*"
66
+ User-Agent:
67
+ - Ruby
68
+ Authorization:
69
+ - Basic VEVTVDpURVNU
70
+ response:
71
+ status:
72
+ code: 200
73
+ message: OK
74
+ headers:
75
+ Date:
76
+ - Wed, 05 Jul 2017 05:53:19 GMT
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ Transfer-Encoding:
80
+ - chunked
81
+ Connection:
82
+ - keep-alive
83
+ Status:
84
+ - 200 OK
85
+ X-Rack-Cache:
86
+ - invalidate, pass
87
+ Cache-Control:
88
+ - no-store
89
+ X-Request-Version:
90
+ - 1.19.41
91
+ X-Runtime:
92
+ - '0.028846'
93
+ Pragma:
94
+ - no-cache
95
+ X-Request-Id:
96
+ - 0460a484c3690b9890e5f0c7ad6e005f
97
+ X-Backend:
98
+ - sbox-priv-gateway-a
99
+ body:
100
+ encoding: UTF-8
101
+ 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
102
+ hook","id":"071-WH-E7YKEP55"},"errors":[],"test":true}'
103
+ http_version:
104
+ recorded_at: Wed, 05 Jul 2017 05:53:19 GMT
105
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,106 @@
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-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: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Wed, 05 Jul 2017 05:53:18 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Status:
34
+ - 200 OK
35
+ Cache-Control:
36
+ - no-store
37
+ X-Request-Version:
38
+ - 1.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - 6b7044739366cad9e49b5bfa03d5326e
43
+ X-Runtime:
44
+ - '0.032269'
45
+ X-Rack-Cache:
46
+ - invalidate, pass
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ 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
52
+ hook","id":"071-WH-EQH5STTK"},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
55
+ - request:
56
+ method: put
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/web_hooks/071-WH-EQH5STTK
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"address":"http://stage.example.com.au/v1/api/hook_listener","events":"*","mode":"Test","authentication_username":null,"authentication_password":"","is_active":null,"name":"test
61
+ hook","id":"071-WH-EQH5STTK","name":"New Test hook","test":true}'
62
+ headers:
63
+ Accept-Encoding:
64
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
+ Accept:
66
+ - "*/*"
67
+ User-Agent:
68
+ - Ruby
69
+ Authorization:
70
+ - Basic VEVTVDpURVNU
71
+ response:
72
+ status:
73
+ code: 200
74
+ message: OK
75
+ headers:
76
+ Date:
77
+ - Wed, 05 Jul 2017 05:53:18 GMT
78
+ Content-Type:
79
+ - application/json; charset=utf-8
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ Status:
85
+ - 200 OK
86
+ X-Rack-Cache:
87
+ - invalidate, pass
88
+ Cache-Control:
89
+ - no-store
90
+ X-Request-Version:
91
+ - 1.19.41
92
+ X-Runtime:
93
+ - '0.033478'
94
+ Pragma:
95
+ - no-cache
96
+ X-Request-Id:
97
+ - 7a0edc39e9bfd6183157d092110b15e6
98
+ X-Backend:
99
+ - sbox-priv-gateway-a
100
+ body:
101
+ encoding: UTF-8
102
+ 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":"New
103
+ Test hook","id":"071-WH-EQH5STTK"},"errors":[],"test":true}'
104
+ http_version:
105
+ recorded_at: Wed, 05 Jul 2017 05:53:18 GMT
106
+ recorded_with: VCR 3.0.3