fat_zebra_multi 3.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.rspec +0 -0
- data/.rubocop.yml +44 -0
- data/.travis.yml +10 -0
- data/Gemfile +4 -0
- data/README.md +104 -0
- data/Rakefile +11 -0
- data/fat_zebra_multi.gemspec +27 -0
- data/lib/fat_zebra.rb +65 -0
- data/lib/fat_zebra/api_helper.rb +91 -0
- data/lib/fat_zebra/api_operation/delete.rb +38 -0
- data/lib/fat_zebra/api_operation/find.rb +30 -0
- data/lib/fat_zebra/api_operation/save.rb +67 -0
- data/lib/fat_zebra/api_operation/search.rb +39 -0
- data/lib/fat_zebra/api_operation/void.rb +52 -0
- data/lib/fat_zebra/api_resource.rb +88 -0
- data/lib/fat_zebra/bank_account.rb +20 -0
- data/lib/fat_zebra/batch.rb +60 -0
- data/lib/fat_zebra/card.rb +23 -0
- data/lib/fat_zebra/config.rb +90 -0
- data/lib/fat_zebra/customer.rb +26 -0
- data/lib/fat_zebra/direct_credit.rb +26 -0
- data/lib/fat_zebra/direct_debit.rb +26 -0
- data/lib/fat_zebra/errors.rb +37 -0
- data/lib/fat_zebra/fat_zebra_object.rb +68 -0
- data/lib/fat_zebra/information.rb +29 -0
- data/lib/fat_zebra/object_helper.rb +119 -0
- data/lib/fat_zebra/payment_plan.rb +61 -0
- data/lib/fat_zebra/purchase.rb +96 -0
- data/lib/fat_zebra/refund.rb +27 -0
- data/lib/fat_zebra/request.rb +174 -0
- data/lib/fat_zebra/request/multipart/epilogue.rb +23 -0
- data/lib/fat_zebra/request/multipart/file_io.rb +40 -0
- data/lib/fat_zebra/request/multipart/param.rb +37 -0
- data/lib/fat_zebra/request/multipart/part.rb +28 -0
- data/lib/fat_zebra/request/multipart/stream.rb +57 -0
- data/lib/fat_zebra/util.rb +71 -0
- data/lib/fat_zebra/validation.rb +67 -0
- data/lib/fat_zebra/version.rb +3 -0
- data/lib/fat_zebra/web_hook.rb +22 -0
- data/spec/cassettes/FatZebra_BankAccount/_create/1_1_1.yml +53 -0
- data/spec/cassettes/FatZebra_BankAccount/_create/1_1_2.yml +53 -0
- data/spec/cassettes/FatZebra_BankAccount/_search/1_2_1.yml +164 -0
- data/spec/cassettes/FatZebra_BankAccount/_search/1_2_2.yml +164 -0
- data/spec/cassettes/FatZebra_BankAccount/_search/1_2_3.yml +164 -0
- data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_1.yml +61 -0
- data/spec/cassettes/FatZebra_Batch/_create/with_file/1_1_1_2.yml +61 -0
- data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_1.yml +61 -0
- data/spec/cassettes/FatZebra_Batch/_create/with_path/1_1_2_2.yml +61 -0
- data/spec/cassettes/FatZebra_Batch/_find/1_2_1.yml +112 -0
- data/spec/cassettes/FatZebra_Batch/_find/1_2_2.yml +112 -0
- data/spec/cassettes/FatZebra_Batch/_result/1_4_1.yml +163 -0
- data/spec/cassettes/FatZebra_Batch/_search/1_3_1.yml +54 -0
- data/spec/cassettes/FatZebra_Batch/_search/1_3_2.yml +54 -0
- data/spec/cassettes/FatZebra_Batch/_search/1_3_3.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_1.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_2.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_3.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_4.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_5.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_create/1_1_6.yml +54 -0
- data/spec/cassettes/FatZebra_Card/_update/1_2_1.yml +105 -0
- data/spec/cassettes/FatZebra_Card/_update/1_2_2.yml +105 -0
- data/spec/cassettes/FatZebra_Card/_update/1_2_3.yml +105 -0
- data/spec/cassettes/FatZebra_Card/_update/validations/1_2_4_1.yml +54 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_1.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_2.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_3.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_4.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_5.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_create/1_1_6.yml +55 -0
- data/spec/cassettes/FatZebra_Customer/_delete/1_5_1.yml +103 -0
- data/spec/cassettes/FatZebra_Customer/_find/1_3_1.yml +107 -0
- data/spec/cassettes/FatZebra_Customer/_find/1_3_2.yml +107 -0
- data/spec/cassettes/FatZebra_Customer/_search/1_2_1.yml +60 -0
- data/spec/cassettes/FatZebra_Customer/_search/1_2_2.yml +60 -0
- data/spec/cassettes/FatZebra_Customer/_search/1_2_3.yml +60 -0
- data/spec/cassettes/FatZebra_Customer/_update/1_4_1.yml +106 -0
- data/spec/cassettes/FatZebra_Customer/_update/1_4_2.yml +106 -0
- data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_1.yml +52 -0
- data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_2.yml +52 -0
- data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_3.yml +52 -0
- data/spec/cassettes/FatZebra_DirectCredit/_create/1_1_4.yml +52 -0
- data/spec/cassettes/FatZebra_DirectCredit/_create/validations/valid/1_1_5_1_1.yml +52 -0
- data/spec/cassettes/FatZebra_DirectCredit/_delete/1_4_1.yml +99 -0
- data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_1.yml +103 -0
- data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_2.yml +103 -0
- data/spec/cassettes/FatZebra_DirectCredit/_find/1_2_3.yml +103 -0
- data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_1.yml +152 -0
- data/spec/cassettes/FatZebra_DirectCredit/_search/1_3_2.yml +152 -0
- data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_1.yml +52 -0
- data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_2.yml +52 -0
- data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_3.yml +52 -0
- data/spec/cassettes/FatZebra_DirectDebit/_create/1_1_4.yml +52 -0
- data/spec/cassettes/FatZebra_DirectDebit/_create/validations/valid/1_1_5_1_1.yml +52 -0
- data/spec/cassettes/FatZebra_DirectDebit/_delete/1_4_1.yml +99 -0
- data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_1.yml +103 -0
- data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_2.yml +103 -0
- data/spec/cassettes/FatZebra_DirectDebit/_find/1_2_3.yml +103 -0
- data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_1.yml +152 -0
- data/spec/cassettes/FatZebra_DirectDebit/_search/1_3_2.yml +152 -0
- data/spec/cassettes/FatZebra_Information/_ping/1_1_1.yml +54 -0
- data/spec/cassettes/FatZebra_Information/_ping/1_1_2.yml +54 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_1.yml +222 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_active_/1_8_2.yml +222 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_1.yml +110 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_2.yml +110 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_create/1_1_3.yml +110 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_delete/1_5_1.yml +158 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_destroy/1_6_1.yml +158 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_1.yml +167 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_2.yml +167 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_find/1_2_3.yml +167 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_1.yml +166 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_suspend_/1_7_2.yml +166 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_1.yml +160 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_2.yml +160 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_update/1_3_3.yml +160 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_1.yml +166 -0
- data/spec/cassettes/FatZebra_PaymentPlan/_update/1_4_2.yml +166 -0
- data/spec/cassettes/FatZebra_Purchase/_capture/1_5_1.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_capture/1_5_2.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_capture/1_5_3.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_1.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_10.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_11.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_12.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_13.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_2.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_3.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_4.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_5.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_6.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_7.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_8.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/1_1_9.yml +53 -0
- data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_1.yml +55 -0
- data/spec/cassettes/FatZebra_Purchase/_create/bad_request/1_1_14_2.yml +55 -0
- data/spec/cassettes/FatZebra_Purchase/_find/1_2_1.yml +117 -0
- data/spec/cassettes/FatZebra_Purchase/_find/1_2_2.yml +117 -0
- data/spec/cassettes/FatZebra_Purchase/_find/1_2_3.yml +117 -0
- data/spec/cassettes/FatZebra_Purchase/_find/1_2_4.yml +117 -0
- data/spec/cassettes/FatZebra_Purchase/_refund/1_4_1.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_refund/1_4_2.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_refund/1_4_3.yml +115 -0
- data/spec/cassettes/FatZebra_Purchase/_search/1_3_1.yml +164 -0
- data/spec/cassettes/FatZebra_Purchase/_search/1_3_2.yml +164 -0
- data/spec/cassettes/FatZebra_Purchase/_search/1_3_3.yml +164 -0
- data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_1.yml +652 -0
- data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_2.yml +652 -0
- data/spec/cassettes/FatZebra_Purchase/_settlement/1_8_3.yml +652 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_6_1.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_6_2.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_6_3.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_6_4.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_7_1.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_7_2.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_7_3.yml +103 -0
- data/spec/cassettes/FatZebra_Purchase/_void/1_7_4.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_1.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_10.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_2.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_3.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_4.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_5.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_6.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_7.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_8.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_create/1_1_9.yml +103 -0
- data/spec/cassettes/FatZebra_Refund/_find/1_2_1.yml +155 -0
- data/spec/cassettes/FatZebra_Refund/_find/1_2_2.yml +155 -0
- data/spec/cassettes/FatZebra_Refund/_find/1_2_3.yml +155 -0
- data/spec/cassettes/FatZebra_Refund/_search/responds_with_the_newly-created_refunds.yml +214 -0
- data/spec/cassettes/FatZebra_Refund/_void/1_4_1.yml +153 -0
- data/spec/cassettes/FatZebra_Refund/_void/1_4_2.yml +153 -0
- data/spec/cassettes/FatZebra_Refund/_void/1_4_3.yml +153 -0
- data/spec/cassettes/FatZebra_Refund/_void/1_4_4.yml +153 -0
- data/spec/cassettes/FatZebra_WebHook/_create/1_1_1.yml +53 -0
- data/spec/cassettes/FatZebra_WebHook/_create/1_1_2.yml +53 -0
- data/spec/cassettes/FatZebra_WebHook/_create/1_1_3.yml +53 -0
- data/spec/cassettes/FatZebra_WebHook/_delete/1_4_1.yml +101 -0
- data/spec/cassettes/FatZebra_WebHook/_search/1_2_1.yml +298 -0
- data/spec/cassettes/FatZebra_WebHook/_search/1_2_2.yml +300 -0
- data/spec/cassettes/FatZebra_WebHook/_update/1_3_1.yml +104 -0
- data/spec/cassettes/FatZebra_WebHook/_update/1_3_2.yml +104 -0
- data/spec/cassettes/Multiple_accounts/The_basics/1_1_5.yml +59 -0
- data/spec/cassettes/Multiple_accounts/The_basics/1_1_6.yml +59 -0
- data/spec/fixtures/batch_test.csv +4 -0
- data/spec/lib/fat_zebra/api_resource_spec.rb +25 -0
- data/spec/lib/fat_zebra/bank_account_spec.rb +34 -0
- data/spec/lib/fat_zebra/batch_spec.rb +59 -0
- data/spec/lib/fat_zebra/card_spec.rb +41 -0
- data/spec/lib/fat_zebra/config_spec.rb +69 -0
- data/spec/lib/fat_zebra/customer_spec.rb +53 -0
- data/spec/lib/fat_zebra/direct_credit_spec.rb +74 -0
- data/spec/lib/fat_zebra/direct_debit_spec.rb +74 -0
- data/spec/lib/fat_zebra/fat_zebra_object_spec.rb +117 -0
- data/spec/lib/fat_zebra/information_spec.rb +13 -0
- data/spec/lib/fat_zebra/multiple_accounts_spec.rb +69 -0
- data/spec/lib/fat_zebra/payment_plan_spec.rb +94 -0
- data/spec/lib/fat_zebra/purchase_spec.rb +105 -0
- data/spec/lib/fat_zebra/refund_spec.rb +95 -0
- data/spec/lib/fat_zebra/request_spec.rb +59 -0
- data/spec/lib/fat_zebra/util_spec.rb +43 -0
- data/spec/lib/fat_zebra/validation_spec.rb +22 -0
- data/spec/lib/fat_zebra/web_hook_spec.rb +50 -0
- data/spec/spec_helper.rb +68 -0
- data/spec/support/payloads.rb +43 -0
- data/vendor/cacert.pem +3390 -0
- metadata +338 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
module FatZebra
|
2
|
+
module Validation
|
3
|
+
|
4
|
+
def validates(name, options = {})
|
5
|
+
validations[name] = options
|
6
|
+
end
|
7
|
+
|
8
|
+
def valid?(params, action = nil)
|
9
|
+
@errors = []
|
10
|
+
|
11
|
+
validations.each do |(field, options)|
|
12
|
+
next unless options[:on] == action
|
13
|
+
|
14
|
+
Util.hash_except(options, :on).each do |(validation_attribute, validation_options)|
|
15
|
+
send("validate_#{validation_attribute}", field, validation_options, params)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
errors.empty?
|
20
|
+
end
|
21
|
+
|
22
|
+
def valid!(params, action = nil)
|
23
|
+
raise RequestValidationError, "The following errors prevent the transaction from being submitted: #{errors.join(', ')}" unless valid?(params, action)
|
24
|
+
end
|
25
|
+
|
26
|
+
def errors
|
27
|
+
@errors ||= []
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def validations
|
33
|
+
@validations ||= {}
|
34
|
+
end
|
35
|
+
|
36
|
+
def validate_required(field, options, params)
|
37
|
+
return if options.is_a?(Hash) && options[:unless] && options[:unless].any? { |f| params[f] }
|
38
|
+
|
39
|
+
errors << "'#{field}' is required" if params[field].nil? || params[field] == ''
|
40
|
+
end
|
41
|
+
|
42
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
43
|
+
def validate_type(field, options, params)
|
44
|
+
regexp =
|
45
|
+
case options
|
46
|
+
when :positive_float
|
47
|
+
/\A\d*\.\d+\z/
|
48
|
+
when :positive_numeric
|
49
|
+
/\A\d*\.?\d+\z/
|
50
|
+
when :positive_integer
|
51
|
+
/\A\d*\z/
|
52
|
+
when :batch_filename
|
53
|
+
/\ABATCH-(?<version>v\d)-(?<type>[A-Z]*)-((?<merchant_username>[A-Z0-9]*\-?[A-Z0-9]*)-)?(?<process_date>\d{8})-(?<reference>[a-zA-Z0-9\-_]*).csv\z/i
|
54
|
+
when :file_type
|
55
|
+
/\A\#\<File\:.*\z/
|
56
|
+
when :boolean
|
57
|
+
/\Atrue|false\z/
|
58
|
+
else
|
59
|
+
raise RequestValidationError, "Unknown type #{options} for #{field}"
|
60
|
+
end
|
61
|
+
|
62
|
+
errors << "'#{field}' is not a '#{options}'" unless params[field].to_s =~ regexp
|
63
|
+
end
|
64
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module FatZebra
|
2
|
+
##
|
3
|
+
# == FatZebra \Web \Hook
|
4
|
+
#
|
5
|
+
# Manage web hook for the API
|
6
|
+
#
|
7
|
+
# * search
|
8
|
+
# * save
|
9
|
+
# * delete
|
10
|
+
#
|
11
|
+
class WebHook < APIResource
|
12
|
+
|
13
|
+
include FatZebra::APIOperation::Search
|
14
|
+
include FatZebra::APIOperation::Save
|
15
|
+
include FatZebra::APIOperation::Delete
|
16
|
+
|
17
|
+
validates :events, required: true, on: :create
|
18
|
+
validates :mode, required: true, on: :create
|
19
|
+
validates :address, required: true, on: :create
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Authorization:
|
17
|
+
- Basic VEVTVDpURVNU
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 201 Created
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
X-Request-Version:
|
38
|
+
- 1.16.9-3941@c1d8236
|
39
|
+
X-Runtime:
|
40
|
+
- '0.039446'
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
X-Request-Id:
|
44
|
+
- 8a6abecc0a844098c813a65c
|
45
|
+
X-Backend:
|
46
|
+
- sbox-priv-gateway-a
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"successful":true,"response":{"id":"071-B-SI80AR5J","account_name":"Test
|
50
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Authorization:
|
17
|
+
- Basic VEVTVDpURVNU
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 201 Created
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
X-Request-Version:
|
38
|
+
- 1.16.9-3941@c1d8236
|
39
|
+
X-Runtime:
|
40
|
+
- '0.047273'
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
X-Request-Id:
|
44
|
+
- 93bd956c32bb945cf34a9ecc
|
45
|
+
X-Backend:
|
46
|
+
- sbox-priv-gateway-a
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"successful":true,"response":{"id":"071-B-VKNWPPF6","account_name":"Test
|
50
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
53
|
+
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/bank_accounts
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Authorization:
|
17
|
+
- Basic VEVTVDpURVNU
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 201 Created
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
X-Request-Version:
|
38
|
+
- 1.16.9-3941@c1d8236
|
39
|
+
X-Runtime:
|
40
|
+
- '0.035263'
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
X-Request-Id:
|
44
|
+
- ad6e6cd815c00c9ccc68ec48
|
45
|
+
X-Backend:
|
46
|
+
- sbox-priv-gateway-a
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"successful":true,"response":{"id":"071-B-SVV00D45","account_name":"Test
|
50
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
53
|
+
- request:
|
54
|
+
method: post
|
55
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
59
|
+
headers:
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
Accept:
|
63
|
+
- application/json
|
64
|
+
User-Agent:
|
65
|
+
- Ruby
|
66
|
+
Authorization:
|
67
|
+
- Basic VEVTVDpURVNU
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 201
|
73
|
+
message: Created
|
74
|
+
headers:
|
75
|
+
Date:
|
76
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
77
|
+
Content-Type:
|
78
|
+
- application/json; charset=utf-8
|
79
|
+
Transfer-Encoding:
|
80
|
+
- chunked
|
81
|
+
Connection:
|
82
|
+
- keep-alive
|
83
|
+
Status:
|
84
|
+
- 201 Created
|
85
|
+
Cache-Control:
|
86
|
+
- no-store
|
87
|
+
X-Request-Version:
|
88
|
+
- 1.16.9-3941@c1d8236
|
89
|
+
X-Runtime:
|
90
|
+
- '0.038434'
|
91
|
+
Pragma:
|
92
|
+
- no-cache
|
93
|
+
X-Request-Id:
|
94
|
+
- e483f9dcd8c4f5384afdeff4
|
95
|
+
X-Backend:
|
96
|
+
- sbox-priv-gateway-a
|
97
|
+
body:
|
98
|
+
encoding: UTF-8
|
99
|
+
string: '{"successful":true,"response":{"id":"071-B-HKVNN1S7","account_name":"Test
|
100
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
101
|
+
http_version:
|
102
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
103
|
+
- request:
|
104
|
+
method: get
|
105
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts?limit=10&offset=0&test=true
|
106
|
+
body:
|
107
|
+
encoding: US-ASCII
|
108
|
+
string: ''
|
109
|
+
headers:
|
110
|
+
Accept-Encoding:
|
111
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
112
|
+
Accept:
|
113
|
+
- application/json
|
114
|
+
User-Agent:
|
115
|
+
- Ruby
|
116
|
+
Host:
|
117
|
+
- gateway.sandbox.fatzebra.com.au
|
118
|
+
Authorization:
|
119
|
+
- Basic VEVTVDpURVNU
|
120
|
+
Content-Type:
|
121
|
+
- application/json
|
122
|
+
response:
|
123
|
+
status:
|
124
|
+
code: 200
|
125
|
+
message: OK
|
126
|
+
headers:
|
127
|
+
Date:
|
128
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
129
|
+
Content-Type:
|
130
|
+
- application/json; charset=utf-8
|
131
|
+
Transfer-Encoding:
|
132
|
+
- chunked
|
133
|
+
Connection:
|
134
|
+
- keep-alive
|
135
|
+
Status:
|
136
|
+
- 200 OK
|
137
|
+
Cache-Control:
|
138
|
+
- no-store
|
139
|
+
X-Request-Version:
|
140
|
+
- 1.16.9-3941@c1d8236
|
141
|
+
X-Runtime:
|
142
|
+
- '0.033381'
|
143
|
+
Pragma:
|
144
|
+
- no-cache
|
145
|
+
X-Request-Id:
|
146
|
+
- ad27f4408a5eb903b4036040
|
147
|
+
X-Backend:
|
148
|
+
- sbox-priv-gateway-a
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: '{"successful":true,"response":[{"id":"071-B-HKVNN1S7","account_name":"Test
|
152
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SVV00D45","account_name":"Test
|
153
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-VKNWPPF6","account_name":"Test
|
154
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SI80AR5J","account_name":"Test
|
155
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-BSJIIRMH","account_name":"Client
|
156
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:45:26+10:00"},{"id":"071-B-E7TA7XAT","account_name":"Client
|
157
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:31:17+10:00"},{"id":"071-B-69NSA4AW","account_name":"Client
|
158
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:27:05+10:00"},{"id":"071-B-B3WYVD3A","account_name":"Client
|
159
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:06:30+10:00"},{"id":"071-B-N7BD56HI","account_name":"Client
|
160
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:06:16+10:00"},{"id":"071-B-VCB5LY0Z","account_name":"Client
|
161
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:03:19+10:00"}],"errors":[],"test":true,"records":10,"total_records":15228,"page":0,"total_pages":1523}'
|
162
|
+
http_version:
|
163
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
164
|
+
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/bank_accounts
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Authorization:
|
17
|
+
- Basic VEVTVDpURVNU
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 201 Created
|
35
|
+
Cache-Control:
|
36
|
+
- no-store
|
37
|
+
X-Request-Version:
|
38
|
+
- 1.16.9-3941@c1d8236
|
39
|
+
X-Runtime:
|
40
|
+
- '0.036587'
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
X-Request-Id:
|
44
|
+
- dec00364e578f5342078cf04
|
45
|
+
X-Backend:
|
46
|
+
- sbox-priv-gateway-a
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"successful":true,"response":{"id":"071-B-D2KTTBC2","account_name":"Test
|
50
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
53
|
+
- request:
|
54
|
+
method: post
|
55
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"bsb":"123-123","account_name":"Test name","account_number":"012345678","test":true}'
|
59
|
+
headers:
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
Accept:
|
63
|
+
- application/json
|
64
|
+
User-Agent:
|
65
|
+
- Ruby
|
66
|
+
Authorization:
|
67
|
+
- Basic VEVTVDpURVNU
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 201
|
73
|
+
message: Created
|
74
|
+
headers:
|
75
|
+
Date:
|
76
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
77
|
+
Content-Type:
|
78
|
+
- application/json; charset=utf-8
|
79
|
+
Transfer-Encoding:
|
80
|
+
- chunked
|
81
|
+
Connection:
|
82
|
+
- keep-alive
|
83
|
+
Status:
|
84
|
+
- 201 Created
|
85
|
+
Cache-Control:
|
86
|
+
- no-store
|
87
|
+
X-Request-Version:
|
88
|
+
- 1.16.9-3941@c1d8236
|
89
|
+
X-Runtime:
|
90
|
+
- '0.038547'
|
91
|
+
Pragma:
|
92
|
+
- no-cache
|
93
|
+
X-Request-Id:
|
94
|
+
- 403a95189a29032c80d7ba7c
|
95
|
+
X-Backend:
|
96
|
+
- sbox-priv-gateway-a
|
97
|
+
body:
|
98
|
+
encoding: UTF-8
|
99
|
+
string: '{"successful":true,"response":{"id":"071-B-4EKGYJU6","account_name":"Test
|
100
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},"errors":[],"test":true}'
|
101
|
+
http_version:
|
102
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
103
|
+
- request:
|
104
|
+
method: get
|
105
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/bank_accounts?limit=10&offset=0&test=true
|
106
|
+
body:
|
107
|
+
encoding: US-ASCII
|
108
|
+
string: ''
|
109
|
+
headers:
|
110
|
+
Accept-Encoding:
|
111
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
112
|
+
Accept:
|
113
|
+
- application/json
|
114
|
+
User-Agent:
|
115
|
+
- Ruby
|
116
|
+
Host:
|
117
|
+
- gateway.sandbox.fatzebra.com.au
|
118
|
+
Authorization:
|
119
|
+
- Basic VEVTVDpURVNU
|
120
|
+
Content-Type:
|
121
|
+
- application/json
|
122
|
+
response:
|
123
|
+
status:
|
124
|
+
code: 200
|
125
|
+
message: OK
|
126
|
+
headers:
|
127
|
+
Date:
|
128
|
+
- Mon, 29 Apr 2019 09:16:36 GMT
|
129
|
+
Content-Type:
|
130
|
+
- application/json; charset=utf-8
|
131
|
+
Transfer-Encoding:
|
132
|
+
- chunked
|
133
|
+
Connection:
|
134
|
+
- keep-alive
|
135
|
+
Status:
|
136
|
+
- 200 OK
|
137
|
+
Cache-Control:
|
138
|
+
- no-store
|
139
|
+
X-Request-Version:
|
140
|
+
- 1.16.9-3941@c1d8236
|
141
|
+
X-Runtime:
|
142
|
+
- '0.036710'
|
143
|
+
Pragma:
|
144
|
+
- no-cache
|
145
|
+
X-Request-Id:
|
146
|
+
- 05524550b8db635422eba338
|
147
|
+
X-Backend:
|
148
|
+
- sbox-priv-gateway-a
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: '{"successful":true,"response":[{"id":"071-B-4EKGYJU6","account_name":"Test
|
152
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-D2KTTBC2","account_name":"Test
|
153
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-HKVNN1S7","account_name":"Test
|
154
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SVV00D45","account_name":"Test
|
155
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-VKNWPPF6","account_name":"Test
|
156
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-SI80AR5J","account_name":"Test
|
157
|
+
name","account_number":"012345678","bsb":"123-123","created_at":"2019-04-29T19:16:36+10:00"},{"id":"071-B-BSJIIRMH","account_name":"Client
|
158
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:45:26+10:00"},{"id":"071-B-E7TA7XAT","account_name":"Client
|
159
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:31:17+10:00"},{"id":"071-B-69NSA4AW","account_name":"Client
|
160
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:27:05+10:00"},{"id":"071-B-B3WYVD3A","account_name":"Client
|
161
|
+
Name","account_number":"456456456","bsb":"123-123","created_at":"2019-04-29T18:06:30+10:00"}],"errors":[],"test":true,"records":10,"total_records":15230,"page":0,"total_pages":1523}'
|
162
|
+
http_version:
|
163
|
+
recorded_at: Mon, 29 Apr 2019 09:16:36 GMT
|
164
|
+
recorded_with: VCR 3.0.3
|