africastalking-ruby 2.1.9 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1caf1f74d9b3372cbc660fa10382e4fdc5b9c0bf6a56b5bbc3db624efa68fe8
4
- data.tar.gz: 7225710bdc096661538b16c80ac95c9131d85602f3e7defdc078a9c2104e796d
3
+ metadata.gz: 0acec7a05a0f4cb8df0db42175d46cb3da1085d9667f70f6b1dc87ecea7f4553
4
+ data.tar.gz: 97c2ebdb16fcaedbdf37799f75fb47807c5c2948c8d391ad671efca4f760e54c
5
5
  SHA512:
6
- metadata.gz: e5b1b59ee256c9d6f10b37ebcb0e1fe903766fc51e879c3c18f51ce7948e30731c8de594206d3de9ef82ebfafec82c60c5c08060dc899a72be16f564cbdcac5e
7
- data.tar.gz: d6bceffcbede1d93df1872eb84749db148659fe6d6a3f2f91dacd48bc537f633d7fafb30b01e1d9353c8086a748dbb86aba85bebbc4d81d8de5eb334b6b8f97f
6
+ metadata.gz: 81be4a527268a3c681a5d8a8f7b7419c91ace4217ba9e967681cb516ea6284d778fd755508cdf4e5bb0b00bdf8899cd8392e437b2acf94b7fc5daff34c9cba61
7
+ data.tar.gz: 2e1e32fd33711f31eaa5d21f1ed1c95acb104d386b489e03d145fc5e97dabfcf82c1241de1daef43624cd797b65a3589f13a38fa00ab40701ce91040f93ae518
data/Gemfile.lock CHANGED
@@ -1,121 +1,182 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- africastalking-ruby (2.1.9)
5
- httparty (= 0.16.1)
4
+ africastalking-ruby (2.2.0)
5
+ httparty (>= 0.21.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (6.0.2.1)
11
- actionview (= 6.0.2.1)
12
- activesupport (= 6.0.2.1)
13
- rack (~> 2.0, >= 2.0.8)
10
+ actionpack (7.1.3)
11
+ actionview (= 7.1.3)
12
+ activesupport (= 7.1.3)
13
+ nokogiri (>= 1.8.5)
14
+ racc
15
+ rack (>= 2.2.4)
16
+ rack-session (>= 1.0.1)
14
17
  rack-test (>= 0.6.3)
15
- rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
- actionview (6.0.2.1)
18
- activesupport (= 6.0.2.1)
18
+ rails-dom-testing (~> 2.2)
19
+ rails-html-sanitizer (~> 1.6)
20
+ actionview (7.1.3)
21
+ activesupport (= 7.1.3)
19
22
  builder (~> 3.1)
20
- erubi (~> 1.4)
21
- rails-dom-testing (~> 2.0)
22
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
- activesupport (6.0.2.1)
23
+ erubi (~> 1.11)
24
+ rails-dom-testing (~> 2.2)
25
+ rails-html-sanitizer (~> 1.6)
26
+ activesupport (7.1.3)
27
+ base64
28
+ bigdecimal
24
29
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
- i18n (>= 0.7, < 2)
26
- minitest (~> 5.1)
27
- tzinfo (~> 1.1)
28
- zeitwerk (~> 2.2)
29
- ast (2.4.0)
30
+ connection_pool (>= 2.2.5)
31
+ drb
32
+ i18n (>= 1.6, < 2)
33
+ minitest (>= 5.1)
34
+ mutex_m
35
+ tzinfo (~> 2.0)
36
+ ast (2.4.2)
37
+ base64 (0.2.0)
38
+ bigdecimal (3.1.6)
30
39
  builder (3.2.4)
31
- coderay (1.1.2)
32
- concurrent-ruby (1.1.5)
33
- crass (1.0.5)
34
- diff-lcs (1.3)
35
- erubi (1.9.0)
36
- httparty (0.16.1)
40
+ coderay (1.1.3)
41
+ concurrent-ruby (1.2.3)
42
+ connection_pool (2.4.1)
43
+ crass (1.0.6)
44
+ diff-lcs (1.5.0)
45
+ drb (2.2.0)
46
+ ruby2_keywords
47
+ erubi (1.12.0)
48
+ httparty (0.21.0)
49
+ mini_mime (>= 1.0.0)
37
50
  multi_xml (>= 0.5.2)
38
- i18n (1.8.1)
51
+ i18n (1.14.1)
39
52
  concurrent-ruby (~> 1.0)
40
- loofah (2.4.0)
53
+ io-console (0.7.2)
54
+ irb (1.11.1)
55
+ rdoc
56
+ reline (>= 0.4.2)
57
+ json (2.7.1)
58
+ language_server-protocol (3.17.0.3)
59
+ loofah (2.22.0)
41
60
  crass (~> 1.0.2)
42
- nokogiri (>= 1.5.9)
43
- method_source (0.9.2)
44
- mini_portile2 (2.4.0)
45
- minitest (5.13.0)
61
+ nokogiri (>= 1.12.0)
62
+ method_source (1.0.0)
63
+ mini_mime (1.1.5)
64
+ minitest (5.21.2)
46
65
  multi_xml (0.6.0)
47
- nokogiri (1.10.7)
48
- mini_portile2 (~> 2.4.0)
49
- parallel (1.19.1)
50
- parser (2.7.0.2)
51
- ast (~> 2.4.0)
52
- powerpack (0.1.2)
53
- pry (0.12.2)
54
- coderay (~> 1.1.0)
55
- method_source (~> 0.9.0)
56
- rack (2.0.8)
57
- rack-test (1.1.0)
58
- rack (>= 1.0, < 3)
59
- rails-dom-testing (2.0.3)
60
- activesupport (>= 4.2.0)
66
+ mutex_m (0.2.0)
67
+ nokogiri (1.16.0-aarch64-linux)
68
+ racc (~> 1.4)
69
+ nokogiri (1.16.0-arm-linux)
70
+ racc (~> 1.4)
71
+ nokogiri (1.16.0-arm64-darwin)
72
+ racc (~> 1.4)
73
+ nokogiri (1.16.0-x86-linux)
74
+ racc (~> 1.4)
75
+ nokogiri (1.16.0-x86_64-darwin)
76
+ racc (~> 1.4)
77
+ nokogiri (1.16.0-x86_64-linux)
78
+ racc (~> 1.4)
79
+ parallel (1.24.0)
80
+ parser (3.3.0.5)
81
+ ast (~> 2.4.1)
82
+ racc
83
+ pry (0.14.2)
84
+ coderay (~> 1.1)
85
+ method_source (~> 1.0)
86
+ psych (5.1.2)
87
+ stringio
88
+ racc (1.7.3)
89
+ rack (3.0.8)
90
+ rack-session (2.0.0)
91
+ rack (>= 3.0.0)
92
+ rack-test (2.1.0)
93
+ rack (>= 1.3)
94
+ rackup (2.1.0)
95
+ rack (>= 3)
96
+ webrick (~> 1.8)
97
+ rails-dom-testing (2.2.0)
98
+ activesupport (>= 5.0.0)
99
+ minitest
61
100
  nokogiri (>= 1.6)
62
- rails-html-sanitizer (1.3.0)
63
- loofah (~> 2.3)
64
- railties (6.0.2.1)
65
- actionpack (= 6.0.2.1)
66
- activesupport (= 6.0.2.1)
67
- method_source
68
- rake (>= 0.8.7)
69
- thor (>= 0.20.3, < 2.0)
70
- rainbow (3.0.0)
71
- rake (10.5.0)
72
- rspec (3.7.0)
73
- rspec-core (~> 3.7.0)
74
- rspec-expectations (~> 3.7.0)
75
- rspec-mocks (~> 3.7.0)
76
- rspec-core (3.7.1)
77
- rspec-support (~> 3.7.0)
78
- rspec-expectations (3.7.0)
101
+ rails-html-sanitizer (1.6.0)
102
+ loofah (~> 2.21)
103
+ nokogiri (~> 1.14)
104
+ railties (7.1.3)
105
+ actionpack (= 7.1.3)
106
+ activesupport (= 7.1.3)
107
+ irb
108
+ rackup (>= 1.0.0)
109
+ rake (>= 12.2)
110
+ thor (~> 1.0, >= 1.2.2)
111
+ zeitwerk (~> 2.6)
112
+ rainbow (3.1.1)
113
+ rake (13.1.0)
114
+ rdoc (6.6.2)
115
+ psych (>= 4.0.0)
116
+ regexp_parser (2.9.0)
117
+ reline (0.4.2)
118
+ io-console (~> 0.5)
119
+ rexml (3.2.6)
120
+ rspec (3.12.0)
121
+ rspec-core (~> 3.12.0)
122
+ rspec-expectations (~> 3.12.0)
123
+ rspec-mocks (~> 3.12.0)
124
+ rspec-core (3.12.2)
125
+ rspec-support (~> 3.12.0)
126
+ rspec-expectations (3.12.3)
79
127
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.7.0)
81
- rspec-mocks (3.7.0)
128
+ rspec-support (~> 3.12.0)
129
+ rspec-mocks (3.12.6)
82
130
  diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.7.0)
