fat_zebra 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,108 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"first_name":"Harrold","last_name":"Humphries","reference":"e00dfaee3373629acc64dc9758470a69","email":"hhump@test.com","ip_address":"180.200.33.181","card":{"card_holder":"Harrold
9
+ Humphries Senior","card_number":"5123456789012346","expiry_date":"05/2023","cvv":"123"},"address":{"address":"1
10
+ Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"test":true}'
11
+ headers:
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - application/json
16
+ User-Agent:
17
+ - Ruby
18
+ Authorization:
19
+ - Basic VEVTVDpURVNU
20
+ Content-Type:
21
+ - application/json
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 05 Jul 2017 05:53:10 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ X-Rack-Cache:
38
+ - invalidate, pass
39
+ Cache-Control:
40
+ - no-store
41
+ X-Request-Version:
42
+ - 1.19.41
43
+ X-Runtime:
44
+ - '0.252738'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - aca071cfd37f6a7074facd7ab99a30a2
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-NE9OB4VK","email":null,"reference":"e00dfaee3373629acc64dc9758470a69","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:10+10:00","address":{"address":"1
54
+ Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"fke86c5u","card_number":"512345XXXXXX2346","bank_account":null,"metadata":{}},"errors":[],"test":true}'
55
+ http_version:
56
+ recorded_at: Wed, 05 Jul 2017 05:53:10 GMT
57
+ - request:
58
+ method: put
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers/071-C-NE9OB4VK
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"first_name":"New Name","test":true}'
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - "*/*"
68
+ User-Agent:
69
+ - Ruby
70
+ Authorization:
71
+ - Basic VEVTVDpURVNU
72
+ response:
73
+ status:
74
+ code: 200
75
+ message: OK
76
+ headers:
77
+ Date:
78
+ - Wed, 05 Jul 2017 05:53:10 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
+ - 680be84916df8219a8de592c4e50a4a7
95
+ X-Runtime:
96
+ - '0.042649'
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":{"id":"071-C-NE9OB4VK","email":null,"reference":"e00dfaee3373629acc64dc9758470a69","first_name":"New
104
+ Name","last_name":"Humphries","created_at":"2017-07-05T15:53:10+10:00","address":{"address":"1
105
+ Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"fke86c5u","card_number":"512345XXXXXX2346","bank_account":null,"metadata":{}},"errors":[],"test":true}'
106
+ http_version:
107
+ recorded_at: Wed, 05 Jul 2017 05:53:10 GMT
108
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_credits
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-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
+ - Wed, 05 Jul 2017 05:53:11 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
+ 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.049425'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - 704d5359c11ba20be415098266eba248
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"id":"071-DC-T5P3FP29","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DC-T5P3FP29","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
54
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,103 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_credits
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-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
+ - Wed, 05 Jul 2017 05:53:11 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.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - f73b7155d979b76c144df15a094d03c1
43
+ X-Runtime:
44
+ - '0.039465'
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":{"id":"071-DC-L0AYVFOX","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DC-L0AYVFOX","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
54
+ - request:
55
+ method: delete
56
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_credits/071-DC-L0AYVFOX
57
+ body:
58
+ encoding: UTF-8
59
+ string: '{"test":true}'
60
+ headers:
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - "*/*"
65
+ User-Agent:
66
+ - Ruby
67
+ Authorization:
68
+ - Basic VEVTVDpURVNU
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Date:
75
+ - Wed, 05 Jul 2017 05:53:11 GMT
76
+ Content-Type:
77
+ - application/json; charset=utf-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ Status:
83
+ - 200 OK
84
+ X-Rack-Cache:
85
+ - invalidate, pass
86
+ Cache-Control:
87
+ - no-store
88
+ X-Request-Version:
89
+ - 1.19.41
90
+ X-Runtime:
91
+ - '0.041924'
92
+ Pragma:
93
+ - no-cache
94
+ X-Request-Id:
95
+ - c46c8fa53e38f150eeb93970f7d660ed
96
+ X-Backend:
97
+ - sbox-priv-gateway-a
98
+ body:
99
+ encoding: UTF-8
100
+ string: '{"successful":true,"response":{"id":"071-DC-L0AYVFOX","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DC-L0AYVFOX","date":"2017-07-05","process_date":null,"status":"Deleted","result":null,"metadata":{}},"errors":[],"test":true}'
101
+ http_version:
102
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
103
+ 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_credits
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-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
+ - Wed, 05 Jul 2017 05:53:11 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.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - c26d65b87995566bfe9b131d11122b26
43
+ X-Runtime:
44
+ - '0.051379'
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":{"id":"071-DC-WAMS7AK0","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DC-WAMS7AK0","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
54
+ - request:
55
+ method: get
56
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_credits/071-DC-WAMS7AK0?test=true
57
+ body:
58
+ encoding: US-ASCII
59
+ string: ''
60
+ headers:
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - application/json
65
+ User-Agent:
66
+ - Ruby
67
+ Host:
68
+ - gateway.sandbox.fatzebra.com.au
69
+ Authorization:
70
+ - Basic VEVTVDpURVNU
71
+ Content-Type:
72
+ - application/json
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Date:
79
+ - Wed, 05 Jul 2017 05:53:11 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.017889'
96
+ Pragma:
97
+ - no-cache
98
+ X-Request-Id:
99
+ - 80a490a29810dabf70d41de3962b0d33
100
+ X-Backend:
101
+ - sbox-priv-gateway-a
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"successful":true,"response":{"id":"071-DC-WAMS7AK0","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DC-WAMS7AK0","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
107
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,54 @@
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-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
+ - Wed, 05 Jul 2017 05:53:11 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.19.41
39
+ Pragma:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - 52274c4f797bdd96d75777a9c8b05e27
43
+ X-Runtime:
44
+ - '0.040800'
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":{"id":"071-DD-LNJL3V21","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-LNJL3V21","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
54
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,103 @@
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-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
+ - Wed, 05 Jul 2017 05:53:12 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
+ 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.038247'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - daf1a6b2a8574edfe9a90e4965441697
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"id":"071-DD-IH3S23MZ","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-IH3S23MZ","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:12 GMT
54
+ - request:
55
+ method: delete
56
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits/071-DD-IH3S23MZ
57
+ body:
58
+ encoding: UTF-8
59
+ string: '{"test":true}'
60
+ headers:
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - "*/*"
65
+ User-Agent:
66
+ - Ruby
67
+ Authorization:
68
+ - Basic VEVTVDpURVNU
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Date:
75
+ - Wed, 05 Jul 2017 05:53:12 GMT
76
+ Content-Type:
77
+ - application/json; charset=utf-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ Status:
83
+ - 200 OK
84
+ Cache-Control:
85
+ - no-store
86
+ X-Request-Version:
87
+ - 1.19.41
88
+ Pragma:
89
+ - no-cache
90
+ X-Request-Id:
91
+ - 9ce6788d9ac4e1571533477b2104f2d4
92
+ X-Runtime:
93
+ - '0.022322'
94
+ X-Rack-Cache:
95
+ - invalidate, pass
96
+ X-Backend:
97
+ - sbox-priv-gateway-a
98
+ body:
99
+ encoding: UTF-8
100
+ string: '{"successful":true,"response":{"id":"071-DD-IH3S23MZ","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-IH3S23MZ","date":"2017-07-05","process_date":null,"status":"Deleted","result":null,"metadata":{}},"errors":[],"test":true}'
101
+ http_version:
102
+ recorded_at: Wed, 05 Jul 2017 05:53:12 GMT
103
+ 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-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
+ - Wed, 05 Jul 2017 05:53:11 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
+ 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.042880'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - 99d3ff81a3f683b2ad3e5802abcb6fb7
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"id":"071-DD-Z2GHY24C","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-Z2GHY24C","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
52
+ http_version:
53
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
54
+ - request:
55
+ method: get
56
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/direct_debits/071-DD-Z2GHY24C?test=true
57
+ body:
58
+ encoding: US-ASCII
59
+ string: ''
60
+ headers:
61
+ Accept-Encoding:
62
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
+ Accept:
64
+ - application/json
65
+ User-Agent:
66
+ - Ruby
67
+ Host:
68
+ - gateway.sandbox.fatzebra.com.au
69
+ Authorization:
70
+ - Basic VEVTVDpURVNU
71
+ Content-Type:
72
+ - application/json
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Date:
79
+ - Wed, 05 Jul 2017 05:53:11 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
+ Cache-Control:
89
+ - no-store, private
90
+ X-Request-Version:
91
+ - 1.19.41
92
+ Pragma:
93
+ - no-cache
94
+ X-Request-Id:
95
+ - 099bc02fa3d909a2f19b68e8d6776c21
96
+ X-Runtime:
97
+ - '0.024677'
98
+ X-Rack-Cache:
99
+ - miss
100
+ X-Backend:
101
+ - sbox-priv-gateway-a
102
+ body:
103
+ encoding: UTF-8
104
+ string: '{"successful":true,"response":{"id":"071-DD-Z2GHY24C","amount":42.0,"bsb":"123-123","account_number":"012345678","account_name":"Test","description":"Confirmation","reference":"071-DD-Z2GHY24C","date":"2017-07-05","process_date":null,"status":"New","result":null,"metadata":{}},"errors":[],"test":true}'
105
+ http_version:
106
+ recorded_at: Wed, 05 Jul 2017 05:53:11 GMT
107
+ recorded_with: VCR 3.0.3