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,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches
6
+ body:
7
+ encoding: UTF-8
8
+ string: "------FatZebraMultipartPost\r\nContent-Disposition: form-data; name=\"BATCH-v1-PURCHASE-TEST-20170705-084a65b79f5908142324dd6c717a17a8.csv\";
9
+ filename=\"BATCH-v1-PURCHASE-TEST-20170705-084a65b79f5908142324dd6c717a17a8.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-20170705-084a65b79f5908142324dd6c717a17a8.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
+ - Wed, 05 Jul 2017 05:53:08 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
+ X-Rack-Cache:
45
+ - invalidate, pass
46
+ Cache-Control:
47
+ - no-store
48
+ X-Request-Version:
49
+ - 1.19.41
50
+ X-Runtime:
51
+ - '0.056840'
52
+ Pragma:
53
+ - no-cache
54
+ X-Purge-File:
55
+ - 'false'
56
+ X-Request-Id:
57
+ - 603050a83c2d676c05fc051657306765
58
+ X-Backend:
59
+ - sbox-priv-gateway-a
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"successful":true,"response":{"id":"071-BF-JJKU6GK2","filename":"BATCH-v1-PURCHASE-TEST-20170705-084a65b79f5908142324dd6c717a17a8.csv","created_at":"2017-07-05T15:53:08+10:00","process_date":"2017-07-05","start_date":null,"completed_date":null,"status":"New","type":"PURCHASE","reference":"084a65b79f5908142324dd6c717a17a8"},"errors":[],"test":false}'
63
+ http_version:
64
+ recorded_at: Wed, 05 Jul 2017 05:53:08 GMT
65
+ - request:
66
+ method: get
67
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/batches/084a65b79f5908142324dd6c717a17a8?test=true
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ''
71
+ headers:
72
+ Accept-Encoding:
73
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
74
+ Accept:
75
+ - application/json
76
+ User-Agent:
77
+ - Ruby
78
+ Host:
79
+ - gateway.sandbox.fatzebra.com.au
80
+ Authorization:
81
+ - Basic VEVTVDpURVNU
82
+ Content-Type:
83
+ - application/json
84
+ response:
85
+ status:
86
+ code: 200
87
+ message: OK
88
+ headers:
89
+ Date:
90
+ - Wed, 05 Jul 2017 05:53:08 GMT
91
+ Content-Type:
92
+ - application/json; charset=utf-8
93
+ Transfer-Encoding:
94
+ - chunked
95
+ Connection:
96
+ - keep-alive
97
+ Status:
98
+ - 200 OK
99
+ Cache-Control:
100
+ - no-store, private
101
+ X-Request-Version:
102
+ - 1.19.41
103
+ Pragma:
104
+ - no-cache
105
+ X-Request-Id:
106
+ - 8d9f493e024e693a84daa3c4237b0d45
107
+ X-Runtime:
108
+ - '0.023834'
109
+ X-Rack-Cache:
110
+ - miss
111
+ X-Backend:
112
+ - sbox-priv-gateway-a
113
+ body:
114
+ encoding: UTF-8
115
+ string: '{"successful":true,"response":{"id":"071-BF-JJKU6GK2","filename":"BATCH-v1-PURCHASE-TEST-20170705-084a65b79f5908142324dd6c717a17a8.csv","created_at":"2017-07-05T15:53:08+10:00","process_date":"2017-07-05","start_date":null,"completed_date":null,"status":"IngestError","type":"PURCHASE","reference":"084a65b79f5908142324dd6c717a17a8"},"errors":[],"test":true}'
116
+ http_version:
117
+ recorded_at: Wed, 05 Jul 2017 05:53:08 GMT
118
+ 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/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"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:08 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.218749'
43
+ Pragma:
44
+ - no-cache
45
+ X-Request-Id:
46
+ - fd166a5cf04cbdb58e3c5e54f50bbf45
47
+ X-Backend:
48
+ - sbox-priv-gateway-a
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"successful":true,"response":{"token":"fke86c5u","card_holder":"Matthew
52
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28T23:59:59+11:00","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","authorized":true,"transaction_count":1013,"alias":null},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:08 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/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"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:08 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
+ - 2d0b2c35464458c6132b3d6c5260336f
43
+ X-Runtime:
44
+ - '0.215553'
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":{"token":"fke86c5u","card_holder":"Matthew
52
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28T23:59:59+11:00","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","authorized":true,"transaction_count":1013,"alias":null},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:08 GMT
55
+ - request:
56
+ method: put
57
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards/fke86c5u
58
+ body:
59
+ encoding: UTF-8
60
+ string: '{"card_expiry":"02/2050","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:09 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.036106'
93
+ Pragma:
94
+ - no-cache
95
+ X-Request-Id:
96
+ - 4bac34c9cc95f165c111d172cd66ef55
97
+ X-Backend:
98
+ - sbox-priv-gateway-a
99
+ body:
100
+ encoding: UTF-8
101
+ string: '{"successful":true,"response":{"token":"fke86c5u","card_holder":"Matthew
102
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2050-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","authorized":true,"transaction_count":1013,"alias":null},"errors":[],"test":true}'
103
+ http_version:
104
+ recorded_at: Wed, 05 Jul 2017 05:53:09 GMT
105
+ 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/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"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:09 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
+ - 83425714fd41f4eef682cf73dbb9b3f6
43
+ X-Runtime:
44
+ - '0.214012'
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":{"token":"fke86c5u","card_holder":"Matthew
52
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28T23:59:59+11:00","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","authorized":true,"transaction_count":1013,"alias":null},"errors":[],"test":true}'
53
+ http_version:
54
+ recorded_at: Wed, 05 Jul 2017 05:53:09 GMT
55
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,57 @@
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":"ef7ade40c41914215256b96111262cad","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:09 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
+ - 90d12abd673bd64dd8814a721c581b7c
45
+ X-Runtime:
46
+ - '0.252430'
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-U0MGX8JU","email":null,"reference":"ef7ade40c41914215256b96111262cad","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:09+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:09 GMT
57
+ 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/customers
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"first_name":"Harrold","last_name":"Humphries","reference":"86ac3c5d7b9c4577355d5a852ec5e6af","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.251014'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 14730a0f95de280059a7d150720cde4b
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-ZPPO2SHP","email":null,"reference":"86ac3c5d7b9c4577355d5a852ec5e6af","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: delete
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers/071-C-ZPPO2SHP
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"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:11 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
+ - d3de5c082880fd6c8ceab28898e69026
95
+ X-Runtime:
96
+ - '0.122664'
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-ZPPO2SHP","email":null,"reference":"86ac3c5d7b9c4577355d5a852ec5e6af","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:10+10:00","address":{"address":"1
104
+ Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"fke86c5u","card_number":"512345XXXXXX2346","bank_account":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,111 @@
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":"93784f1ac4bd510daee910b117818385","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.240185'
45
+ Pragma:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 5f926173de882cb8ccc621dc74821c1b
49
+ X-Backend:
50
+ - sbox-priv-gateway-a
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"successful":true,"response":{"id":"071-C-IS7BZHC","email":null,"reference":"93784f1ac4bd510daee910b117818385","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:09+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: get
59
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/customers/93784f1ac4bd510daee910b117818385?test=true
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
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
+ Host:
71
+ - gateway.sandbox.fatzebra.com.au
72
+ Authorization:
73
+ - Basic VEVTVDpURVNU
74
+ Content-Type:
75
+ - application/json
76
+ response:
77
+ status:
78
+ code: 200
79
+ message: OK
80
+ headers:
81
+ Date:
82
+ - Wed, 05 Jul 2017 05:53:10 GMT
83
+ Content-Type:
84
+ - application/json; charset=utf-8
85
+ Transfer-Encoding:
86
+ - chunked
87
+ Connection:
88
+ - keep-alive
89
+ Status:
90
+ - 200 OK
91
+ Cache-Control:
92
+ - no-store, private
93
+ X-Request-Version:
94
+ - 1.19.41
95
+ Pragma:
96
+ - no-cache
97
+ X-Request-Id:
98
+ - d38803ec1c51fb9482251a50dc0f45bc
99
+ X-Runtime:
100
+ - '0.029645'
101
+ X-Rack-Cache:
102
+ - miss
103
+ X-Backend:
104
+ - sbox-priv-gateway-a
105
+ body:
106
+ encoding: UTF-8
107
+ string: '{"successful":true,"response":{"id":"071-C-IS7BZHC","email":null,"reference":"93784f1ac4bd510daee910b117818385","first_name":"Harrold","last_name":"Humphries","created_at":"2017-07-05T15:53:09+10:00","address":{"address":"1
108
+ Harriet Road","city":"Kooliablin","state":"NSW","postcode":"2222","country":"Australia"},"card_token":"fke86c5u","card_number":"512345XXXXXX2346","bank_account":null,"metadata":{}},"errors":[],"test":true}'
109
+ http_version:
110
+ recorded_at: Wed, 05 Jul 2017 05:53:10 GMT
111
+ recorded_with: VCR 3.0.3