84
- rspec-rails (3.7.2)
85
- actionpack (>= 3.0)
86
- activesupport (>= 3.0)
87
- railties (>= 3.0)
88
- rspec-core (~> 3.7.0)
89
- rspec-expectations (~> 3.7.0)
90
- rspec-mocks (~> 3.7.0)
91
- rspec-support (~> 3.7.0)
92
- rspec-support (3.7.1)
93
- rubocop (0.54.0)
131
+ rspec-support (~> 3.12.0)
132
+ rspec-rails (6.1.0)
133
+ actionpack (>= 6.1)
134
+ activesupport (>= 6.1)
135
+ railties (>= 6.1)
136
+ rspec-core (~> 3.12)
137
+ rspec-expectations (~> 3.12)
138
+ rspec-mocks (~> 3.12)
139
+ rspec-support (~> 3.12)
140
+ rspec-support (3.12.1)
141
+ rubocop (1.60.1)
142
+ json (~> 2.3)
143
+ language_server-protocol (>= 3.17.0)
94
144
  parallel (~> 1.10)
95
- parser (>= 2.5)
96
- powerpack (~> 0.1)
145
+ parser (>= 3.3.0.2)
97
146
  rainbow (>= 2.2.2, < 4.0)
147
+ regexp_parser (>= 1.8, < 3.0)
148
+ rexml (>= 3.2.5, < 4.0)
149
+ rubocop-ast (>= 1.30.0, < 2.0)
98
150
  ruby-progressbar (~> 1.7)
