Skip to content

Commit

Permalink
Merge pull request #84 from team-telnyx/10DLC-Update-+-Version
Browse files Browse the repository at this point in the history
Added 10DLC Endpoints and version bump
  • Loading branch information
ADandyGuyInSpace authored Sep 13, 2023
2 parents 9111351 + 1eb26ce commit cfbfe48
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.0
2.9.0
38 changes: 38 additions & 0 deletions lib/Brand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace Telnyx;

/**
* Class Address
*
* @package Telnyx
*/
class Address extends ApiResource
{
const OBJECT_NAME = "brand";

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

/**
* @return string The endpoint associated with this singleton class.
*/
public static function classUrl()
{
// Use a custom URL for this resource
// NOTE: This endpoint is special because domain 10dlc is used and not v2
// NOTE: This endpoint is special because object name is "brand" and endpoint is "brands"
return "/10dlc/brand";
}
public function revet($params = null, $options = null)
{
$url = $this->instanceUrl() . '/revet';
list($response, $opts) = $this->_request('put', $url, $params, $options);
$this->refreshFrom($response, $opts);
return $this;
}

}
44 changes: 44 additions & 0 deletions lib/Campaign.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace Telnyx;

/**
* Class Address
*
* @package Telnyx
*/
class Address extends ApiResource
{
const OBJECT_NAME = "campaign";

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

/**
* @return string The endpoint associated with this singleton class.
*/
public static function classUrl()
{
// Use a custom URL for this resource
// NOTE: This endpoint is special because object name is "campaign" and endpoint is "campaign"
// NOTE: This endpoint is special because domain 10dlc is used and not v2
return "/10dlc/campaign";
}
public function mnoMetadata($params = null, $options = null)
{
$url = $this->instanceUrl() . '/mnoMetadata';
list($response, $opts) = $this->_request('get', $url, $params, $options);
$this->refreshFrom($response, $opts);
return $this;
}
public function operationStatus($params = null, $options = null)
{
$url = $this->instanceUrl() . '/operationStatus';
list($response, $opts) = $this->_request('get', $url, $params, $options);
$this->refreshFrom($response, $opts);
return $this;
}
}
34 changes: 34 additions & 0 deletions lib/PhoneNumberAssignmentByProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Telnyx;

/**
* Class Address
*
* @package Telnyx
*/
class Address extends ApiResource
{
const OBJECT_NAME = "phone_number_assignment_by_profile";

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Retrieve;

/**
* @return string The endpoint associated with this singleton class.
*/
public static function classUrl()
{
// Use a custom URL for this resource
// NOTE: This endpoint is special because object name and endpoint are both not plural
return "/v2/phoneNumberAssignmnetByProfile";
}
public function phone_numbers($params = null, $options = null)
{
$url = $this->instanceUrl() . '/phoneNumbers';
list($response, $opts) = $this->_request('get', $url, $params, $options);
$this->refreshFrom($response, $opts);
return $this;
}
}
29 changes: 29 additions & 0 deletions lib/PhoneNumberCampaign.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace Telnyx;

/**
* Class Address
*
* @package Telnyx
*/
class Address extends ApiResource
{
const OBJECT_NAME = "phone_number_campaign";

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

/**
* @return string The endpoint associated with this singleton class.
*/
public static function classUrl()
{
// Use a custom URL for this resource
// NOTE: This endpoint is special because object name and endpoint are not plural
return "/v2/phoneNumberCampaign";
}
}
2 changes: 1 addition & 1 deletion lib/Telnyx.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Telnyx
// @var float Initial delay between retries, in seconds
private static $initialNetworkRetryDelay = 0.5;

const VERSION = '2.8.0';
const VERSION = '2.9.0';

/**
* @return string The API key used for requests.
Expand Down

0 comments on commit cfbfe48

Please sign in to comment.