bitpesa-sdk 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -0
- data/Gemfile.lock +5 -4
- data/README.md +19 -7
- data/docs/Sender.md +1 -0
- data/docs/SenderResponse.md +1 -0
- data/docs/SenderResponseExisting.md +8 -0
- data/docs/SenderResponseMeta.md +8 -0
- data/docs/SendersApi.md +2 -0
- data/docs/Transaction.md +1 -0
- data/docs/TransactionResponse.md +1 -0
- data/docs/TransactionResponseExisting.md +9 -0
- data/docs/TransactionResponseMeta.md +8 -0
- data/docs/TransactionsApi.md +2 -0
- data/example/client.rb +47 -9
- data/lib/bitpesa-sdk.rb +4 -0
- data/lib/bitpesa-sdk/api/senders_api.rb +3 -0
- data/lib/bitpesa-sdk/api/transactions_api.rb +3 -0
- data/lib/bitpesa-sdk/api_client.rb +1 -1
- data/lib/bitpesa-sdk/models/sender.rb +12 -2
- data/lib/bitpesa-sdk/models/sender_response.rb +13 -4
- data/lib/bitpesa-sdk/models/sender_response_existing.rb +195 -0
- data/lib/bitpesa-sdk/models/sender_response_meta.rb +195 -0
- data/lib/bitpesa-sdk/models/transaction.rb +11 -1
- data/lib/bitpesa-sdk/models/transaction_response.rb +13 -4
- data/lib/bitpesa-sdk/models/transaction_response_existing.rb +204 -0
- data/lib/bitpesa-sdk/models/transaction_response_meta.rb +195 -0
- data/lib/bitpesa-sdk/version.rb +1 -1
- data/spec/api/account_debits_api_spec.rb +17 -15
- data/spec/api/account_validation_api_spec.rb +10 -10
- data/spec/api/accounts_api_spec.rb +13 -13
- data/spec/api/api_logs_api_spec.rb +15 -11
- data/spec/api/currency_info_api_spec.rb +13 -13
- data/spec/api/documents_api_spec.rb +16 -14
- data/spec/api/logs_api_spec.rb +15 -11
- data/spec/api/payment_methods_api_spec.rb +11 -11
- data/spec/api/payout_methods_api_spec.rb +55 -11
- data/spec/api/recipients_api_spec.rb +23 -18
- data/spec/api/senders_api_spec.rb +26 -21
- data/spec/api/transactions_api_spec.rb +48 -22
- data/spec/api/webhooks_api_spec.rb +20 -20
- data/spec/api_client_spec.rb +52 -90
- data/spec/configuration_spec.rb +13 -13
- data/spec/models/account_meta_spec.rb +5 -6
- data/spec/models/api_log_spec.rb +16 -17
- data/spec/models/currency_spec.rb +27 -16
- data/spec/models/debit_request_spec.rb +9 -34
- data/spec/models/debit_spec.rb +42 -13
- data/spec/models/document_request_spec.rb +9 -56
- data/spec/models/document_spec.rb +71 -8
- data/spec/models/pagination_spec.rb +33 -10
- data/spec/models/payin_method_details_mobile_spec.rb +6 -7
- data/spec/models/payin_method_details_ngn_bank_spec.rb +5 -6
- data/spec/models/payment_method_spec.rb +19 -14
- data/spec/models/payout_method_details_balance_spec.rb +5 -6
- data/spec/models/payout_method_details_ghs_bank_spec.rb +8 -9
- data/spec/models/payout_method_details_iban_spec.rb +9 -10
- data/spec/models/payout_method_details_mad_cash_spec.rb +15 -24
- data/spec/models/payout_method_details_mobile_spec.rb +7 -8
- data/spec/models/payout_method_details_ngn_bank_spec.rb +9 -14
- data/spec/models/payout_method_details_xof_mobile_spec.rb +8 -13
- data/spec/models/payout_method_request_spec.rb +6 -19
- data/spec/models/payout_method_response_spec.rb +6 -19
- data/spec/models/payout_method_spec.rb +18 -19
- data/spec/models/recipient_request_spec.rb +6 -25
- data/spec/models/recipient_response_spec.rb +6 -103
- data/spec/models/recipient_spec.rb +127 -8
- data/spec/models/sender_request_spec.rb +9 -104
- data/spec/models/sender_response_existing_spec.rb +41 -0
- data/spec/models/sender_response_meta_spec.rb +41 -0
- data/spec/models/sender_response_spec.rb +8 -103
- data/spec/models/sender_spec.rb +167 -8
- data/spec/models/transaction_request_spec.rb +9 -16
- data/spec/models/transaction_response_existing_spec.rb +47 -0
- data/spec/models/transaction_response_meta_spec.rb +41 -0
- data/spec/models/transaction_response_spec.rb +8 -75
- data/spec/models/transaction_spec.rb +84 -13
- data/spec/models/transaction_traits_spec.rb +6 -7
- data/spec/models/webhook_definition_request_spec.rb +6 -19
- data/spec/models/webhook_log_metadata_request_spec.rb +10 -11
- data/spec/models/webhook_log_metadata_response_spec.rb +10 -11
- data/spec/models/webhook_log_metadata_spec.rb +17 -18
- data/spec/models/webhook_log_spec.rb +13 -14
- data/spec/models/webhook_spec.rb +7 -8
- data/spec/spec_helper.rb +4 -4
- metadata +19 -309
- data/example/.LICENSE.un~ +0 -0
- data/example/.client.rb.un~ +0 -0
- data/spec/api/transaction_requests_api_spec.rb +0 -76
- data/spec/models/account_base_spec.rb +0 -48
- data/spec/models/api_log_base_spec.rb +0 -90
- data/spec/models/body_spec.rb +0 -58
- data/spec/models/currency_base_spec.rb +0 -84
- data/spec/models/debit_base_spec.rb +0 -66
- data/spec/models/debit_error_response_spec.rb +0 -72
- data/spec/models/debit_valid_response_spec.rb +0 -72
- data/spec/models/default_document_spec.rb +0 -94
- data/spec/models/default_recipient_spec.rb +0 -60
- data/spec/models/default_sender_spec.rb +0 -142
- data/spec/models/default_webhook_spec.rb +0 -60
- data/spec/models/document_base_spec.rb +0 -88
- data/spec/models/document_error_response_spec.rb +0 -94
- data/spec/models/document_valid_response_spec.rb +0 -94
- data/spec/models/full_invalid_transaction_request_spec.rb +0 -78
- data/spec/models/full_invalid_transaction_spec.rb +0 -66
- data/spec/models/full_valid_transaction_request_spec.rb +0 -66
- data/spec/models/full_valid_transaction_spec.rb +0 -60
- data/spec/models/inline_response_200_10_spec.rb +0 -42
- data/spec/models/inline_response_200_11_spec.rb +0 -48
- data/spec/models/inline_response_200_12_spec.rb +0 -42
- data/spec/models/inline_response_200_13_spec.rb +0 -48
- data/spec/models/inline_response_200_14_spec.rb +0 -42
- data/spec/models/inline_response_200_15_spec.rb +0 -48
- data/spec/models/inline_response_200_16_spec.rb +0 -48
- data/spec/models/inline_response_200_17_spec.rb +0 -48
- data/spec/models/inline_response_200_18_spec.rb +0 -42
- data/spec/models/inline_response_200_19_spec.rb +0 -48
- data/spec/models/inline_response_200_1_spec.rb +0 -48
- data/spec/models/inline_response_200_20_spec.rb +0 -42
- data/spec/models/inline_response_200_21_object_spec.rb +0 -42
- data/spec/models/inline_response_200_21_spec.rb +0 -42
- data/spec/models/inline_response_200_22_object_spec.rb +0 -42
- data/spec/models/inline_response_200_22_spec.rb +0 -42
- data/spec/models/inline_response_200_23_object_spec.rb +0 -42
- data/spec/models/inline_response_200_23_spec.rb +0 -48
- data/spec/models/inline_response_200_24_spec.rb +0 -42
- data/spec/models/inline_response_200_25_spec.rb +0 -42
- data/spec/models/inline_response_200_26_spec.rb +0 -42
- data/spec/models/inline_response_200_27_spec.rb +0 -48
- data/spec/models/inline_response_200_28_spec.rb +0 -42
- data/spec/models/inline_response_200_29_spec.rb +0 -48
- data/spec/models/inline_response_200_2_object_spec.rb +0 -42
- data/spec/models/inline_response_200_2_spec.rb +0 -42
- data/spec/models/inline_response_200_30_spec.rb +0 -42
- data/spec/models/inline_response_200_31_spec.rb +0 -48
- data/spec/models/inline_response_200_32_spec.rb +0 -42
- data/spec/models/inline_response_200_33_spec.rb +0 -48
- data/spec/models/inline_response_200_34_spec.rb +0 -42
- data/spec/models/inline_response_200_35_spec.rb +0 -48
- data/spec/models/inline_response_200_36_spec.rb +0 -48
- data/spec/models/inline_response_200_37_spec.rb +0 -48
- data/spec/models/inline_response_200_38_spec.rb +0 -42
- data/spec/models/inline_response_200_39_spec.rb +0 -48
- data/spec/models/inline_response_200_3_spec.rb +0 -48
- data/spec/models/inline_response_200_40_spec.rb +0 -42
- data/spec/models/inline_response_200_4_object_spec.rb +0 -42
- data/spec/models/inline_response_200_4_spec.rb +0 -42
- data/spec/models/inline_response_200_5_spec.rb +0 -42
- data/spec/models/inline_response_200_6_spec.rb +0 -42
- data/spec/models/inline_response_200_7_spec.rb +0 -48
- data/spec/models/inline_response_200_8_spec.rb +0 -42
- data/spec/models/inline_response_200_9_spec.rb +0 -48
- data/spec/models/inline_response_200_spec.rb +0 -48
- data/spec/models/inline_response_201_10_spec.rb +0 -42
- data/spec/models/inline_response_201_11_spec.rb +0 -42
- data/spec/models/inline_response_201_1_spec.rb +0 -42
- data/spec/models/inline_response_201_2_spec.rb +0 -42
- data/spec/models/inline_response_201_3_spec.rb +0 -42
- data/spec/models/inline_response_201_4_spec.rb +0 -42
- data/spec/models/inline_response_201_5_spec.rb +0 -42
- data/spec/models/inline_response_201_6_spec.rb +0 -42
- data/spec/models/inline_response_201_7_spec.rb +0 -42
- data/spec/models/inline_response_201_8_spec.rb +0 -42
- data/spec/models/inline_response_201_9_spec.rb +0 -42
- data/spec/models/inline_response_201_spec.rb +0 -42
- data/spec/models/inline_response_400_1_spec.rb +0 -48
- data/spec/models/inline_response_400_spec.rb +0 -48
- data/spec/models/inline_response_422_10_spec.rb +0 -42
- data/spec/models/inline_response_422_11_spec.rb +0 -42
- data/spec/models/inline_response_422_12_spec.rb +0 -42
- data/spec/models/inline_response_422_13_spec.rb +0 -42
- data/spec/models/inline_response_422_14_spec.rb +0 -42
- data/spec/models/inline_response_422_1_meta_spec.rb +0 -42
- data/spec/models/inline_response_422_1_object_spec.rb +0 -42
- data/spec/models/inline_response_422_1_spec.rb +0 -42
- data/spec/models/inline_response_422_2_spec.rb +0 -42
- data/spec/models/inline_response_422_3_spec.rb +0 -42
- data/spec/models/inline_response_422_4_spec.rb +0 -42
- data/spec/models/inline_response_422_5_spec.rb +0 -42
- data/spec/models/inline_response_422_6_spec.rb +0 -42
- data/spec/models/inline_response_422_7_meta_spec.rb +0 -42
- data/spec/models/inline_response_422_7_spec.rb +0 -42
- data/spec/models/inline_response_422_8_meta_spec.rb +0 -42
- data/spec/models/inline_response_422_8_object_spec.rb +0 -42
- data/spec/models/inline_response_422_8_spec.rb +0 -48
- data/spec/models/inline_response_422_9_spec.rb +0 -42
- data/spec/models/inline_response_422_meta_spec.rb +0 -42
- data/spec/models/inline_response_422_object_spec.rb +0 -42
- data/spec/models/inline_response_422_spec.rb +0 -48
- data/spec/models/invalid_debit_spec.rb +0 -78
- data/spec/models/invalid_document_spec.rb +0 -100
- data/spec/models/invalid_recipient_spec.rb +0 -66
- data/spec/models/invalid_sender_spec.rb +0 -148
- data/spec/models/invalid_webhook_spec.rb +0 -60
- data/spec/models/meta_2_pagination_spec.rb +0 -66
- data/spec/models/meta_2_spec.rb +0 -42
- data/spec/models/meta_pagination_spec.rb +0 -66
- data/spec/models/meta_spec.rb +0 -42
- data/spec/models/object_spec.rb +0 -48
- data/spec/models/opposite_payment_method_base_spec.rb +0 -72
- data/spec/models/opposite_payment_method_spec.rb +0 -72
- data/spec/models/pagination_pagination_spec.rb +0 -66
- data/spec/models/payin_method_base_spec.rb +0 -66
- data/spec/models/payin_method_details_base_spec.rb +0 -36
- data/spec/models/payin_method_type_base_spec.rb +0 -42
- data/spec/models/payin_method_type_spec.rb +0 -42
- data/spec/models/payment_method_base_spec.rb +0 -66
- data/spec/models/payout_method_base_spec.rb +0 -54
- data/spec/models/payout_method_details_base_spec.rb +0 -36
- data/spec/models/payout_method_error_response_spec.rb +0 -60
- data/spec/models/payout_method_valid_response_spec.rb +0 -60
- data/spec/models/recipient_base_spec.rb +0 -54
- data/spec/models/recipient_error_response_spec.rb +0 -60
- data/spec/models/recipient_valid_response_spec.rb +0 -60
- data/spec/models/sender_base_spec.rb +0 -136
- data/spec/models/sender_error_response_spec.rb +0 -142
- data/spec/models/sender_existing_request_spec.rb +0 -42
- data/spec/models/sender_full_request_spec.rb +0 -136
- data/spec/models/sender_valid_response_spec.rb +0 -142
- data/spec/models/transaction_base_spec.rb +0 -60
- data/spec/models/transaction_error_response_spec.rb +0 -66
- data/spec/models/transaction_request_base_spec.rb +0 -48
- data/spec/models/transaction_request_error_response_spec.rb +0 -54
- data/spec/models/transaction_request_request_spec.rb +0 -48
- data/spec/models/transaction_request_valid_response_spec.rb +0 -54
- data/spec/models/transaction_valid_response_spec.rb +0 -66
- data/spec/models/valid_debit_spec.rb +0 -90
- data/spec/models/webhook_base_spec.rb +0 -54
- data/spec/models/webhook_definition_base_spec.rb +0 -54
- data/spec/models/webhook_definition_error_response_spec.rb +0 -60
- data/spec/models/webhook_definition_valid_response_spec.rb +0 -60
- data/spec/models/webhook_error_response_spec.rb +0 -60
- data/spec/models/webhook_log_base_metadata_params_spec.rb +0 -42
- data/spec/models/webhook_log_base_metadata_request_spec.rb +0 -54
- data/spec/models/webhook_log_base_metadata_response_spec.rb +0 -54
- data/spec/models/webhook_log_base_metadata_spec.rb +0 -96
- data/spec/models/webhook_log_base_spec.rb +0 -72
- data/spec/models/webhook_log_metadata_params_spec.rb +0 -42
- data/spec/models/webhook_request_spec.rb +0 -54
- data/spec/models/webhook_valid_response_spec.rb +0 -60
data/lib/bitpesa-sdk/version.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::AccountDebitsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'AccountDebitsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::AccountDebitsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'AccountDebitsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of AccountDebitsApi' do
|
30
30
|
it 'should create an instance of AccountDebitsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::AccountDebitsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,9 +37,9 @@ describe 'AccountDebitsApi' do
|
|
37
37
|
# Returns a single account debit by the account debit ID
|
38
38
|
# @param account_debit_id ID of the account debit to get. Example: `/v1/accounts/debits/9170c890-1a45-46bd-9b79-3deeb8b4ff3d`
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [DebitResponse]
|
41
41
|
describe 'get_accounts_debit test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -48,21 +48,23 @@ describe 'AccountDebitsApi' do
|
|
48
48
|
# Listing Accounts debits
|
49
49
|
# Get a list of accounts debits
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @
|
51
|
+
# @option opts [Integer] :page The page number to request (defaults to 1)
|
52
|
+
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
53
|
+
# @return [DebitListResponse]
|
52
54
|
describe 'get_accounts_debits test' do
|
53
|
-
it
|
55
|
+
it 'should work' do
|
54
56
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
58
60
|
# unit tests for post_accounts_debits
|
59
61
|
# Creating an account debit
|
60
|
-
# Creates a new account debit
|
61
|
-
# @param
|
62
|
+
# Creates a new account debit finding transaction through the internal balance To successfully fund a transaction - - The currency needs to be the same as the input_currency on the transaction - The amount has to be the same as the input_amount on the transaction - The to_id is the id of the transaction - You need to have enough balance of the appropriate currency inside your wallet Once the transaction is funded, we will immediately start trying to pay out the recipient(s). It is also possible to create multiple account debits by supplying an array of debit objects
|
63
|
+
# @param debit_request_wrapper
|
62
64
|
# @param [Hash] opts the optional parameters
|
63
|
-
# @return [
|
65
|
+
# @return [DebitListResponse]
|
64
66
|
describe 'post_accounts_debits test' do
|
65
|
-
it
|
67
|
+
it 'should work' do
|
66
68
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
69
|
end
|
68
70
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::AccountValidationApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'AccountValidationApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::AccountValidationApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,18 +28,18 @@ describe 'AccountValidationApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of AccountValidationApi' do
|
30
30
|
it 'should create an instance of AccountValidationApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::AccountValidationApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for post_account_validations
|
36
36
|
# Validates the existence of a bank account
|
37
37
|
# Validates the existence of a bank account and returns the associated customer name
|
38
|
-
# @param
|
38
|
+
# @param account_validation_request
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [AccountValidationResponse]
|
41
41
|
describe 'post_account_validations test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::AccountsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'AccountsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::AccountsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'AccountsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of AccountsApi' do
|
30
30
|
it 'should create an instance of AccountsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::AccountsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,20 +37,20 @@ describe 'AccountsApi' do
|
|
37
37
|
# Fetches account balance for specified currrency, and returns current balance and associated currency code
|
38
38
|
# @param currency Currency code of account balance to fetch Example: `/v1/accounts/USD`
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [AccountResponse]
|
41
41
|
describe 'get_account test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
# unit tests for get_accounts
|
48
|
-
# Fetches account balances for all
|
49
|
-
# Fetches account balances for all
|
48
|
+
# Fetches account balances for all currencies
|
49
|
+
# Fetches account balances for all currencies, and returns an array of the current balances and associated currency codes.
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @return [
|
51
|
+
# @return [AccountListResponse]
|
52
52
|
describe 'get_accounts test' do
|
53
|
-
it
|
53
|
+
it 'should work' do
|
54
54
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
55
|
end
|
56
56
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::APILogsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'APILogsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::APILogsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'APILogsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of APILogsApi' do
|
30
30
|
it 'should create an instance of APILogsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::APILogsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,9 +37,9 @@ describe 'APILogsApi' do
|
|
37
37
|
# Returns a single API log based on the API log ID.
|
38
38
|
# @param api_log_id ID of the API log to retrieve Example: `/v1/api_logs/00485ce9-532b-45e7-8518-7e5582242407`
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [ApiLogResponse]
|
41
41
|
describe 'get_api_log test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -48,9 +48,13 @@ describe 'APILogsApi' do
|
|
48
48
|
# Fetch a list of API logs
|
49
49
|
# Returns a list of API logs. Also includes information relating to the original request.
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @
|
51
|
+
# @option opts [Integer] :page The page number to request (defaults to 1)
|
52
|
+
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
53
|
+
# @option opts [String] :created_at_from Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
|
54
|
+
# @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
|
55
|
+
# @return [ApiLogListResponse]
|
52
56
|
describe 'get_api_logs test' do
|
53
|
-
it
|
57
|
+
it 'should work' do
|
54
58
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
59
|
end
|
56
60
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::CurrencyInfoApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'CurrencyInfoApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::CurrencyInfoApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'CurrencyInfoApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of CurrencyInfoApi' do
|
30
30
|
it 'should create an instance of CurrencyInfoApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::CurrencyInfoApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -36,9 +36,9 @@ describe 'CurrencyInfoApi' do
|
|
36
36
|
# Getting a list of possible requested currencies
|
37
37
|
# Fetches a list of currencies available to use in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [
|
39
|
+
# @return [CurrencyListResponse]
|
40
40
|
describe 'info_currencies test' do
|
41
|
-
it
|
41
|
+
it 'should work' do
|
42
42
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
43
|
end
|
44
44
|
end
|
@@ -47,9 +47,9 @@ describe 'CurrencyInfoApi' do
|
|
47
47
|
# Getting a list of possible input currencies
|
48
48
|
# Fetches a list of currencies available to use as the input currency in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier. Use this endpoint to determine the current exchange rate from a specific input currency to any output currency that's available.
|
49
49
|
# @param [Hash] opts the optional parameters
|
50
|
-
# @return [
|
50
|
+
# @return [CurrencyExchangeListResponse]
|
51
51
|
describe 'info_currencies_in test' do
|
52
|
-
it
|
52
|
+
it 'should work' do
|
53
53
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
54
|
end
|
55
55
|
end
|
@@ -58,9 +58,9 @@ describe 'CurrencyInfoApi' do
|
|
58
58
|
# Getting a list of possible output currencies
|
59
59
|
# Fetches a list of currencies available to use as the output currency and their exchange rates against the available input currencies. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
|
60
60
|
# @param [Hash] opts the optional parameters
|
61
|
-
# @return [
|
61
|
+
# @return [CurrencyExchangeListResponse]
|
62
62
|
describe 'info_currencies_out test' do
|
63
|
-
it
|
63
|
+
it 'should work' do
|
64
64
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
65
65
|
end
|
66
66
|
end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::DocumentsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'DocumentsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::DocumentsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'DocumentsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of DocumentsApi' do
|
30
30
|
it 'should create an instance of DocumentsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::DocumentsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,9 +37,9 @@ describe 'DocumentsApi' do
|
|
37
37
|
# Returns a single document by the Documents ID
|
38
38
|
# @param document_id ID of the document to get. Example: `/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670`
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [DocumentResponse]
|
41
41
|
describe 'get_document test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -48,9 +48,11 @@ describe 'DocumentsApi' do
|
|
48
48
|
# Getting a list of documents
|
49
49
|
# Fetches a list of documents.
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @
|
51
|
+
# @option opts [Integer] :page The page number to request (defaults to 1)
|
52
|
+
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
53
|
+
# @return [DocumentListResponse]
|
52
54
|
describe 'get_documents test' do
|
53
|
-
it
|
55
|
+
it 'should work' do
|
54
56
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
57
|
end
|
56
58
|
end
|
@@ -58,11 +60,11 @@ describe 'DocumentsApi' do
|
|
58
60
|
# unit tests for post_documents
|
59
61
|
# Creating a document
|
60
62
|
# Creates a new document
|
61
|
-
# @param
|
63
|
+
# @param document_request
|
62
64
|
# @param [Hash] opts the optional parameters
|
63
|
-
# @return [
|
65
|
+
# @return [DocumentResponse]
|
64
66
|
describe 'post_documents test' do
|
65
|
-
it
|
67
|
+
it 'should work' do
|
66
68
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
69
|
end
|
68
70
|
end
|
data/spec/api/logs_api_spec.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#BitPesa API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Reference documentation for the BitPesa API V1
|
5
5
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.0.0-beta2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for Bitpesa::LogsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'LogsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = Bitpesa::LogsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'LogsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of LogsApi' do
|
30
30
|
it 'should create an instance of LogsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(Bitpesa::LogsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,9 +37,9 @@ describe 'LogsApi' do
|
|
37
37
|
# Returns a single webhook log based on the webhook log ID.
|
38
38
|
# @param webhook_log_id ID of the webhook log to retrieve Example: `/v1/logs/9d1ad631-f34a-4cff-9a7e-2c83e3a556df`
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [
|
40
|
+
# @return [WebhookLogResponse]
|
41
41
|
describe 'get_webhook_log test' do
|
42
|
-
it
|
42
|
+
it 'should work' do
|
43
43
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
44
|
end
|
45
45
|
end
|
@@ -48,9 +48,13 @@ describe 'LogsApi' do
|
|
48
48
|
# Fetch a list of webhook logs
|
49
49
|
# Returns a list of webhook logs. Response includes pagination.
|
50
50
|
# @param [Hash] opts the optional parameters
|
51
|
-
# @
|
51
|
+
# @option opts [Integer] :page The page number to request (defaults to 1)
|
52
|
+
# @option opts [Integer] :per The number of results to load per page (defaults to 10)
|
53
|
+
# @option opts [String] :created_at_from Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
|
54
|
+
# @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
|
55
|
+
# @return [WebhookLogListResponse]
|
52
56
|
describe 'get_webhook_logs test' do
|
53
|
-
it
|
57
|
+
it 'should work' do
|
54
58
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
59
|
end
|
56
60
|
end
|