99
- unicode-display_width (~> 1.0, >= 1.0.1)
100
- ruby-progressbar (1.10.1)
101
- thor (1.0.1)
102
- thread_safe (0.3.6)
103
- tzinfo (1.2.6)
104
- thread_safe (~> 0.1)
105
- unicode-display_width (1.6.0)
106
- zeitwerk (2.2.2)
151
+ unicode-display_width (>= 2.4.0, < 3.0)
152
+ rubocop-ast (1.30.0)
153
+ parser (>= 3.2.1.0)
154
+ ruby-progressbar (1.13.0)
155
+ ruby2_keywords (0.0.5)
156
+ stringio (3.1.0)
157
+ thor (1.3.0)
158
+ tzinfo (2.0.6)
159
+ concurrent-ruby (~> 1.0)
160
+ unicode-display_width (2.5.0)
161
+ webrick (1.8.1)
162
+ zeitwerk (2.6.12)
107
163
 
108
164
  PLATFORMS
109
- ruby
165
+ aarch64-linux
166
+ arm-linux
167
+ arm64-darwin
168
+ x86-linux
169
+ x86_64-darwin
170
+ x86_64-linux
110
171
 
111
172
  DEPENDENCIES
112
173
  africastalking-ruby!
113
- bundler (~> 1.16)
174
+ bundler (~> 2.5.5)
114
175
  pry (~> 0)
