Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

africastalking

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

africastalking - npm Package Compare versions

Comparing version 0.5.9 to 0.6.0

13

lib/airtime.js

@@ -30,6 +30,11 @@ 'use strict';

customAxios.airtime.sendAirtimeRequest({
recipients: JSON.stringify(recipients),
maxNumRetry: options.maxNumRetry? Number(options.maxNumRetry) : "None"
})
const requestBody = {
recipients: JSON.stringify(recipients)
};
if(options.maxNumRetry && (options.maxNumRetry > 0) ){
requestBody['maxNumRetry'] = Number(options.maxNumRetry);
};
customAxios.airtime.sendAirtimeRequest(requestBody)
.then(function (response) {

@@ -36,0 +41,0 @@ if (response.status === 201) {

{
"name": "africastalking",
"version": "0.5.9",
"version": "0.6.0",
"description": "Official AfricasTalking node.js API wrapper",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -90,8 +90,11 @@ # Africa's Talking Node.js SDK

- `airtime.send({ recipients })`: Send airtime to a bunch of phone numbers. `recipients`: An array of objects containing the following keys:
- `airtime.send({ recipients })`: Send airtime to a bunch of phone numbers.
- `recipients`: An array of objects containing the following keys:
- `phoneNumber`: Recipient of airtime. `REQUIRED`.
- `currencyCode`: 3-digit ISO format currency code. `REQUIRED`.
- `amount`: Amount to charge. `REQUIRED`.
- `maxNumRetry`: This is the number of times a request will be retried. It is equivalent to **minutes**. If you set a maxNumRetry of 4 that means your transaction will be retried 4 times consecutively in the next 4 minutes because retries are done after every minute. If you don't set maxNumRetry, the request will **NOT** be retried. `OPTIONAL`.
- `maxNumRetry`: This allows you to specify the maximum number of retries in case of failed airtime deliveries due to various reasons such as telco unavailability. The default retry period is 8 hours and retries occur every 60seconds. For example, setting `maxNumRetry=4` means the transaction will be retried every 60seconds for the next 4 hours.`OPTIONAL`.
- Example:

@@ -113,3 +116,3 @@

],
maxNumRetry: 4 // will be retried 4 times consecutively in the next 4 minutes
maxNumRetry: 3, // Will retry the transaction every 60seconds for the next 3 hours.
});

@@ -116,0 +119,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc