mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-15 04:31:31 +00:00
updated streamline-setup v2
This commit is contained in:
@@ -139,8 +139,6 @@ Instantiating the class will give you an object with available methods
|
||||
- `unit`: Mobile data unit. Can either be `MB` or `GB`. `REQUIRED`
|
||||
- `validity`: How long the mobile data is valid for. Must be one of `Day`, `Week` and `Month`. `REQUIRED`
|
||||
- `metadata`: Additional data to associate with the tranasction. `REQUIRED`
|
||||
|
||||
- `isPromoBundle`: This is an optional field that can be either `true` or `false`.
|
||||
|
||||
- **$options:** optional associative array with the following keys:
|
||||
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"AfricasTalking\\SDK\\": "src/",
|
||||
"AfricasTalking\\SDK\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"AfricasTalking\\SDK\\Tests\\": "tests"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -12,13 +12,16 @@ class AfricasTalking
|
||||
protected $apiKey;
|
||||
|
||||
protected $client;
|
||||
protected $contentClient;
|
||||
protected $voiceClient;
|
||||
protected $tokenClient;
|
||||
protected $contentClient;
|
||||
protected $mobileDataClient;
|
||||
|
||||
protected $baseDomain;
|
||||
|
||||
public $baseUrl;
|
||||
protected $voiceUrl;
|
||||
protected $checkoutTokenUrl;
|
||||
protected $contentUrl;
|
||||
protected $mobileDataUrl;
|
||||
|
||||
|
||||
@@ -68,6 +68,16 @@ class Content extends Service
|
||||
'keyword' => $options['keyword']
|
||||
];
|
||||
|
||||
/**
|
||||
* checkoutToken Key was removed in commit:339f7057d8ff640ffa9802b4d3a812848b1072a9.
|
||||
* To prevent breaking applications in production, we conditionally add it to
|
||||
* the request otherwise previous behaviour persists.
|
||||
**/
|
||||
|
||||
if(array_key_exists('checkoutToken',$options)){
|
||||
$data['checkoutToken'] = $options['checkoutToken'];
|
||||
}
|
||||
|
||||
$response = $this->client->post('subscription/create', ['form_params' => $data ] );
|
||||
|
||||
return $this->success($response);
|
||||
|
||||
@@ -63,10 +63,6 @@ class MobileData extends Service
|
||||
'recipients' => $recipients,
|
||||
];
|
||||
|
||||
if (isset($parameters['isPromoBundles'])) {
|
||||
$requestData['isPromoBundle'] = $parameters['isPromoBundles'];
|
||||
}
|
||||
|
||||
$requestOptions = [
|
||||
'json' => $requestData,
|
||||
];
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class AfricasTalkingTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class AirtimeTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setup(): void
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class ApplicationTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class ContentTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class SMSTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
@@ -108,7 +109,9 @@ class SMSTest extends \PHPUnit\Framework\TestCase
|
||||
]);
|
||||
|
||||
$this->assertArrayHasKey('status',$response);
|
||||
$this->assertArrayHasKey('data',$response);
|
||||
$this->assertEquals('success',$response['status']);
|
||||
$this->assertEquals('Success',$response['data']->status);
|
||||
}
|
||||
|
||||
public function testDeleteSubscription()
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class TokenTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ namespace AfricasTalking\SDK\Tests;
|
||||
use AfricasTalking\SDK\AfricasTalking;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class VoiceTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
|
||||
Reference in New Issue
Block a user