115
- rake (~> 10.0)
176
+ rake (~> 13.0)
116
177
  rspec (~> 3.0)
117
- rspec-rails (~> 3.7, >= 3.7.2)
118
- rubocop (~> 0.54.0)
178
+ rspec-rails (>= 6.1.0)
179
+ rubocop (>= 1.60.1)
119
180
 
120
181
  BUNDLED WITH
121
- 1.17.2
182
+ 2.5.5
data/README.md CHANGED
@@ -215,211 +215,6 @@ mobiledata.fetchWalletBalance
215
215
 
216
216
  For more information, please read the [https://developers.africastalking.com/docs/data/overview](https://developers.africastalking.com/docs/data/overview)
217
217
 
218
- ### Payments
219
- ```ruby
220
- payments = @AT.payments
221
- ```
222
- #### Credit card checkout
223
- ```ruby
224
- payments.cardCheckoutCharge options
225
- ```
226
- - `options`
227
- - `productName`: Payment Product as setup on your account. `REQUIRED`
228
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
229
- - `amount`: Payment amount. `REQUIRED`
230
- - `narration`: A short description of the transaction `REQUIRED`
231
- - `checkoutToken`: Token that has been generated by our APIs as as result of charging a user's Payment Card in a previous transaction. When using a token, the `paymentCard` data should NOT be populated. `OPTIONAL`
232
- - `paymentCard`: Hash of payment Card to be charged: `OPTIONAL`
233
- - `number`: The payment card number. `REQUIRED`
234
- - `cvvNumber`: The 3 or 4 digit Card Verification Value. `REQUIRED`
235
- - `expiryMonth`: The expiration month on the card (e.g `8`) `REQUIRED`
236
- - `expiryYear`: The expiration year on the card (e.g `2020`) `REQUIRED`
237
- - `authToken`: The card's ATM PIN. `REQUIRED`
238
- - `countryCode`: The 2-Digit countryCode where the card was issued (only `NG` is supported). `REQUIRED`
239
- - `metadata`: Some optional data to associate with transaction. `OPTIONAL`
240
-
241
- #### Validate credit card checkout
242
-
243
- ```ruby
244
- payments.cardCheckoutValidate options
245
- ```
246
- - `options`
247
- - `transactionId`: The transaction that your application wants to validate. `REQUIRED`
248
- - `otp`: One Time Password that the card issuer sent to the client. `REQUIRED`
249
-
250
-
251
- #### Initiate bank charge checkout
252
- ```ruby
253
- payments.bankCheckoutCharge options
254
- ```
255
- - `options`
256
- - `productName`: Payment Product as setup on your account. `REQUIRED`
257
- - `bankAccount`: Hash of bank account to be charged:
258
-
259
- - `accountName`: The name of the bank account. `REQUIRED`
260
- - `accountNumber`: The account number. `REQUIRED`
261
- - `dateOfBirth`: Date of birth of the account owner (`YYYY-MM-DD`). Required for Zenith Bank Nigeria.
262
- - `bankCode`: A 6-Digit [Integer Code](http://docs.africastalking.com/bank/checkout) for the bank that we allocate. Supported banks at the moment are: `REQUIRED`
263
- ```ruby
264
- payments.class::BANK_CODES['FCMB_NG']
265
- payments.class::BANK_CODES['ZENITH_NG']
266
- payments.class::BANK_CODES['ACCESS_NG']
267
- payments.class::BANK_CODES['PROVIDUS_NG']
268
- payments.class::BANK_CODES['STERLING_NG']
269
- ```
270
-
271
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
272
- - `amount`: Payment amount. `REQUIRED`
273
- - `narration`: A short description of the transaction `REQUIRED`
274
- - `metadata`: Some optional data to associate with transaction`OPTIONAL`
275
-
276
-
277
- #### Validate bank checkout
278
- ```ruby
279
- payments.bankCheckoutValidate options
280
- ```
281
- - `options`
282
- - `transactionId`: The transaction that your application wants to validate. `REQUIRED`
283
- - `otp`: One Time Password that the bank sent to the client. `REQUIRED`
284
-
285
-
286
- #### Bank transfer
287
-
288
- ```ruby
289
- payments.bankTransfer options
290
- ```
291
- - `options`
292
- - `productName`: Payment Product as setup on your account. `REQUIRED`
293
- - `recipients`: A list of recipients. Each recipient has:
294
- - `bankAccount`: Bank account to be charged:
295
- - `accountName`: The name of the bank account.
296
- - `accountNumber`: The account number `REQUIRED`
297
- - `bankCode`: A 6-Digit Integer Code for the bank that we allocate; See `payments.class::BANK_CODES` for supported banks. `REQUIRED`
298
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
299
- - `amount`: Payment amount. `REQUIRED`
300
- - `narration`: A short description of the transaction `REQUIRED`
301
- - `metadata`: Some optional data to associate with transaction.
302
-
303
- #### Mobile Checkout
304
-
305
- ```ruby
306
- payments.mobileCheckout options
307
- ```
308
- - `options`
309
- - `productName`: Your Payment Product. `REQUIRED`
310
- - `phoneNumber`: The customer phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
311
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
312
- - `amount`: This is the amount. `REQUIRED`
313
- - `metadata`: Some optional data to associate with transaction.`OPTIONAL`
314
- - `providerChannel`: This represents the payment channel the payment will be made from. eg paybill number. The payment channel must be mapped to you. The AfricasTalking default provider channel is used if not specified.`OPTIONAL`
315
-
316
- #### Mobile B2C
317
- ```ruby
318
- payments.mobileB2C options
319
- ```
320
- - `options`
321
- - `productName`: Your Payment Product. `REQUIRED`
322
- - `recipients`: A list of **up to 10** recipients. Each recipient has:
323
-
324
- - `phoneNumber`: The payee phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
325
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
326
- - `amount`: Payment amount. `REQUIRED`
327
- - `providerChannel`: This represents the payment channel the payment will be made from. eg paybill number. The payment channel must be mapped to you. The AfricasTalking default provider channel is used if not specified.
328
- - `reason`: This field contains a string showing the purpose for the payment. If set, it should be one of the following
329
- ```
330
- SalaryPayment
331
- SalaryPaymentWithWithdrawalChargePaid
332
- BusinessPayment
333
- BusinessPaymentWithWithdrawalChargePaid
334
- PromotionPayment
335
- ```
336
- - `metadata`: Some optional data to associate with transaction.
337
-
338
- #### Mobile B2B
339
- ```ruby
340
- payments.mobileB2B options
341
- ```
342
- - `options`
343
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
344
- - `providerData`: Hash containing Provider details. this include; `REQUIRED`
345
-
346
- - `provider`: String that shows the payment provider that is facilitating this transaction. Supported providers at the moment are:
347
-
348
- ```
349
- Athena - Please note: This is not available on our production systems
350
- Mpesa
351
-
352
- ```
353
- - `transferType`: This contains the payment provider that is facilitating this transaction. Supported providers at the moment are:
354
- ```
355
- BusinessBuyGoods
356
- BusinessPayBill
357
- DisburseFundsToBusiness
358
- BusinessToBusinessTransfer
359
- ```
360
- - `destinationChannel`: This value contains the name or number of the channel that will receive payment by the provider. `REQUIRED`
361
- - `destinationAccount`: This value contains the account name used by the business to receive money on the provided destinationChannel. `REQUIRED`
362
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
363
- - `amount`: Payment amount. `REQUIRED`
364
- - `requester`: PhoneNumber through which KPLC will send tokens when using B2B to buy electricity tokens.
365
- - `metadata`: Some optional data to associate with transaction.`REQUIRED`
366
-
367
-
368
-
369
- #### Wallet Transfer
370
- ```ruby
371
- payments.walletTransfer options
372
- ```
373
- - `options`
374
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
375
- - `targetProductCode`: Unique code ode of payment product receiving funds on Africa's Talking `REQUIRED`
376
- - `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
377
- - `amount`: Amount to transfer. `REQUIRED`
378
- - `metadata`: Additional data to associate with the transaction. `REQUIRED`
379
-
380
- #### Topup Stash
381
- ```ruby
382
- payments.topupStash options
383
- ```
384
- - `options`
385
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
386
- - `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
387
- - `amount`: Amount to transfer. `REQUIRED`
388
- - `metadata`: Additonal data to associate with the transaction. `REQUIRED`
389
-
390
- #### Fetch Product Transactions
391
- ```ruby
392
- payments.fetchProductTransactions options
393
- ```
394
- - `options`
395
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
396
- - `filters`: Filters to use when fetching transactions:
397
- - `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
398
- - `count`: Number of results to fetch. `REQUIRED`
399
- - `startDate`: Start Date to consider when fetching
400
- - `endDate`: End Date to consider when fetching
401
- - `category`: Category to consider when fetching
402
- - `provider`: Provider to consider when fetching
403
- - `status`: Status to consider when fetching
404
- - `source`: Source to consider when fetching
405
- - `destination`: Destination to consider when fetching
406
- - `providerChannel`: Provider to consider when fetching
407
-
408
- #### fetch Wallet Transactions
409
- ```ruby
410
- payments.fetchWalletTransactions options
411
- ```
412
- - `options`
413
- - `filters`: Filters to use when fetching transactions:
414
- - `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
415
- - `count`: Number of results to fetch. `REQUIRED`
416
- - `startDate`: Start Date to consider when fetching
417
- - `endDate`: End Date to consider when fetching
418
- - `categories`: Comma delimited list of categories to consider when fetching
419
-
420
-
421
-
422
-
423
218
  ## Development
424
219
 
425
220
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -30,11 +30,11 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.16"
34
- spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "bundler", "~> 2.5.5"
34
+ spec.add_development_dependency "rake", "~> 13.0"
35
35
  spec.add_development_dependency "rspec", "~> 3.0"
36
- spec.add_development_dependency 'rspec-rails', '~> 3.7', '>= 3.7.2'
37
- spec.add_development_dependency "rubocop", "~> 0.54.0"
36
+ spec.add_development_dependency "rspec-rails", ">= 6.1.0"
37
+ spec.add_development_dependency "rubocop", ">= 1.60.1"
38
38
  spec.add_development_dependency "pry" , "~> 0"
39
- spec.add_dependency "httparty", "0.16.1"
39
+ spec.add_dependency "httparty", ">=0.21.0"
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module AfricasTalking
2
- VERSION = "2.1.9"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -2,7 +2,6 @@ require "AfricasTalking/version"
2
2
  require 'httparty'
3
3
  require "AfricasTalking/Sms"
4
4
  require "AfricasTalking/Airtime"
5
- require "AfricasTalking/Payments"
6
5
  require "AfricasTalking/Mobiledata"
7
6
  require "AfricasTalking/Voice"
8
7
  require "AfricasTalking/Token"
@@ -25,10 +24,6 @@ module AfricasTalking
25
24
  return Sms.new @username, @apikey
26
25
  end
27
26
 
28
- def payments
29
- return Payments.new @username, @apikey
30
- end
31
-
32
27
  def mobiledata
33
28
  return Mobiledata.new @username, @apikey
34
29
  end
@@ -83,7 +78,7 @@ module AfricasTalking
83
78
  return response.body
84
79
  end
85
80
 
86
- def sendJSONRequest url_, data_, get_request = false, idempotency_key
81
+ def sendJSONRequest url_, data_, get_request = false, idempotency_key = nil
87
82
  uri = URI.parse(url_)
88
83
  http = Net::HTTP.new(uri.host, uri.port)
89
84
  http.use_ssl = true