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,114 @@
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":"f3b96cd3d1fb74c565102ea44b359e33","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:12 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.238684'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - e73ca29523e943d890b66a810f4a6654
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-IDJ3M2C2","email":null,"reference":"f3b96cd3d1fb74c565102ea44b359e33","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:12+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:12 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"payment_method":"Credit Card","customer":"071-C-IDJ3M2C2","reference":"913db06f35f07eeb52f483fc24795006","setup_fee":0,"amount":100,"start_date":"2015-07-16","frequency":"Weekly","anniversary":5,"total_count":5,"total_amount":500,"test":true}'
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - application/json
68
+ User-Agent:
69
+ - Ruby
70
+ Authorization:
71
+ - Basic VEVTVDpURVNU
72
+ Content-Type:
73
+ - application/json
74
+ response:
75
+ status:
76
+ code: 201
77
+ message: Created
78
+ headers:
79
+ Date:
80
+ - Wed, 05 Jul 2017 05:53:12 GMT
81
+ Content-Type:
82
+ - application/json; charset=utf-8
83
+ Transfer-Encoding:
84
+ - chunked
85
+ Connection:
86
+ - keep-alive
87
+ Status:
88
+ - 201 Created
89
+ X-Rack-Cache:
90
+ - invalidate, pass
91
+ Cache-Control:
92
+ - no-store
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ X-Runtime:
96
+ - '0.239218'
97
+ Pragma:
98
+ - no-cache
99
+ X-Request-Id:
100
+ - 502971cf268bd559c53a577aa54656e4
101
+ X-Backend:
102
+ - sbox-priv-gateway-a
103
+ body:
104
+ encoding: UTF-8
105
+ string: '{"successful":true,"response":{"id":"071-PP-V8G1S7M3","customer":"071-C-IDJ3M2C2","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
106
+ Card","reference":"913db06f35f07eeb52f483fc24795006","description":null,"status":"Active","status_reason":"None","created_at":"2017-07-05T15:53:12+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-609EMYUD","payment_plan":"071-PP-V8G1S7M3","reference":"913db06f35f07eeb52f483fc24795006-0001","amount":100,"currency":null,"scheduled_date":"2017-07-07","payment_method":"Credit
107
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-DYLUS6IY","payment_plan":"071-PP-V8G1S7M3","reference":"913db06f35f07eeb52f483fc24795006-0002","amount":100,"currency":null,"scheduled_date":"2017-07-14","payment_method":"Credit
108
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-NUMGCXJ2","payment_plan":"071-PP-V8G1S7M3","reference":"913db06f35f07eeb52f483fc24795006-0003","amount":100,"currency":null,"scheduled_date":"2017-07-21","payment_method":"Credit
109
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-4GW7YZRC","payment_plan":"071-PP-V8G1S7M3","reference":"913db06f35f07eeb52f483fc24795006-0004","amount":100,"currency":null,"scheduled_date":"2017-07-28","payment_method":"Credit
110
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-CJ0XNFQ6","payment_plan":"071-PP-V8G1S7M3","reference":"913db06f35f07eeb52f483fc24795006-0005","amount":100,"currency":null,"scheduled_date":"2017-08-04","payment_method":"Credit
111
+ Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
112
+ http_version:
113
+ recorded_at: Wed, 05 Jul 2017 05:53:12 GMT
114
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,164 @@
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":"5ab372fcee49026e8a802ec0da62ae89","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:14 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.236349'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - fe54208c1c8843d61911566a1449e604
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-H7TS8KTH","email":null,"reference":"5ab372fcee49026e8a802ec0da62ae89","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:14+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:14 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"payment_method":"Credit Card","customer":"071-C-H7TS8KTH","reference":"6af75e661e202145d5955ed553107e03","setup_fee":0,"amount":100,"start_date":"2015-07-16","frequency":"Weekly","anniversary":5,"total_count":5,"total_amount":500,"test":true}'
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - application/json
68
+ User-Agent:
69
+ - Ruby
70
+ Authorization:
71
+ - Basic VEVTVDpURVNU
72
+ Content-Type:
73
+ - application/json
74
+ response:
75
+ status:
76
+ code: 201
77
+ message: Created
78
+ headers:
79
+ Date:
80
+ - Wed, 05 Jul 2017 05:53:15 GMT
81
+ Content-Type:
82
+ - application/json; charset=utf-8
83
+ Transfer-Encoding:
84
+ - chunked
85
+ Connection:
86
+ - keep-alive
87
+ Status:
88
+ - 201 Created
89
+ Cache-Control:
90
+ - no-store
91
+ X-Request-Version:
92
+ - 1.19.41
93
+ Pragma:
94
+ - no-cache
95
+ X-Request-Id:
96
+ - e8265e6b1f20a7f82321757d535da079
97
+ X-Runtime:
98
+ - '0.179609'
99
+ X-Rack-Cache:
100
+ - invalidate, pass
101
+ X-Backend:
102
+ - sbox-priv-gateway-a
103
+ body:
104
+ encoding: UTF-8
105
+ string: '{"successful":true,"response":{"id":"071-PP-UE8EEDHH","customer":"071-C-H7TS8KTH","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
106
+ Card","reference":"6af75e661e202145d5955ed553107e03","description":null,"status":"Active","status_reason":"None","created_at":"2017-07-05T15:53:15+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-D5CJOC78","payment_plan":"071-PP-UE8EEDHH","reference":"6af75e661e202145d5955ed553107e03-0001","amount":100,"currency":null,"scheduled_date":"2017-07-07","payment_method":"Credit
107
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-1O2L2WIB","payment_plan":"071-PP-UE8EEDHH","reference":"6af75e661e202145d5955ed553107e03-0002","amount":100,"currency":null,"scheduled_date":"2017-07-14","payment_method":"Credit
108
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-T9Y79Q2V","payment_plan":"071-PP-UE8EEDHH","reference":"6af75e661e202145d5955ed553107e03-0003","amount":100,"currency":null,"scheduled_date":"2017-07-21","payment_method":"Credit
109
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-3DC3LS7B","payment_plan":"071-PP-UE8EEDHH","reference":"6af75e661e202145d5955ed553107e03-0004","amount":100,"currency":null,"scheduled_date":"2017-07-28","payment_method":"Credit
110
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-O9Z2PEIT","payment_plan":"071-PP-UE8EEDHH","reference":"6af75e661e202145d5955ed553107e03-0005","amount":100,"currency":null,"scheduled_date":"2017-08-04","payment_method":"Credit
111
+ Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
112
+ http_version:
113
+ recorded_at: Wed, 05 Jul 2017 05:53:15 GMT
114
+ - request:
115
+ method: delete
116
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans/071-PP-UE8EEDHH
117
+ body:
118
+ encoding: UTF-8
119
+ string: '{"test":true}'
120
+ headers:
121
+ Accept-Encoding:
122
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
123
+ Accept:
124
+ - "*/*"
125
+ User-Agent:
126
+ - Ruby
127
+ Authorization:
128
+ - Basic VEVTVDpURVNU
129
+ response:
130
+ status:
131
+ code: 200
132
+ message: OK
133
+ headers:
134
+ Date:
135
+ - Wed, 05 Jul 2017 05:53:15 GMT
136
+ Content-Type:
137
+ - application/json; charset=utf-8
138
+ Transfer-Encoding:
139
+ - chunked
140
+ Connection:
141
+ - keep-alive
142
+ Status:
143
+ - 200 OK
144
+ Cache-Control:
145
+ - no-store
146
+ X-Request-Version:
147
+ - 1.19.41
148
+ Pragma:
149
+ - no-cache
150
+ X-Request-Id:
151
+ - c49fce72ff621287ec697686a55384c7
152
+ X-Runtime:
153
+ - '0.073555'
154
+ X-Rack-Cache:
155
+ - invalidate, pass
156
+ X-Backend:
157
+ - sbox-priv-gateway-a
158
+ body:
159
+ encoding: UTF-8
160
+ string: '{"successful":true,"response":{"id":"071-PP-UE8EEDHH","customer":"071-C-H7TS8KTH","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
161
+ Card","reference":"6af75e661e202145d5955ed553107e03","description":null,"status":"Cancelled","status_reason":"Other","created_at":"2017-07-05T15:53:15+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[]},"errors":[],"test":true}'
162
+ http_version:
163
+ recorded_at: Wed, 05 Jul 2017 05:53:15 GMT
164
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,173 @@
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":"4e86228a390caeae9cc0539bcb7cf5c9","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:13 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ Cache-Control:
38
+ - no-store
39
+ X-Request-Version:
40
+ - 1.19.41
41
+ Pragma:
42
+ - no-cache
43
+ X-Request-Id:
44
+ - 95e34a7798bb4667083f618e25167686
45
+ X-Runtime:
46
+ - '0.244708'
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-C-FMKF946F","email":null,"reference":"4e86228a390caeae9cc0539bcb7cf5c9","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:12+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:13 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"payment_method":"Credit Card","customer":"071-C-FMKF946F","reference":"20f69375858c9564dbc6d7217dccdc54","setup_fee":0,"amount":100,"start_date":"2015-07-16","frequency":"Weekly","anniversary":5,"total_count":5,"total_amount":500,"test":true}'
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - application/json
68
+ User-Agent:
69
+ - Ruby
70
+ Authorization:
71
+ - Basic VEVTVDpURVNU
72
+ Content-Type:
73
+ - application/json
74
+ response:
75
+ status:
76
+ code: 201
77
+ message: Created
78
+ headers:
79
+ Date:
80
+ - Wed, 05 Jul 2017 05:53:13 GMT
81
+ Content-Type:
82
+ - application/json; charset=utf-8
83
+ Transfer-Encoding:
84
+ - chunked
85
+ Connection:
86
+ - keep-alive
87
+ Status:
88
+ - 201 Created
89
+ X-Rack-Cache:
90
+ - invalidate, pass
91
+ Cache-Control:
92
+ - no-store
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ X-Runtime:
96
+ - '0.212614'
97
+ Pragma:
98
+ - no-cache
99
+ X-Request-Id:
100
+ - e5bb93340bad1ffe49ec97d8752b887d
101
+ X-Backend:
102
+ - sbox-priv-gateway-a
103
+ body:
104
+ encoding: UTF-8
105
+ string: '{"successful":true,"response":{"id":"071-PP-NCZ9HFIE","customer":"071-C-FMKF946F","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
106
+ Card","reference":"20f69375858c9564dbc6d7217dccdc54","description":null,"status":"Active","status_reason":"None","created_at":"2017-07-05T15:53:13+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-X9EGEQN0","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0001","amount":100,"currency":null,"scheduled_date":"2017-07-07","payment_method":"Credit
107
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-8GOZTAGN","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0002","amount":100,"currency":null,"scheduled_date":"2017-07-14","payment_method":"Credit
108
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-WU6W0L5D","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0003","amount":100,"currency":null,"scheduled_date":"2017-07-21","payment_method":"Credit
109
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-DYDJVUV9","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0004","amount":100,"currency":null,"scheduled_date":"2017-07-28","payment_method":"Credit
110
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-QU438P6G","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0005","amount":100,"currency":null,"scheduled_date":"2017-08-04","payment_method":"Credit
111
+ Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
112
+ http_version:
113
+ recorded_at: Wed, 05 Jul 2017 05:53:13 GMT
114
+ - request:
115
+ method: get
116
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans/20f69375858c9564dbc6d7217dccdc54?test=true
117
+ body:
118
+ encoding: US-ASCII
119
+ string: ''
120
+ headers:
121
+ Accept-Encoding:
122
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
123
+ Accept:
124
+ - application/json
125
+ User-Agent:
126
+ - Ruby
127
+ Host:
128
+ - gateway.sandbox.fatzebra.com.au
129
+ Authorization:
130
+ - Basic VEVTVDpURVNU
131
+ Content-Type:
132
+ - application/json
133
+ response:
134
+ status:
135
+ code: 200
136
+ message: OK
137
+ headers:
138
+ Date:
139
+ - Wed, 05 Jul 2017 05:53:13 GMT
140
+ Content-Type:
141
+ - application/json; charset=utf-8
142
+ Transfer-Encoding:
143
+ - chunked
144
+ Connection:
145
+ - keep-alive
146
+ Status:
147
+ - 200 OK
148
+ Cache-Control:
149
+ - no-store, private
150
+ X-Request-Version:
151
+ - 1.19.41
152
+ Pragma:
153
+ - no-cache
154
+ X-Request-Id:
155
+ - cd914ae5980a0e53471fac69edd4aaa6
156
+ X-Runtime:
157
+ - '0.032844'
158
+ X-Rack-Cache:
159
+ - miss
160
+ X-Backend:
161
+ - sbox-priv-gateway-a
162
+ body:
163
+ encoding: UTF-8
164
+ string: '{"successful":true,"response":{"id":"071-PP-NCZ9HFIE","customer":"071-C-FMKF946F","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
165
+ Card","reference":"20f69375858c9564dbc6d7217dccdc54","description":null,"status":"Active","status_reason":"None","created_at":"2017-07-05T15:53:13+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-X9EGEQN0","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0001","amount":100,"currency":null,"scheduled_date":"2017-07-07","payment_method":"Credit
166
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-8GOZTAGN","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0002","amount":100,"currency":null,"scheduled_date":"2017-07-14","payment_method":"Credit
167
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-WU6W0L5D","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0003","amount":100,"currency":null,"scheduled_date":"2017-07-21","payment_method":"Credit
168
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-DYDJVUV9","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0004","amount":100,"currency":null,"scheduled_date":"2017-07-28","payment_method":"Credit
169
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-QU438P6G","payment_plan":"071-PP-NCZ9HFIE","reference":"20f69375858c9564dbc6d7217dccdc54-0005","amount":100,"currency":null,"scheduled_date":"2017-08-04","payment_method":"Credit
170
+ Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
171
+ http_version:
172
+ recorded_at: Wed, 05 Jul 2017 05:53:13 GMT
173
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,164 @@
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":"c7c08186c68a397c24975425125b266d","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:13 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.243508'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 9158fd77e3a2a0e151d060c29c86012b
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-ZF1W9GU4","email":null,"reference":"c7c08186c68a397c24975425125b266d","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:13+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:14 GMT
57
+ - request:
58
+ method: post
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"payment_method":"Credit Card","customer":"071-C-ZF1W9GU4","reference":"c31b2948b3f1533fbb04d75267161df0","setup_fee":0,"amount":100,"start_date":"2015-07-16","frequency":"Weekly","anniversary":5,"total_count":5,"total_amount":500,"test":true}'
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - application/json
68
+ User-Agent:
69
+ - Ruby
70
+ Authorization:
71
+ - Basic VEVTVDpURVNU
72
+ Content-Type:
73
+ - application/json
74
+ response:
75
+ status:
76
+ code: 201
77
+ message: Created
78
+ headers:
79
+ Date:
80
+ - Wed, 05 Jul 2017 05:53:14 GMT
81
+ Content-Type:
82
+ - application/json; charset=utf-8
83
+ Transfer-Encoding:
84
+ - chunked
85
+ Connection:
86
+ - keep-alive
87
+ Status:
88
+ - 201 Created
89
+ X-Rack-Cache:
90
+ - invalidate, pass
91
+ Cache-Control:
92
+ - no-store
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ X-Runtime:
96
+ - '0.191678'
97
+ Pragma:
98
+ - no-cache
99
+ X-Request-Id:
100
+ - 81d48e685fa21b1e39ac6872c8a681a2
101
+ X-Backend:
102
+ - sbox-priv-gateway-a
103
+ body:
104
+ encoding: UTF-8
105
+ string: '{"successful":true,"response":{"id":"071-PP-UP9Y4EDT","customer":"071-C-ZF1W9GU4","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
106
+ Card","reference":"c31b2948b3f1533fbb04d75267161df0","description":null,"status":"Active","status_reason":"None","created_at":"2017-07-05T15:53:14+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[{"id":"071-PT-EK52NO6Q","payment_plan":"071-PP-UP9Y4EDT","reference":"c31b2948b3f1533fbb04d75267161df0-0001","amount":100,"currency":null,"scheduled_date":"2017-07-07","payment_method":"Credit
107
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-J1XTKDE3","payment_plan":"071-PP-UP9Y4EDT","reference":"c31b2948b3f1533fbb04d75267161df0-0002","amount":100,"currency":null,"scheduled_date":"2017-07-14","payment_method":"Credit
108
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-CPNABIKX","payment_plan":"071-PP-UP9Y4EDT","reference":"c31b2948b3f1533fbb04d75267161df0-0003","amount":100,"currency":null,"scheduled_date":"2017-07-21","payment_method":"Credit
109
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-KC510O4I","payment_plan":"071-PP-UP9Y4EDT","reference":"c31b2948b3f1533fbb04d75267161df0-0004","amount":100,"currency":null,"scheduled_date":"2017-07-28","payment_method":"Credit
110
+ Card","status":"Scheduled","result":null,"records":[]},{"id":"071-PT-Z936TZ92","payment_plan":"071-PP-UP9Y4EDT","reference":"c31b2948b3f1533fbb04d75267161df0-0005","amount":100,"currency":null,"scheduled_date":"2017-08-04","payment_method":"Credit
111
+ Card","status":"Scheduled","result":null,"records":[]}]},"errors":[],"test":true}'
112
+ http_version:
113
+ recorded_at: Wed, 05 Jul 2017 05:53:14 GMT
114
+ - request:
115
+ method: put
116
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/payment_plans/071-PP-UP9Y4EDT
117
+ body:
118
+ encoding: UTF-8
119
+ string: '{"new_status":"Suspended","test":true}'
120
+ headers:
121
+ Accept-Encoding:
122
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
123
+ Accept:
124
+ - "*/*"
125
+ User-Agent:
126
+ - Ruby
127
+ Authorization:
128
+ - Basic VEVTVDpURVNU
129
+ response:
130
+ status:
131
+ code: 200
132
+ message: OK
133
+ headers:
134
+ Date:
135
+ - Wed, 05 Jul 2017 05:53:14 GMT
136
+ Content-Type:
137
+ - application/json; charset=utf-8
138
+ Transfer-Encoding:
139
+ - chunked
140
+ Connection:
141
+ - keep-alive
142
+ Status:
143
+ - 200 OK
144
+ Cache-Control:
145
+ - no-store
146
+ X-Request-Version:
147
+ - 1.19.41
148
+ Pragma:
149
+ - no-cache
150
+ X-Request-Id:
151
+ - 3d8a8ee47186778c3ebe66643a61d570
152
+ X-Runtime:
153
+ - '0.116309'
154
+ X-Rack-Cache:
155
+ - invalidate, pass
156
+ X-Backend:
157
+ - sbox-priv-gateway-a
158
+ body:
159
+ encoding: UTF-8
160
+ string: '{"successful":true,"response":{"id":"071-PP-UP9Y4EDT","customer":"071-C-ZF1W9GU4","amount":100,"currency":null,"setup_fee":0,"frequency":"Weekly","anniversary":5,"start_date":"2015-07-16","end_date":null,"total_count":5,"total_amount":500,"payment_method":"Credit
161
+ Card","reference":"c31b2948b3f1533fbb04d75267161df0","description":null,"status":"Suspended","status_reason":"Other","created_at":"2017-07-05T15:53:14+10:00","failed_payment_fee":0,"retry_interval":3,"status_change_date":null,"payments":[]},"errors":[],"test":true}'
162
+ http_version:
163
+ recorded_at: Wed, 05 Jul 2017 05:53:14 GMT
164
+ recorded_with: VCR 3.0.3