-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init commit with changes * adding/updating more endpoints * fixl lint issue * end error * more lint changes * end change in syntax * switch to prism * test changes gh workflow * .. * ... Co-authored-by: Vladii <[email protected]>
- Loading branch information
1 parent
0597666
commit 73bedd9
Showing
39 changed files
with
505 additions
and
22 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,9 +1,22 @@ | ||
gem install bundler -v "~> 1.0" | ||
if [ ! -d "telnyx-mock/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_${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" | ||
tar -zxf "telnyx-mock/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}" | ||
# Telnyx mock deprecation in favor of prism-mock server | ||
|
||
# gem install bundler -v "~> 1.0" | ||
# if [ ! -d "telnyx-mock/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_${TELNYX_MOCK_VERSION}_linux_amd64.tar.gz" | ||
# tar -zxf "telnyx-mock/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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class AccessIPAddress < APIResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
|
||
OBJECT_NAME = "access_ip_address".freeze | ||
RESOURCE_PATH = "access_ip_addresses".freeze | ||
end | ||
end | ||
|
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class AccessIPRange < APIResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
|
||
OBJECT_NAME = "access_ip_range".freeze | ||
end | ||
end | ||
|
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class AuthenticationProviders < APIResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
|
||
OBJECT_NAME = "authentication_providers".freeze | ||
end | ||
end | ||
y |
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class AccessIPRange < APIResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
|
||
OBJECT_NAME = "balance".freeze | ||
end | ||
end | ||
|
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,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class Brand < APIResource | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
extend APIOperations::NestedResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
|
||
OBJECT_NAME = "10dlc/brand".freeze | ||
end | ||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class BulkCreation < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
extend APIOperations::NestedResource | ||
|
||
ACTIONS = %w[detailedStatus].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[#{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
|
||
OBJECT_NAME = "10dlc/bulkCreation".freeze | ||
end | ||
|
||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class Campaign < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
extend APIOperations::NestedResource | ||
|
||
ACTIONS = %w[mnoMetadata operationStatus].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[#{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
|
||
OBJECT_NAME = "campaign".freeze | ||
end | ||
|
||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class Documents < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
extend APIOperations::NestedResource | ||
|
||
ACTIONS = %w[download document_links].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[#{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
|
||
OBJECT_NAME = "document".freeze | ||
end | ||
|
||
end | ||
|
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class ManagedAccount < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
|
||
OBJECT_NAME = "managed_account".freeze | ||
end | ||
end | ||
|
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class DynamicEmergencyEndpoint < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
|
||
OBJECT_NAME = "dynamic_emergency_endpoint".freeze | ||
end | ||
end | ||
|
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,10 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class InventoryCoverage < APIResource | ||
extend Telnyx::APIOperations::Create | ||
|
||
OBJECT_NAME = "inventory_coverage".freeze | ||
end | ||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class ManagedAccount < APIResource | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
extend APIOperations::NestedResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
|
||
ACTIONS = %w[enable disable].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[actions #{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
end | ||
|
||
OBJECT_NAME = "managed_account".freeze | ||
end | ||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class Media < APIResource | ||
extend APIOperations::List | ||
extend APIOperations::Create | ||
extend APIOperations::NestedResource | ||
include APIOperations::Delete | ||
include APIOperations::Save | ||
|
||
ACTIONS = %w[download].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[#{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
end | ||
|
||
OBJECT_NAME = "media".freeze | ||
end | ||
end | ||
|
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Telnyx | ||
class MessagingHostedNumberOrder < APIResource | ||
extend Telnyx::APIOperations::List | ||
extend Telnyx::APIOperations::Create | ||
include Telnyx::APIOperations::Delete | ||
include Telnyx::APIOperations::Save | ||
extend APIOperations::NestedResource | ||
|
||
ACTIONS = %w[file_upload].freeze | ||
ACTIONS.each do |action| | ||
nested_resource_class_methods action, | ||
path: %W[action #{action}], | ||
operations: [:create], | ||
instance_methods: { create: action } | ||
|
||
OBJECT_NAME = "messaging_hosted_number_order".freeze | ||
end | ||
|
||
end | ||
|
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
Oops, something went wrong.