transferzero-sdk 1.0.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -11
- data/docs/AccountMeta.md +1 -1
- data/docs/AccountValidationApi.md +4 -4
- data/docs/AccountValidationRequest.md +6 -4
- data/docs/Currency.md +1 -1
- data/docs/CurrencyExchange.md +1 -1
- data/docs/CurrencyInfoApi.md +20 -6
- data/docs/CurrencyOpposite.md +4 -2
- data/docs/Debit.md +2 -2
- data/docs/Document.md +4 -0
- data/docs/FieldSelectValidation.md +1 -1
- data/docs/FieldValidation.md +1 -1
- data/docs/PayinMethod.md +4 -4
- data/docs/PayinMethodDetails.md +7 -3
- data/docs/PayinMethodDetailsBTC.md +17 -0
- data/docs/PayinMethodDetailsMobile.md +1 -1
- data/docs/PayinMethodDetailsNGNBank.md +4 -2
- data/docs/PaymentMethod.md +2 -2
- data/docs/PaymentMethodOpposite.md +2 -2
- data/docs/PayoutMethod.md +1 -1
- data/docs/PayoutMethodDetails.md +12 -4
- data/docs/PayoutMethodDetailsBTC.md +23 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/PayoutMethodDetailsNGNBank.md +1 -1
- data/docs/PayoutMethodDetailsXOFBank.md +25 -0
- data/docs/PoliticallyExposedPerson.md +31 -0
- data/docs/Recipient.md +5 -3
- data/docs/RecipientsApi.md +3 -3
- data/docs/Sender.md +63 -27
- data/docs/Transaction.md +5 -5
- data/docs/TransactionTraits.md +2 -2
- data/docs/TransactionsApi.md +64 -0
- data/example/client.rb +14 -14
- data/git_push.sh +1 -1
- data/lib/transferzero-sdk.rb +5 -0
- data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
- data/lib/transferzero-sdk/api/currency_info_api.rb +6 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +4 -4
- data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
- data/lib/transferzero-sdk/api_client.rb +5 -5
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +142 -141
- data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -155
- data/lib/transferzero-sdk/models/debit.rb +151 -155
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +181 -160
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -105
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +204 -0
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -65
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_details.rb +338 -288
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +250 -0
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -108
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +264 -0
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +272 -0
- data/lib/transferzero-sdk/models/recipient.rb +230 -219
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +529 -322
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -23
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -27
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/api/account_validation_api_spec.rb +2 -2
- data/spec/api/currency_info_api_spec.rb +2 -0
- data/spec/api/documents_api_spec.rb +15 -0
- data/spec/api/recipients_api_spec.rb +1 -1
- data/spec/api/transactions_api_spec.rb +13 -0
- data/spec/models/account_validation_request_spec.rb +7 -1
- data/spec/models/currency_opposite_spec.rb +6 -0
- data/spec/models/document_spec.rb +12 -0
- data/spec/models/payin_method_details_btc_spec.rb +41 -0
- data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
- data/spec/models/payin_method_details_spec.rb +6 -0
- data/spec/models/payout_method_details_btc_spec.rb +59 -0
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- data/spec/models/payout_method_details_spec.rb +7 -1
- data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
- data/spec/models/politically_exposed_person_spec.rb +83 -0
- data/spec/models/recipient_spec.rb +6 -0
- data/spec/models/sender_spec.rb +16 -0
- data/transferzero-sdk.gemspec +2 -2
- metadata +35 -24
- data/spec/api_client_spec.rb +0 -189
@@ -0,0 +1,83 @@
|
|
1
|
+
=begin
|
2
|
+
#TransferZero API
|
3
|
+
|
4
|
+
#Reference documentation for the TransferZero API V1
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for TransferZero::PoliticallyExposedPerson
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'PoliticallyExposedPerson' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = TransferZero::PoliticallyExposedPerson.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of PoliticallyExposedPerson' do
|
31
|
+
it 'should create an instance of PoliticallyExposedPerson' do
|
32
|
+
expect(@instance).to be_instance_of(TransferZero::PoliticallyExposedPerson)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "name"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "position"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "started_date"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "ended_date"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "sender_id"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "created_at"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "updated_at"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -68,6 +68,12 @@ describe 'Recipient' do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
describe 'test attribute "retriable"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
71
77
|
describe 'test attribute "input_usd_amount"' do
|
72
78
|
it 'should work' do
|
73
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/models/sender_spec.rb
CHANGED
@@ -156,6 +156,22 @@ describe 'Sender' do
|
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
159
|
+
describe 'test attribute "identification_number"' do
|
160
|
+
it 'should work' do
|
161
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
describe 'test attribute "identification_type"' do
|
166
|
+
it 'should work' do
|
167
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
168
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DL", "PP", "ID", "OT"])
|
169
|
+
# validator.allowable_values.each do |value|
|
170
|
+
# expect { @instance.identification_type = value }.not_to raise_error
|
171
|
+
# end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
159
175
|
describe 'test attribute "documents"' do
|
160
176
|
it 'should work' do
|
161
177
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/transferzero-sdk.gemspec
CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
-
s.add_runtime_dependency 'json', '
|
32
|
-
s.add_runtime_dependency 'activesupport', '
|
31
|
+
s.add_runtime_dependency 'json', '>= 1.4'
|
32
|
+
s.add_runtime_dependency 'activesupport', '>= 4'
|
33
33
|
|
34
34
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
35
35
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transferzero-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TransferZero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -34,56 +34,50 @@ dependencies:
|
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '2.1'
|
40
37
|
- - ">="
|
41
38
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
39
|
+
version: '1.4'
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '2.1'
|
50
44
|
- - ">="
|
51
45
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
46
|
+
version: '1.4'
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
48
|
name: activesupport
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
56
50
|
requirements:
|
57
|
-
- - "
|
51
|
+
- - ">="
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
53
|
+
version: '4'
|
60
54
|
type: :runtime
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
57
|
requirements:
|
64
|
-
- - "
|
58
|
+
- - ">="
|
65
59
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
60
|
+
version: '4'
|
67
61
|
- !ruby/object:Gem::Dependency
|
68
62
|
name: rspec
|
69
63
|
requirement: !ruby/object:Gem::Requirement
|
70
64
|
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '3.6'
|
74
65
|
- - ">="
|
75
66
|
- !ruby/object:Gem::Version
|
76
67
|
version: 3.6.0
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '3.6'
|
77
71
|
type: :development
|
78
72
|
prerelease: false
|
79
73
|
version_requirements: !ruby/object:Gem::Requirement
|
80
74
|
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '3.6'
|
84
75
|
- - ">="
|
85
76
|
- !ruby/object:Gem::Version
|
86
77
|
version: 3.6.0
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.6'
|
87
81
|
- !ruby/object:Gem::Dependency
|
88
82
|
name: vcr
|
89
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -257,6 +251,7 @@ files:
|
|
257
251
|
- docs/PaginationMeta.md
|
258
252
|
- docs/PayinMethod.md
|
259
253
|
- docs/PayinMethodDetails.md
|
254
|
+
- docs/PayinMethodDetailsBTC.md
|
260
255
|
- docs/PayinMethodDetailsMobile.md
|
261
256
|
- docs/PayinMethodDetailsNGNBank.md
|
262
257
|
- docs/PayinMethodRequest.md
|
@@ -267,12 +262,15 @@ files:
|
|
267
262
|
- docs/PayoutMethod.md
|
268
263
|
- docs/PayoutMethodBankAccountTypeEnum.md
|
269
264
|
- docs/PayoutMethodDetails.md
|
265
|
+
- docs/PayoutMethodDetailsBTC.md
|
270
266
|
- docs/PayoutMethodDetailsBalance.md
|
267
|
+
- docs/PayoutMethodDetailsGBPBank.md
|
271
268
|
- docs/PayoutMethodDetailsGHSBank.md
|
272
269
|
- docs/PayoutMethodDetailsIBAN.md
|
273
270
|
- docs/PayoutMethodDetailsMADCash.md
|
274
271
|
- docs/PayoutMethodDetailsMobile.md
|
275
272
|
- docs/PayoutMethodDetailsNGNBank.md
|
273
|
+
- docs/PayoutMethodDetailsXOFBank.md
|
276
274
|
- docs/PayoutMethodDetailsXOFMobile.md
|
277
275
|
- docs/PayoutMethodGenderEnum.md
|
278
276
|
- docs/PayoutMethodIdentityCardTypeEnum.md
|
@@ -282,6 +280,7 @@ files:
|
|
282
280
|
- docs/PayoutMethodResponse.md
|
283
281
|
- docs/PayoutMethodWebhook.md
|
284
282
|
- docs/PayoutMethodsApi.md
|
283
|
+
- docs/PoliticallyExposedPerson.md
|
285
284
|
- docs/Recipient.md
|
286
285
|
- docs/RecipientListResponse.md
|
287
286
|
- docs/RecipientRequest.md
|
@@ -376,6 +375,7 @@ files:
|
|
376
375
|
- lib/transferzero-sdk/models/pagination_meta.rb
|
377
376
|
- lib/transferzero-sdk/models/payin_method.rb
|
378
377
|
- lib/transferzero-sdk/models/payin_method_details.rb
|
378
|
+
- lib/transferzero-sdk/models/payin_method_details_btc.rb
|
379
379
|
- lib/transferzero-sdk/models/payin_method_details_mobile.rb
|
380
380
|
- lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb
|
381
381
|
- lib/transferzero-sdk/models/payin_method_request.rb
|
@@ -386,11 +386,14 @@ files:
|
|
386
386
|
- lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb
|
387
387
|
- lib/transferzero-sdk/models/payout_method_details.rb
|
388
388
|
- lib/transferzero-sdk/models/payout_method_details_balance.rb
|
389
|
+
- lib/transferzero-sdk/models/payout_method_details_btc.rb
|
390
|
+
- lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb
|
389
391
|
- lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb
|
390
392
|
- lib/transferzero-sdk/models/payout_method_details_iban.rb
|
391
393
|
- lib/transferzero-sdk/models/payout_method_details_mad_cash.rb
|
392
394
|
- lib/transferzero-sdk/models/payout_method_details_mobile.rb
|
393
395
|
- lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb
|
396
|
+
- lib/transferzero-sdk/models/payout_method_details_xof_bank.rb
|
394
397
|
- lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb
|
395
398
|
- lib/transferzero-sdk/models/payout_method_gender_enum.rb
|
396
399
|
- lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb
|
@@ -399,6 +402,7 @@ files:
|
|
399
402
|
- lib/transferzero-sdk/models/payout_method_request.rb
|
400
403
|
- lib/transferzero-sdk/models/payout_method_response.rb
|
401
404
|
- lib/transferzero-sdk/models/payout_method_webhook.rb
|
405
|
+
- lib/transferzero-sdk/models/politically_exposed_person.rb
|
402
406
|
- lib/transferzero-sdk/models/recipient.rb
|
403
407
|
- lib/transferzero-sdk/models/recipient_list_response.rb
|
404
408
|
- lib/transferzero-sdk/models/recipient_request.rb
|
@@ -449,7 +453,6 @@ files:
|
|
449
453
|
- spec/api/senders_api_spec.rb
|
450
454
|
- spec/api/transactions_api_spec.rb
|
451
455
|
- spec/api/webhooks_api_spec.rb
|
452
|
-
- spec/api_client_spec.rb
|
453
456
|
- spec/configuration_spec.rb
|
454
457
|
- spec/models/account_list_response_spec.rb
|
455
458
|
- spec/models/account_meta_spec.rb
|
@@ -484,6 +487,7 @@ files:
|
|
484
487
|
- spec/models/field_validation_spec.rb
|
485
488
|
- spec/models/pagination_meta_spec.rb
|
486
489
|
- spec/models/pagination_spec.rb
|
490
|
+
- spec/models/payin_method_details_btc_spec.rb
|
487
491
|
- spec/models/payin_method_details_mobile_spec.rb
|
488
492
|
- spec/models/payin_method_details_ngn_bank_spec.rb
|
489
493
|
- spec/models/payin_method_details_spec.rb
|
@@ -494,12 +498,15 @@ files:
|
|
494
498
|
- spec/models/payment_method_spec.rb
|
495
499
|
- spec/models/payout_method_bank_account_type_enum_spec.rb
|
496
500
|
- spec/models/payout_method_details_balance_spec.rb
|
501
|
+
- spec/models/payout_method_details_btc_spec.rb
|
502
|
+
- spec/models/payout_method_details_gbp_bank_spec.rb
|
497
503
|
- spec/models/payout_method_details_ghs_bank_spec.rb
|
498
504
|
- spec/models/payout_method_details_iban_spec.rb
|
499
505
|
- spec/models/payout_method_details_mad_cash_spec.rb
|
500
506
|
- spec/models/payout_method_details_mobile_spec.rb
|
501
507
|
- spec/models/payout_method_details_ngn_bank_spec.rb
|
502
508
|
- spec/models/payout_method_details_spec.rb
|
509
|
+
- spec/models/payout_method_details_xof_bank_spec.rb
|
503
510
|
- spec/models/payout_method_details_xof_mobile_spec.rb
|
504
511
|
- spec/models/payout_method_gender_enum_spec.rb
|
505
512
|
- spec/models/payout_method_identity_card_type_enum_spec.rb
|
@@ -509,6 +516,7 @@ files:
|
|
509
516
|
- spec/models/payout_method_response_spec.rb
|
510
517
|
- spec/models/payout_method_spec.rb
|
511
518
|
- spec/models/payout_method_webhook_spec.rb
|
519
|
+
- spec/models/politically_exposed_person_spec.rb
|
512
520
|
- spec/models/recipient_list_response_spec.rb
|
513
521
|
- spec/models/recipient_request_spec.rb
|
514
522
|
- spec/models/recipient_response_spec.rb
|
@@ -566,8 +574,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
566
574
|
- !ruby/object:Gem::Version
|
567
575
|
version: '0'
|
568
576
|
requirements: []
|
569
|
-
|
570
|
-
rubygems_version: 2.7.3
|
577
|
+
rubygems_version: 3.0.3
|
571
578
|
signing_key:
|
572
579
|
specification_version: 4
|
573
580
|
summary: TransferZero API Ruby Gem
|
@@ -585,7 +592,6 @@ test_files:
|
|
585
592
|
- spec/api/accounts_api_spec.rb
|
586
593
|
- spec/api/payment_methods_api_spec.rb
|
587
594
|
- spec/api/account_debits_api_spec.rb
|
588
|
-
- spec/api_client_spec.rb
|
589
595
|
- spec/configuration_spec.rb
|
590
596
|
- spec/models/webhook_definition_response_spec.rb
|
591
597
|
- spec/models/sender_spec.rb
|
@@ -601,12 +607,14 @@ test_files:
|
|
601
607
|
- spec/models/debit_response_spec.rb
|
602
608
|
- spec/models/webhook_definition_event_list_response_spec.rb
|
603
609
|
- spec/models/debit_spec.rb
|
610
|
+
- spec/models/payin_method_details_btc_spec.rb
|
604
611
|
- spec/models/transaction_response_meta_spec.rb
|
605
612
|
- spec/models/transaction_traits_spec.rb
|
606
613
|
- spec/models/account_spec.rb
|
607
614
|
- spec/models/webhook_definition_request_spec.rb
|
608
615
|
- spec/models/sender_state_spec.rb
|
609
616
|
- spec/models/payout_method_request_spec.rb
|
617
|
+
- spec/models/payout_method_details_gbp_bank_spec.rb
|
610
618
|
- spec/models/webhook_log_metadata_request_spec.rb
|
611
619
|
- spec/models/recipient_webhook_spec.rb
|
612
620
|
- spec/models/api_log_list_response_spec.rb
|
@@ -622,12 +630,14 @@ test_files:
|
|
622
630
|
- spec/models/payin_method_details_mobile_spec.rb
|
623
631
|
- spec/models/payout_method_details_mad_cash_spec.rb
|
624
632
|
- spec/models/account_validation_response_spec.rb
|
633
|
+
- spec/models/payout_method_details_btc_spec.rb
|
625
634
|
- spec/models/api_log_spec.rb
|
626
635
|
- spec/models/document_response_spec.rb
|
627
636
|
- spec/models/currency_exchange_list_response_spec.rb
|
628
637
|
- spec/models/validation_error_description_spec.rb
|
629
638
|
- spec/models/payin_method_request_spec.rb
|
630
639
|
- spec/models/transaction_webhook_spec.rb
|
640
|
+
- spec/models/payout_method_details_xof_bank_spec.rb
|
631
641
|
- spec/models/webhook_log_metadata_spec.rb
|
632
642
|
- spec/models/account_list_response_spec.rb
|
633
643
|
- spec/models/document_list_response_spec.rb
|
@@ -679,6 +689,7 @@ test_files:
|
|
679
689
|
- spec/models/sender_list_response_spec.rb
|
680
690
|
- spec/models/field_description_spec.rb
|
681
691
|
- spec/models/currency_exchange_spec.rb
|
692
|
+
- spec/models/politically_exposed_person_spec.rb
|
682
693
|
- spec/models/payin_method_details_spec.rb
|
683
694
|
- spec/models/account_validation_error_spec.rb
|
684
695
|
- spec/spec_helper.rb
|
data/spec/api_client_spec.rb
DELETED
@@ -1,189 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#TransferZero API
|
3
|
-
|
4
|
-
#Reference documentation for the TransferZero API V1
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.0.0-beta2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
|
15
|
-
describe TransferZero::ApiClient do
|
16
|
-
context 'initialization' do
|
17
|
-
context 'URL stuff' do
|
18
|
-
context 'host' do
|
19
|
-
it 'removes http from host' do
|
20
|
-
TransferZero.configure { |c| c.host = 'http://example.com' }
|
21
|
-
expect(TransferZero::Configuration.default.host).to eq('example.com')
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'removes https from host' do
|
25
|
-
TransferZero.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
-
expect(TransferZero::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'removes trailing path from host' do
|
30
|
-
TransferZero.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
-
expect(TransferZero::Configuration.default.host).to eq('hobo.com')
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'base_path' do
|
36
|
-
it "prepends a slash to base_path" do
|
37
|
-
TransferZero.configure { |c| c.base_path = 'v4/dog' }
|
38
|
-
expect(TransferZero::Configuration.default.base_path).to eq('/v4/dog')
|
39
|
-
end
|
40
|
-
|
41
|
-
it "doesn't prepend a slash if one is already there" do
|
42
|
-
TransferZero.configure { |c| c.base_path = '/v4/dog' }
|
43
|
-
expect(TransferZero::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
-
end
|
45
|
-
|
46
|
-
it "ends up as a blank string if nil" do
|
47
|
-
TransferZero.configure { |c| c.base_path = nil }
|
48
|
-
expect(TransferZero::Configuration.default.base_path).to eq('')
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe '#deserialize' do
|
55
|
-
it "handles Array<Integer>" do
|
56
|
-
api_client = TransferZero::ApiClient.new
|
57
|
-
headers = { 'Content-Type' => 'application/json' }
|
58
|
-
response = double('response', headers: headers, body: '[12, 34]')
|
59
|
-
data = api_client.deserialize(response, 'Array<Integer>')
|
60
|
-
expect(data).to be_instance_of(Array)
|
61
|
-
expect(data).to eq([12, 34])
|
62
|
-
end
|
63
|
-
|
64
|
-
it 'handles Array<Array<Integer>>' do
|
65
|
-
api_client = TransferZero::ApiClient.new
|
66
|
-
headers = { 'Content-Type' => 'application/json' }
|
67
|
-
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
68
|
-
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
69
|
-
expect(data).to be_instance_of(Array)
|
70
|
-
expect(data).to eq([[12, 34], [56]])
|
71
|
-
end
|
72
|
-
|
73
|
-
it 'handles Hash<String, String>' do
|
74
|
-
api_client = TransferZero::ApiClient.new
|
75
|
-
headers = { 'Content-Type' => 'application/json' }
|
76
|
-
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
77
|
-
data = api_client.deserialize(response, 'Hash<String, String>')
|
78
|
-
expect(data).to be_instance_of(Hash)
|
79
|
-
expect(data).to eq(:message => 'Hello')
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
describe "#object_to_hash" do
|
84
|
-
it 'ignores nils and includes empty arrays' do
|
85
|
-
# uncomment below to test object_to_hash for model
|
86
|
-
# api_client = TransferZero::ApiClient.new
|
87
|
-
# _model = TransferZero::ModelName.new
|
88
|
-
# update the model attribute below
|
89
|
-
# _model.id = 1
|
90
|
-
# update the expected value (hash) below
|
91
|
-
# expected = {id: 1, name: '', tags: []}
|
92
|
-
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe '#build_collection_param' do
|
97
|
-
let(:param) { ['aa', 'bb', 'cc'] }
|
98
|
-
let(:api_client) { TransferZero::ApiClient.new }
|
99
|
-
|
100
|
-
it 'works for csv' do
|
101
|
-
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
102
|
-
end
|
103
|
-
|
104
|
-
it 'works for ssv' do
|
105
|
-
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
106
|
-
end
|
107
|
-
|
108
|
-
it 'works for tsv' do
|
109
|
-
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
110
|
-
end
|
111
|
-
|
112
|
-
it 'works for pipes' do
|
113
|
-
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
114
|
-
end
|
115
|
-
|
116
|
-
it 'works for multi' do
|
117
|
-
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
118
|
-
end
|
119
|
-
|
120
|
-
it 'fails for invalid collection format' do
|
121
|
-
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
describe '#json_mime?' do
|
126
|
-
let(:api_client) { TransferZero::ApiClient.new }
|
127
|
-
|
128
|
-
it 'works' do
|
129
|
-
expect(api_client.json_mime?(nil)).to eq false
|
130
|
-
expect(api_client.json_mime?('')).to eq false
|
131
|
-
|
132
|
-
expect(api_client.json_mime?('application/json')).to eq true
|
133
|
-
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
134
|
-
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
135
|
-
|
136
|
-
expect(api_client.json_mime?('application/xml')).to eq false
|
137
|
-
expect(api_client.json_mime?('text/plain')).to eq false
|
138
|
-
expect(api_client.json_mime?('application/jsonp')).to eq false
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
describe '#select_header_accept' do
|
143
|
-
let(:api_client) { TransferZero::ApiClient.new }
|
144
|
-
|
145
|
-
it 'works' do
|
146
|
-
expect(api_client.select_header_accept(nil)).to be_nil
|
147
|
-
expect(api_client.select_header_accept([])).to be_nil
|
148
|
-
|
149
|
-
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
150
|
-
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
151
|
-
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
152
|
-
|
153
|
-
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
154
|
-
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
describe '#select_header_content_type' do
|
159
|
-
let(:api_client) { TransferZero::ApiClient.new }
|
160
|
-
|
161
|
-
it 'works' do
|
162
|
-
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
163
|
-
expect(api_client.select_header_content_type([])).to eq('application/json')
|
164
|
-
|
165
|
-
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
166
|
-
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
167
|
-
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
168
|
-
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
169
|
-
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
describe '#sanitize_filename' do
|
174
|
-
let(:api_client) { TransferZero::ApiClient.new }
|
175
|
-
|
176
|
-
it 'works' do
|
177
|
-
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
178
|
-
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
179
|
-
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
180
|
-
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
181
|
-
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
182
|
-
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
183
|
-
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
184
|
-
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
185
|
-
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
|