africastalking-ruby 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +152 -91
- data/README.md +16 -209
- data/africastalking-ruby.gemspec +5 -5
- data/lib/AfricasTalking/Mobiledata.rb +159 -0
- data/lib/AfricasTalking/version.rb +1 -1
- data/lib/AfricasTalking.rb +22 -15
- metadata +21 -27
- data/lib/AfricasTalking/Payments.rb +0 -688
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0acec7a05a0f4cb8df0db42175d46cb3da1085d9667f70f6b1dc87ecea7f4553
|
4
|
+
data.tar.gz: 97c2ebdb16fcaedbdf37799f75fb47807c5c2948c8d391ad671efca4f760e54c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
5
|
-
httparty (
|
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 (
|
11
|
-
actionview (=
|
12
|
-
activesupport (=
|
13
|
-
|
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.
|
16
|
-
rails-html-sanitizer (~> 1.
|
17
|
-
actionview (
|
18
|
-
activesupport (=
|
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.
|
21
|
-
rails-dom-testing (~> 2.
|
22
|
-
rails-html-sanitizer (~> 1.
|
23
|
-
activesupport (
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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.
|
32
|
-
concurrent-ruby (1.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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.
|
51
|
+
i18n (1.14.1)
|
39
52
|
concurrent-ruby (~> 1.0)
|
40
|
-
|
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.
|
43
|
-
method_source (0.
|
44
|
-
|
45
|
-
minitest (5.
|
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
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
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.
|
63
|
-
loofah (~> 2.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
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.
|
81
|
-
rspec-mocks (3.
|
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.
|
84
|
-
rspec-rails (
|
85
|
-
actionpack (>=
|
86
|
-
activesupport (>=
|
87
|
-
railties (>=
|
88
|
-
rspec-core (~> 3.
|
89
|
-
rspec-expectations (~> 3.
|
90
|
-
rspec-mocks (~> 3.
|
91
|
-
rspec-support (~> 3.
|
92
|
-
rspec-support (3.
|
93
|
-
rubocop (
|
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
|
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 (
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
-
|
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 (~>
|
174
|
+
bundler (~> 2.5.5)
|
114
175
|
pry (~> 0)
|
115
|
-
rake (~>
|
176
|
+
rake (~> 13.0)
|
116
177
|
rspec (~> 3.0)
|
117
|
-
rspec-rails (
|
118
|
-
rubocop (
|
178
|
+
rspec-rails (>= 6.1.0)
|
179
|
+
rubocop (>= 1.60.1)
|
119
180
|
|
120
181
|
BUNDLED WITH
|
121
|
-
|
182
|
+
2.5.5
|
data/README.md
CHANGED
@@ -180,233 +180,40 @@ account = @AT.account
|
|
180
180
|
account.fetchUserData
|
181
181
|
```
|
182
182
|
|
183
|
-
###
|
184
|
-
```ruby
|
185
|
-
payments = @AT.payments
|
186
|
-
```
|
187
|
-
#### Credit card checkout
|
188
|
-
```ruby
|
189
|
-
payments.cardCheckoutCharge options
|
190
|
-
```
|
191
|
-
- `options`
|
192
|
-
- `productName`: Payment Product as setup on your account. `REQUIRED`
|
193
|
-
- `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
|
194
|
-
- `amount`: Payment amount. `REQUIRED`
|
195
|
-
- `narration`: A short description of the transaction `REQUIRED`
|
196
|
-
- `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`
|
197
|
-
- `paymentCard`: Hash of payment Card to be charged: `OPTIONAL`
|
198
|
-
- `number`: The payment card number. `REQUIRED`
|
199
|
-
- `cvvNumber`: The 3 or 4 digit Card Verification Value. `REQUIRED`
|
200
|
-
- `expiryMonth`: The expiration month on the card (e.g `8`) `REQUIRED`
|
201
|
-
- `expiryYear`: The expiration year on the card (e.g `2020`) `REQUIRED`
|
202
|
-
- `authToken`: The card's ATM PIN. `REQUIRED`
|
203
|
-
- `countryCode`: The 2-Digit countryCode where the card was issued (only `NG` is supported). `REQUIRED`
|
204
|
-
- `metadata`: Some optional data to associate with transaction. `OPTIONAL`
|
205
|
-
|
206
|
-
#### Validate credit card checkout
|
207
|
-
|
208
|
-
```ruby
|
209
|
-
payments.cardCheckoutValidate options
|
210
|
-
```
|
211
|
-
- `options`
|
212
|
-
- `transactionId`: The transaction that your application wants to validate. `REQUIRED`
|
213
|
-
- `otp`: One Time Password that the card issuer sent to the client. `REQUIRED`
|
183
|
+
### Mobile Data
|
214
184
|
|
185
|
+
Send mobile data to phone numbers
|
215
186
|
|
216
|
-
#### Initiate bank charge checkout
|
217
|
-
```ruby
|
218
|
-
payments.bankCheckoutCharge options
|
219
|
-
```
|
220
|
-
- `options`
|
221
|
-
- `productName`: Payment Product as setup on your account. `REQUIRED`
|
222
|
-
- `bankAccount`: Hash of bank account to be charged:
|
223
|
-
|
224
|
-
- `accountName`: The name of the bank account. `REQUIRED`
|
225
|
-
- `accountNumber`: The account number. `REQUIRED`
|
226
|
-
- `dateOfBirth`: Date of birth of the account owner (`YYYY-MM-DD`). Required for Zenith Bank Nigeria.
|
227
|
-
- `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`
|
228
|
-
```ruby
|
229
|
-
payments.class::BANK_CODES['FCMB_NG']
|
230
|
-
payments.class::BANK_CODES['ZENITH_NG']
|
231
|
-
payments.class::BANK_CODES['ACCESS_NG']
|
232
|
-
payments.class::BANK_CODES['PROVIDUS_NG']
|
233
|
-
payments.class::BANK_CODES['STERLING_NG']
|
234
|
-
```
|
235
|
-
|
236
|
-
- `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
|
237
|
-
- `amount`: Payment amount. `REQUIRED`
|
238
|
-
- `narration`: A short description of the transaction `REQUIRED`
|
239
|
-
- `metadata`: Some optional data to associate with transaction`OPTIONAL`
|
240
|
-
|
241
|
-
|
242
|
-
#### Validate bank checkout
|
243
187
|
```ruby
|
244
|
-
|
245
|
-
```
|
246
|
-
- `options`
|
247
|
-
- `transactionId`: The transaction that your application wants to validate. `REQUIRED`
|
248
|
-
- `otp`: One Time Password that the bank sent to the client. `REQUIRED`
|
249
|
-
|
188
|
+
mobiledata = @AT.mobiledata
|
250
189
|
|
251
|
-
|
252
|
-
|
253
|
-
```ruby
|
254
|
-
payments.bankTransfer options
|
190
|
+
mobiledata.send options
|
255
191
|
```
|
256
192
|
- `options`
|
257
|
-
- `productName`:
|
258
|
-
- `recipients`:
|
259
|
-
- `bankAccount`: Bank account to be charged:
|
260
|
-
- `accountName`: The name of the bank account.
|
261
|
-
- `accountNumber`: The account number `REQUIRED`
|
262
|
-
- `bankCode`: A 6-Digit Integer Code for the bank that we allocate; See `payments.class::BANK_CODES` for supported banks. `REQUIRED`
|
263
|
-
- `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
|
264
|
-
- `amount`: Payment amount. `REQUIRED`
|
265
|
-
- `narration`: A short description of the transaction `REQUIRED`
|
266
|
-
- `metadata`: Some optional data to associate with transaction.
|
267
|
-
|
268
|
-
#### Mobile Checkout
|
193
|
+
- `productName`: This is the application's product name. `REQUIRED`
|
194
|
+
- `recipients`: An array of objects containing the following keys:
|
269
195
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
- `
|
274
|
-
|
275
|
-
- `phoneNumber`: The customer phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
|
276
|
-
- `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
|
277
|
-
- `amount`: This is the amount. `REQUIRED`
|
278
|
-
- `metadata`: Some optional data to associate with transaction.`OPTIONAL`
|
279
|
-
- `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`
|
280
|
-
|
281
|
-
#### Mobile B2C
|
282
|
-
```ruby
|
283
|
-
payments.mobileB2C options
|
284
|
-
```
|
285
|
-
- `options`
|
286
|
-
- `productName`: Your Payment Product. `REQUIRED`
|
287
|
-
- `recipients`: A list of **up to 10** recipients. Each recipient has:
|
288
|
-
|
289
|
-
- `phoneNumber`: The payee phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
|
290
|
-
- `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
|
291
|
-
- `amount`: Payment amount. `REQUIRED`
|
292
|
-
- `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.
|
293
|
-
- `reason`: This field contains a string showing the purpose for the payment. If set, it should be one of the following
|
294
|
-
```
|
295
|
-
SalaryPayment
|
296
|
-
SalaryPaymentWithWithdrawalChargePaid
|
297
|
-
BusinessPayment
|
298
|
-
BusinessPaymentWithWithdrawalChargePaid
|
299
|
-
PromotionPayment
|
300
|
-
```
|
301
|
-
- `metadata`: Some optional data to associate with transaction.
|
302
|
-
|
303
|
-
#### Mobile B2B
|
304
|
-
```ruby
|
305
|
-
payments.mobileB2B options
|
306
|
-
```
|
307
|
-
- `options`
|
308
|
-
- `productName`: Your Payment Product as setup on your account. `REQUIRED`
|
309
|
-
- `providerData`: Hash containing Provider details. this include; `REQUIRED`
|
310
|
-
|
311
|
-
- `provider`: String that shows the payment provider that is facilitating this transaction. Supported providers at the moment are:
|
312
|
-
|
313
|
-
```
|
314
|
-
Athena - Please note: This is not available on our production systems
|
315
|
-
Mpesa
|
316
|
-
|
317
|
-
```
|
318
|
-
- `transferType`: This contains the payment provider that is facilitating this transaction. Supported providers at the moment are:
|
319
|
-
```
|
320
|
-
BusinessBuyGoods
|
321
|
-
BusinessPayBill
|
322
|
-
DisburseFundsToBusiness
|
323
|
-
BusinessToBusinessTransfer
|
324
|
-
```
|
325
|
-
- `destinationChannel`: This value contains the name or number of the channel that will receive payment by the provider. `REQUIRED`
|
326
|
-
- `destinationAccount`: This value contains the account name used by the business to receive money on the provided destinationChannel. `REQUIRED`
|
327
|
-
- `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
|
328
|
-
- `amount`: Payment amount. `REQUIRED`
|
329
|
-
- `requester`: PhoneNumber through which KPLC will send tokens when using B2B to buy electricity tokens.
|
330
|
-
- `metadata`: Some optional data to associate with transaction.`REQUIRED`
|
331
|
-
|
332
|
-
#### Mobile Data
|
333
|
-
```ruby
|
334
|
-
payments.mobileData options
|
335
|
-
```
|
336
|
-
- `options`
|
337
|
-
- `productName`: Your Payment Product. `REQUIRED`
|
338
|
-
- `recipients`: A list of recipients. Each recipient has:
|
339
|
-
|
340
|
-
- `phoneNumber`: Customer phone number (in international format). `REQUIRED`
|
341
|
-
- `quantity`: Mobile data amount. `REQUIRED`
|
342
|
-
- `unit`: Mobile data unit. Can either be `MB` or `GB`. `REQUIRED`
|
343
|
-
- `validity`: How long the mobile data is valid for. Must be one of `Day`, `Week` and `Month`. `REQUIRED`
|
344
|
-
- `metadata`: Additional data to associate with the transaction. `REQUIRED`
|
345
|
-
|
346
|
-
#### Wallet Transfer
|
347
|
-
```ruby
|
348
|
-
payments.walletTransfer options
|
349
|
-
```
|
350
|
-
- `options`
|
351
|
-
- `productName`: Your Payment Product as setup on your account. `REQUIRED`
|
352
|
-
- `targetProductCode`: Unique code ode of payment product receiving funds on Africa's Talking `REQUIRED`
|
353
|
-
- `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
|
354
|
-
- `amount`: Amount to transfer. `REQUIRED`
|
355
|
-
- `metadata`: Additional data to associate with the transaction. `REQUIRED`
|
356
|
-
|
357
|
-
#### Topup Stash
|
358
|
-
```ruby
|
359
|
-
payments.topupStash options
|
360
|
-
```
|
361
|
-
- `options`
|
362
|
-
- `productName`: Your Payment Product as setup on your account. `REQUIRED`
|
363
|
-
- `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
|
364
|
-
- `amount`: Amount to transfer. `REQUIRED`
|
365
|
-
- `metadata`: Additonal data to associate with the transaction. `REQUIRED`
|
366
|
-
|
367
|
-
#### Fetch Product Transactions
|
368
|
-
```ruby
|
369
|
-
payments.fetchProductTransactions options
|
370
|
-
```
|
371
|
-
- `options`
|
372
|
-
- `productName`: Your Payment Product as setup on your account. `REQUIRED`
|
373
|
-
- `filters`: Filters to use when fetching transactions:
|
374
|
-
- `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
|
375
|
-
- `count`: Number of results to fetch. `REQUIRED`
|
376
|
-
- `startDate`: Start Date to consider when fetching
|
377
|
-
- `endDate`: End Date to consider when fetching
|
378
|
-
- `category`: Category to consider when fetching
|
379
|
-
- `provider`: Provider to consider when fetching
|
380
|
-
- `status`: Status to consider when fetching
|
381
|
-
- `source`: Source to consider when fetching
|
382
|
-
- `destination`: Destination to consider when fetching
|
383
|
-
- `providerChannel`: Provider to consider when fetching
|
384
|
-
|
385
|
-
#### fetch Wallet Transactions
|
386
|
-
```ruby
|
387
|
-
payments.fetchWalletTransactions options
|
388
|
-
```
|
389
|
-
- `options`
|
390
|
-
- `filters`: Filters to use when fetching transactions:
|
391
|
-
- `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
|
392
|
-
- `count`: Number of results to fetch. `REQUIRED`
|
393
|
-
- `startDate`: Start Date to consider when fetching
|
394
|
-
- `endDate`: End Date to consider when fetching
|
395
|
-
- `categories`: Comma delimited list of categories to consider when fetching
|
196
|
+
- `phoneNumber`: Recipient of the mobile data. `REQUIRED`
|
197
|
+
- `quantity`: a numeric value for the amount of mobile data. It is based on the available mobile data package[(see "Bundle Package" column of mobile data pricing)](https://africastalking.com/pricing). `REQUIRED`
|
198
|
+
- `unit`: The units for the specified data quantity, the format is: ``MB`` or ``GB``. It is based on the available mobile data package[(see "Bundle Package" column of mobile data pricing)](https://africastalking.com/pricing). `REQUIRED`
|
199
|
+
- `validity`: The period of the data bundle’s validity this can be `Day`, `Week`, `BiWeek`, `Month`, or `Quarterly`. It is based on the available mobile data package [(see "Validity" column of mobile data pricing)](https://africastalking.com/pricing). `REQUIRED`
|
200
|
+
- `metadata`: A JSON object of any metadata that you would like us to associate with the request. `OPTIONAL`
|
396
201
|
|
397
202
|
#### Find Transaction
|
398
203
|
```ruby
|
399
|
-
|
204
|
+
mobiledata.findTransaction options
|
400
205
|
```
|
206
|
+
- Find a mobile data transaction
|
401
207
|
- `options`
|
402
208
|
- `transactionId`: ID of trancation to find `REQUIRED`
|
403
209
|
|
404
210
|
#### Fetch Wallet Balance
|
405
211
|
```ruby
|
406
|
-
|
212
|
+
mobiledata.fetchWalletBalance
|
407
213
|
```
|
408
|
-
- Fetch
|
214
|
+
- Fetch a mobile data product balance
|
409
215
|
|
216
|
+
For more information, please read the [https://developers.africastalking.com/docs/data/overview](https://developers.africastalking.com/docs/data/overview)
|
410
217
|
|
411
218
|
## Development
|
412
219
|
|
data/africastalking-ruby.gemspec
CHANGED
@@ -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", "~>
|
34
|
-
spec.add_development_dependency "rake", "~>
|
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
|
37
|
-
spec.add_development_dependency "rubocop", "
|
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.
|
39
|
+
spec.add_dependency "httparty", ">=0.21.0"
|
40
40
|
end
|