-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.0 Update + Prism Mock Support (#67)
* API Parity Update + Prism Mock Server * lint/formatting changes * more formatting changes * prism-mock fix * version increment Co-authored-by: Vladii <[email protected]>
- Loading branch information
1 parent
bee8bde
commit c78e3a9
Showing
117 changed files
with
2,077 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
if [ ! -d "telnyx-mock/${TELNYX_MOCK_VERSION}" ]; then | ||
mkdir -p telnyx-mock/${TELNYX_MOCK_VERSION} | ||
curl -L "https://github.com/team-telnyx/telnyx-mock/releases/download/v${TELNYX_MOCK_VERSION}/telnyx-mock_${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -o "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" | ||
tar -zxf "telnyx-mock/${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" -C "telnyx-mock/${TELNYX_MOCK_VERSION}/" | ||
fi | ||
telnyx-mock/${TELNYX_MOCK_VERSION}/telnyx-mock >/dev/null & | ||
TELNYX_MOCK_PID=$! | ||
export PATH="${PATH}:${PWD}/telnyx-mock/${TELNYX_MOCK_VERSION}" | ||
npm install -g @stoplight/prism-cli | ||
|
||
echo "Starting up Prism Mock Server with spec file at ${TELNYX_MOCK_OPEN_API_URI}" | ||
prism mock ${TELNYX_MOCK_OPEN_API_URI} > /dev/null & | ||
|
||
git clone https://github.com/team-telnyx/telnyx-prism-mock.git | ||
cd telnyx-prism-mock/proxy | ||
npm install | ||
node index.js > /dev/null & | ||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ htmlcov/ | |
sonar-project.* | ||
.pypirc-telnyx | ||
|
||
Pipfile.lock | ||
Pipfile.lock | ||
requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from telnyx.api_resources.abstract import ( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
) | ||
|
||
|
||
class AccessControlIP(CreateableAPIResource, DeletableAPIResource, ListableAPIResource): | ||
OBJECT_NAME = "access_control_ip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from telnyx.api_resources.abstract import ( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
) | ||
|
||
|
||
class AccessIPAddress(CreateableAPIResource, DeletableAPIResource, ListableAPIResource): | ||
OBJECT_NAME = "access_ip_address" | ||
|
||
@classmethod | ||
def class_url(cls): | ||
return "/v2/access_ip_address" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from telnyx.api_resources.abstract import ( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
) | ||
|
||
|
||
class AuthenticationProvider( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
): | ||
OBJECT_NAME = "authentication_provider" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from telnyx.api_resources.abstract import ( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
nested_resource_class_methods, | ||
) | ||
|
||
|
||
@nested_resource_class_methods( | ||
"list_external_vetting", path="externalVetting", operations=["list"] | ||
) | ||
@nested_resource_class_methods( | ||
"order_external_vetting", path="externalVetting", operations=["create"] | ||
) | ||
class Brand( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
): | ||
OBJECT_NAME = "brand" | ||
|
||
@classmethod | ||
def class_url(cls): | ||
return "/10dlc/brand" | ||
|
||
def list_external_vetting(self, **params): | ||
return Brand.list_external_vetting(self.name, **params) | ||
|
||
def operation_status(self, **params): | ||
return Brand.create_external_vetting(self.id, **params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from telnyx.api_resources.abstract import ( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
nested_resource_class_methods, | ||
) | ||
|
||
|
||
@nested_resource_class_methods( | ||
"detailed_status", path="detailedStatus", operations=["list"] | ||
) | ||
class BulkCreation( | ||
CreateableAPIResource, | ||
DeletableAPIResource, | ||
ListableAPIResource, | ||
UpdateableAPIResource, | ||
): | ||
OBJECT_NAME = "bulk_creation" | ||
|
||
@classmethod | ||
def class_url(cls): | ||
return "/10dlc/bulkCreation" | ||
|
||
def detailed_status(self, **params): | ||
return BulkCreation.list_detailed_status(self.name, **params) |
Oops, something went wrong.