telnyx 2.5.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish-gem-on-release.yml +53 -0
  3. data/.github/workflows/ruby.yml +2 -2
  4. data/.github/workflows/tweet-release.yml +25 -0
  5. data/.gitignore +3 -1
  6. data/.rubocop.yml +1 -1
  7. data/Gemfile +4 -0
  8. data/VERSION +1 -1
  9. data/lib/telnyx.rb +4 -0
  10. data/lib/telnyx/api_operations/create.rb +6 -1
  11. data/lib/telnyx/api_operations/nested_resource.rb +1 -1
  12. data/lib/telnyx/api_resource.rb +10 -0
  13. data/lib/telnyx/call.rb +1 -1
  14. data/lib/telnyx/messaging_phone_number.rb +0 -5
  15. data/lib/telnyx/phone_number.rb +2 -2
  16. data/lib/telnyx/porting_order.rb +21 -0
  17. data/lib/telnyx/queue.rb +20 -0
  18. data/lib/telnyx/queue_call.rb +7 -0
  19. data/lib/telnyx/telephony_credential.rb +12 -0
  20. data/lib/telnyx/util.rb +12 -39
  21. data/lib/telnyx/verification.rb +29 -0
  22. data/lib/telnyx/version.rb +1 -1
  23. data/telnyx.gemspec +1 -1
  24. data/test/telnyx/alphanumeric_sender_id_test.rb +1 -1
  25. data/test/telnyx/api_operations_test.rb +1 -1
  26. data/test/telnyx/api_resource_test.rb +1 -1
  27. data/test/telnyx/available_phone_number_test.rb +1 -1
  28. data/test/telnyx/call_control_test.rb +10 -31
  29. data/test/telnyx/conference_test.rb +1 -1
  30. data/test/telnyx/errors_test.rb +1 -1
  31. data/test/telnyx/fax_test.rb +2 -1
  32. data/test/telnyx/list_object_test.rb +1 -1
  33. data/test/telnyx/message_test.rb +1 -1
  34. data/test/telnyx/messaging_phone_number_test.rb +1 -1
  35. data/test/telnyx/messaging_profile_test.rb +1 -1
  36. data/test/telnyx/number_reservation_test.rb +2 -0
  37. data/test/telnyx/porting_order_test.rb +53 -0
  38. data/test/telnyx/public_key_test.rb +1 -1
  39. data/test/telnyx/queue_test.rb +27 -0
  40. data/test/telnyx/telephony_credential_test.rb +43 -0
  41. data/test/telnyx/telnyx_client_test.rb +43 -49
  42. data/test/telnyx/telnyx_object_test.rb +12 -14
  43. data/test/telnyx/telnyx_response_test.rb +1 -1
  44. data/test/telnyx/util_test.rb +1 -1
  45. data/test/telnyx/verification_test.rb +41 -3
  46. data/test/telnyx/verify_profile_test.rb +2 -0
  47. data/test/telnyx/webhook_test.rb +1 -1
  48. data/test/telnyx/wireless_detail_records_report_test.rb +1 -0
  49. data/test/telnyx_test.rb +20 -24
  50. metadata +32 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489eabc07a51f5c6eb4907f5e14f79718d0d94653cc3353e85cb1df637e90d5d
4
- data.tar.gz: d3676bdfb8587cd41be67f7471d9b0f8040ff4ed638e499e337f8e66ee51e584
3
+ metadata.gz: 504ff2b58e1248f7eee2afa238840a697801c8b2902bf855555a985da8f3cc8f
4
+ data.tar.gz: 3d0af87ebaf35d13ca71f14413ee4812998f20f760aa3a95de9f02b20d062b9e
5
5
  SHA512:
6
- metadata.gz: 22bcd3bff117a1e95b1e08526c4d6c2f313c67b801fb2c3376dd9096db4dde5d8bc9b92533111fb23dd58ed6edd63e7bde547c5521054239c46e7c17e98ff6a2
7
- data.tar.gz: 36f193b14347d3e5d973bab543b1a40336f3940d00fead38f2961a5c77e70780e1b3b83f0651bb2f899a2cd86d0fd8d999adbc7d182c9b5468776c538dcfec4a
6
+ metadata.gz: ad5cf92920604d3e56500da6541320476be81b0a44d266b38a5eb8e530a0b61008ac29900823f8dea4d06914b4982fdedb18217d05703b38b014c2f8e4d623ce
7
+ data.tar.gz: 94e8ec89aaf27fc2d8176684ec60a35edf8f9389b4a08b90f25a5f75e12d02cd131cc16632bf6ff7db24cd28bcd30404cdabea7d38620162bab6d4998433c719
@@ -0,0 +1,53 @@
1
+ on:
2
+ release:
3
+ types: [released]
4
+
5
+ jobs:
6
+ test:
7
+ env:
8
+ TELNYX_MOCK_VERSION: 0.8.13
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby
16
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
17
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
18
+ # uses: ruby/setup-ruby@v1
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - name: Run Setup Script to install mock
23
+ run: source ./.github/scripts/before_install.sh
24
+ shell: bash
25
+ - name: Install dependencies
26
+ run: bundle install
27
+ - name: Run tests
28
+ run: bundle exec rake
29
+
30
+ build_and_publish_gem:
31
+ name: Build + Publish Gem
32
+ needs: test
33
+ runs-on: ubuntu-latest
34
+ permissions:
35
+ packages: write
36
+ contents: read
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+ - name: Set up Ruby 2.6
40
+ uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
41
+ with:
42
+ ruby-version: 2.6
43
+ - run: bundle install
44
+ - name: Publish to RubyGems
45
+ run: |
46
+ mkdir -p $HOME/.gem
47
+ touch $HOME/.gem/credentials
48
+ chmod 0600 $HOME/.gem/credentials
49
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
50
+ gem build *.gemspec
51
+ gem push *.gem
52
+ env:
53
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
@@ -16,11 +16,11 @@ on:
16
16
  jobs:
17
17
  test:
18
18
  env:
19
- TELNYX_MOCK_VERSION: 0.8.10
19
+ TELNYX_MOCK_VERSION: 0.8.14
20
20
  runs-on: ubuntu-latest
21
21
  strategy:
22
22
  matrix:
23
- ruby: [ '2.5', '2.6', '2.7' ]
23
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
24
24
  steps:
25
25
  - uses: actions/checkout@v2
26
26
  - name: Set up Ruby
@@ -0,0 +1,25 @@
1
+ on:
2
+ release:
3
+ types: [released]
4
+
5
+ jobs:
6
+ tweet:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: ethomson/send-tweet-action@v1
10
+ with:
11
+ status: >
12
+ We have a new ${{github.event.release.tag_name}} release of our
13
+ ${{ fromJson('{
14
+ "team-telnyx/telnyx-python": "Python",
15
+ "team-telnyx/telnyx-ruby": "Ruby",
16
+ "team-telnyx/telnyx-node": "Node",
17
+ "team-telnyx/telnyx-java": "Java",
18
+ "team-telnyx/telnyx-dotnet": "Dotnet",
19
+ "team-telnyx/telnyx-php": "PHP"
20
+ }')[github.event.repository.full_name] }} SDK!
21
+ Check out the details here: ${{ github.event.release.html_url }}
22
+ consumer-key: ${{ secrets.TWITTER_HANDLE_TELNYX_DEV_CONSUMER_API_KEY }}
23
+ consumer-secret: ${{ secrets.TWITTER_HANDLE_TELNYX_DEV_CONSUMER_API_SECRET }}
24
+ access-token: ${{ secrets.TWITTER_HANDLE_TELNYX_DEV_ACCESS_TOKEN }}
25
+ access-token-secret: ${{ secrets.TWITTER_HANDLE_TELNYX_DEV_ACCESS_TOKEN_SECRET }}
data/.gitignore CHANGED
@@ -6,4 +6,6 @@ tags
6
6
  /.bundle/
7
7
  coverage/
8
8
  .idea/
9
- vendor/*
9
+ vendor/*
10
+ TAGS
11
+ .ruby-version
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_from: .rubocop_todo.yml
3
3
 
4
4
  AllCops:
5
5
  DisplayCopNames: true
6
- TargetRubyVersion: 2.4
6
+ TargetRubyVersion: 2.7
7
7
  NewCops: disable
8
8
 
9
9
  Layout/CaseIndentation:
data/Gemfile CHANGED
@@ -24,6 +24,10 @@ group :development do
24
24
  gem "guard-rubocop"
25
25
  gem "rubocop", "~> 1.6"
26
26
 
27
+ # debugging
28
+ # gem 'httplog' # when included logs all http requests
29
+ # gem 'awesome_print'
30
+
27
31
  # Rack 2.0+ requires Ruby >= 2.2.2 which is problematic for the test suite on
28
32
  # older Ruby versions. Check Ruby the version here and put a maximum
29
33
  # constraint on Rack if necessary.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.9.0
data/lib/telnyx.rb CHANGED
@@ -63,9 +63,13 @@ require "telnyx/outbound_voice_profile"
63
63
  require "telnyx/phone_number_regulatory_requirement"
64
64
  require "telnyx/phone_number"
65
65
  require "telnyx/portout"
66
+ require "telnyx/porting_order"
66
67
  require "telnyx/public_key"
68
+ require "telnyx/queue"
69
+ require "telnyx/queue_call"
67
70
  require "telnyx/regulatory_requirement"
68
71
  require "telnyx/sim_card"
72
+ require "telnyx/telephony_credential"
69
73
  require "telnyx/verification"
70
74
  require "telnyx/verify_profile"
71
75
  require "telnyx/wireless_detail_records_report"
@@ -4,7 +4,12 @@ module Telnyx
4
4
  module APIOperations
5
5
  module Create
6
6
  def create(params = {}, opts = {})
7
- resp, opts = request(:post, resource_url, params, opts)
7
+ if opts.respond_to? :fetch
8
+ url = opts.fetch(:resource_url, nil)
9
+ opts.delete :resource_url
10
+ end
11
+ url ||= resource_url
12
+ resp, opts = request(:post, url, params, opts)
8
13
  Util.convert_to_telnyx_object(resp.data, opts)
9
14
  end
10
15
  end
@@ -76,7 +76,7 @@ module Telnyx
76
76
  Util.convert_to_telnyx_object(resp.data, opts)
77
77
  end
78
78
  define_instance_method.call(:"delete_#{resource}", operation)
79
- when :list
79
+ when :list # TODO: Add a plain :get case here and refactor code that (mis)uses this.
80
80
  define_singleton_method(:"list_#{resource}s") do |id, params = {}, opts = {}|
81
81
  url = send(resource_url_method, id)
82
82
  resp, opts = request(:get, url, params, opts)
@@ -10,6 +10,16 @@ module Telnyx
10
10
  # own endpoints, but there are certain cases where this is allowed.
11
11
  attr_accessor :save_with_parent
12
12
 
13
+ class << self
14
+ def inherited(subclass)
15
+ super
16
+ @descendants ||= []
17
+ @descendants << subclass
18
+ end
19
+
20
+ attr_reader :descendants
21
+ end
22
+
13
23
  def self.class_name
14
24
  name.split("::")[-1]
15
25
  end
data/lib/telnyx/call.rb CHANGED
@@ -35,7 +35,7 @@ module Telnyx
35
35
  gather_using_audio gather_using_speak playback_start
36
36
  playback_stop record_start record_stop send_dtmf transfer
37
37
  transcription_start transcription_stop record_pause
38
- record_resume gather_stop refer].freeze
38
+ record_resume gather_stop refer enqueue leave_queue].freeze
39
39
 
40
40
  ACTIONS.each do |action|
41
41
  nested_resource_class_methods action,
@@ -5,11 +5,6 @@ module Telnyx
5
5
  include Telnyx::APIOperations::Save
6
6
  extend Telnyx::APIOperations::List
7
7
 
8
- def initialize(*)
9
- super
10
- warn "[DEPRECATION] MessagingPhoneNumber is deprecated, use PhoneNumber instead"
11
- end
12
-
13
8
  OBJECT_NAME = "messaging_phone_number".freeze
14
9
  def self.resource_path(id = nil)
15
10
  return "phone_numbers/#{CGI.escape(id)}/messaging" if id
@@ -35,8 +35,8 @@ module Telnyx
35
35
  self.class.list_inbound_channels(nil).channels
36
36
  end
37
37
 
38
- def self.list_voice
39
- list_voices nil
38
+ def self.list_voice(*args, **kwargs)
39
+ list_voices(nil, *args, **kwargs)
40
40
  end
41
41
 
42
42
  def self.messaging
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ class PortingOrder < APIResource
5
+ extend APIOperations::List
6
+ extend APIOperations::Create
7
+ extend APIOperations::NestedResource
8
+ include APIOperations::Delete
9
+ include Telnyx::APIOperations::Save
10
+
11
+ nested_resource_class_methods :loa_template,
12
+ path: ["loa_template"],
13
+ operations: %i[list],
14
+ instance_methods: { list: "loa_template" }
15
+ nested_resource_class_methods :porting_phone_numbers,
16
+ path: ["porting_phone_numbers"],
17
+ operations: %i[list],
18
+ instance_methods: { list: "porting_phone_numbers" }
19
+ OBJECT_NAME = "porting_order"
20
+ end
21
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ class Queue < APIResource
5
+ extend Telnyx::APIOperations::NestedResource
6
+
7
+ nested_resource_class_methods(
8
+ :queue_call,
9
+ path: "calls",
10
+ operations: %i[list retrieve],
11
+ instance_methods: {
12
+ list: "list",
13
+ retrieve: "retrieve"
14
+ }
15
+ )
16
+
17
+ OBJECT_NAME = "queue".freeze
18
+ RESOURCE_PATH = "queues".freeze
19
+ end
20
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ class QueueCall < APIResource
5
+ OBJECT_NAME = "queue_call".freeze
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ class TelephonyCredential < APIResource
5
+ extend Telnyx::APIOperations::List
6
+ extend Telnyx::APIOperations::Create
7
+ include Telnyx::APIOperations::Save
8
+ include Telnyx::APIOperations::Delete
9
+
10
+ OBJECT_NAME = "telephony_credential".freeze
11
+ end
12
+ end
data/lib/telnyx/util.rb CHANGED
@@ -37,45 +37,18 @@ module Telnyx
37
37
  end
38
38
 
39
39
  def self.object_classes
40
- @object_classes ||= {
41
- # business objects
42
- Address::OBJECT_NAME => Address,
43
- AlphanumericSenderId::OBJECT_NAME => AlphanumericSenderId,
44
- AvailablePhoneNumber::OBJECT_NAME => AvailablePhoneNumber,
45
- BillingGroup::OBJECT_NAME => BillingGroup,
46
- Call::OBJECT_NAME => Call,
47
- CallControlApplication::OBJECT_NAME => CallControlApplication,
48
- Conferences::OBJECT_NAME => Conferences,
49
- Connection::OBJECT_NAME => Connection,
50
- CredentialConnection::OBJECT_NAME => CredentialConnection,
51
- Fax::OBJECT_NAME => Fax,
52
- FaxApplication::OBJECT_NAME => FaxApplication,
53
- FQDN::OBJECT_NAME => FQDN,
54
- FQDNConnection::OBJECT_NAME => FQDNConnection,
55
- IP::OBJECT_NAME => IP,
56
- IPConnection::OBJECT_NAME => IPConnection,
57
- Message::OBJECT_NAME => Message,
58
- MessagingPhoneNumber::OBJECT_NAME => MessagingPhoneNumber,
59
- "messaging_settings" => MessagingPhoneNumber,
60
- MessagingProfile::OBJECT_NAME => MessagingProfile,
61
- NumberLookup::OBJECT_NAME => NumberLookup,
62
- NumberOrder::OBJECT_NAME => NumberOrder,
63
- NumberOrderDocument::OBJECT_NAME => NumberOrderDocument,
64
- NumberReservation::OBJECT_NAME => NumberReservation,
65
- OutboundVoiceProfile::OBJECT_NAME => OutboundVoiceProfile,
66
- PhoneNumber::OBJECT_NAME => PhoneNumber,
67
- "phone_number_reservation" => NumberReservation,
68
- PhoneNumberRegulatoryRequirement::OBJECT_NAME => PhoneNumberRegulatoryRequirement,
69
- "phone_number_regulatory_group" => PhoneNumberRegulatoryRequirement,
70
- Portout::OBJECT_NAME => Portout,
71
- VerifyProfile::OBJECT_NAME => VerifyProfile,
72
- PublicKey::OBJECT_NAME => PublicKey,
73
- RegulatoryRequirement::OBJECT_NAME => RegulatoryRequirement,
74
- SimCard::OBJECT_NAME => SimCard,
75
- Verification::OBJECT_NAME => Verification,
76
- "verification" => Verification::Response,
77
- WirelessDetailRecordsReport::OBJECT_NAME => WirelessDetailRecordsReport,
78
- }
40
+ @object_classes ||= APIResource.descendants
41
+ .select { |klass| klass.constants(false).include? :OBJECT_NAME }
42
+ .map { |klass| [klass::OBJECT_NAME, klass] }
43
+ .to_h
44
+ .merge(
45
+ "credential" => TelephonyCredential,
46
+ "messaging_settings" => MessagingPhoneNumber,
47
+ "phone_number_regulatory_group" => PhoneNumberRegulatoryRequirement,
48
+ "phone_number_reservation" => NumberReservation,
49
+ "verification_profile" => VerifyProfile,
50
+ "verification" => Verification::Response
51
+ )
79
52
  end
80
53
 
81
54
  def self.push_object_class(key, klass)
@@ -8,6 +8,10 @@ module Telnyx
8
8
  extend APIOperations::Create
9
9
  extend APIOperations::NestedResource
10
10
 
11
+ class << self
12
+ private :create
13
+ end
14
+
11
15
  nested_resource_class_methods "by_telephone",
12
16
  path: "by_tn",
13
17
  operations: [:retrieve],
@@ -21,6 +25,31 @@ module Telnyx
21
25
  Response.construct_from resp.data[:data]
22
26
  end
23
27
 
28
+ # Trigger a call verification.
29
+ def self.call(params = {}, opts = {})
30
+ create(params, { **opts, resource_url: "#{resource_url}/call" })
31
+ end
32
+
33
+ # Trigger an SMS verification.
34
+ def self.sms(params = {}, opts = {})
35
+ create(params, { **opts, resource_url: "#{resource_url}/sms" })
36
+ end
37
+
38
+ # Trigger a PSD2 verification.
39
+ def self.psd2(params = {}, opts = {})
40
+ create(params, { **opts, resource_url: "#{resource_url}/psd2" })
41
+ end
42
+
43
+ # Trigger a flashcall verification.
44
+ def self.flashcall(params = {}, opts = {})
45
+ create(params, { **opts, resource_url: "#{resource_url}/flashcall" })
46
+ end
47
+
48
+ # Trigger a whatsapp verification.
49
+ def self.whatsapp(params = {}, opts = {})
50
+ create(params, { **opts, resource_url: "#{resource_url}/whatsapp" })
51
+ end
52
+
24
53
  OBJECT_NAME = "verify_verification".freeze
25
54
  RESOURCE_PATH = "verifications".freeze
26
55
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "2.5.0".freeze
4
+ VERSION = "2.9.0".freeze
5
5
  end
data/telnyx.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  }
24
24
 
25
25
  s.add_dependency("faraday", ">= 0.13", "< 2.0", "!= 0.16.0", "!= 0.16.1", "!= 0.16.2", "!= 0.17.1")
26
- s.add_dependency("net-http-persistent", "~> 3.0")
26
+ s.add_dependency("net-http-persistent", ">= 3.0", "< 5.0")
27
27
  s.add_dependency("ed25519", "~> 1")
28
28
 
29
29
  s.files = `git ls-files`.split("\n")
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class AlphanumericSenderIdTest < Test::Unit::TestCase
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # frozen_string_literal: true
3
3
 
4
- require ::File.expand_path("../../test_helper", __FILE__)
4
+ require_relative "../test_helper"
5
5
 
6
6
  module Telnyx
7
7
  class ApiOperationsTest < Test::Unit::TestCase
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # frozen_string_literal: true
3
3
 
4
- require ::File.expand_path("../../test_helper", __FILE__)
4
+ require_relative "../test_helper"
5
5
 
6
6
  module Telnyx
7
7
  class ApiResourceTest < Test::Unit::TestCase
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class AvailablePhoneNumberTest < Test::Unit::TestCase
@@ -37,6 +37,8 @@ module Telnyx
37
37
  assert defined? @call.record_stop
38
38
  assert defined? @call.send_dtmf
39
39
  assert defined? @call.transfer
40
+ assert defined? @call.enqueue
41
+ assert defined? @call.leave_queue
40
42
  end
41
43
  end
42
44
 
@@ -62,37 +64,6 @@ module Telnyx
62
64
  assert call.call_leg_id
63
65
  assert call.call_session_id
64
66
  end
65
-
66
- should "send all commands" do
67
- @call = Call.new
68
- @call.id = "1234"
69
- @call.reject cause: "CALL_REJECTED"
70
- assert_requested :post, format_action_url(@call, "reject")
71
- @call.answer
72
- assert_requested :post, format_action_url(@call, "answer")
73
- @call.hangup
74
- assert_requested :post, format_action_url(@call, "hangup")
75
- @call.bridge call_control_id: SecureRandom.base64(20)
76
- assert_requested :post, format_action_url(@call, "bridge")
77
- @call.speak language: "en-US", voice: "female", payload: "Telnyx call control test"
78
- assert_requested :post, format_action_url(@call, "speak")
79
- @call.fork_start call_control_id: SecureRandom.base64(20)
80
- assert_requested :post, format_action_url(@call, "fork_start")
81
- @call.fork_stop
82
- assert_requested :post, format_action_url(@call, "fork_stop")
83
- @call.gather_using_audio audio_url: "https://audio.example.com"
84
- assert_requested :post, format_action_url(@call, "gather_using_audio")
85
- @call.gather_using_speak language: "en-US", voice: "female", payload: "Telnyx call control test"
86
- assert_requested :post, format_action_url(@call, "gather_using_speak")
87
- @call.playback_start audio_url: "https://audio.example.com"
88
- assert_requested :post, format_action_url(@call, "playback_start")
89
- @call.playback_stop
90
- assert_requested :post, format_action_url(@call, "playback_stop")
91
- @call.send_dtmf digits: "1www2WABCDw9"
92
- assert_requested :post, format_action_url(@call, "send_dtmf")
93
- @call.transfer to: "+15552223333"
94
- assert_requested :post, format_action_url(@call, "transfer")
95
- end
96
67
  end
97
68
 
98
69
  context "commands" do
@@ -172,6 +143,14 @@ module Telnyx
172
143
  @call.refer sip_address: "sip:username@sip.non-telnyx-address.com"
173
144
  assert_requested :post, format_action_url(@call, "refer")
174
145
  end
146
+ should "enqueue" do
147
+ @call.enqueue call_control_id: SecureRandom.base64(20)
148
+ assert_requested :post, format_action_url(@call, "enqueue")
149
+ end
150
+ should "leave_queue" do
151
+ @call.leave_queue call_control_id: SecureRandom.base64(20)
152
+ assert_requested :post, format_action_url(@call, "leave_queue")
153
+ end
175
154
  end
176
155
 
177
156
  def create_call
@@ -97,7 +97,7 @@ module Telnyx
97
97
  end
98
98
 
99
99
  should "update" do
100
- @conference.update call_control_id: "foo"
100
+ @conference.update call_control_id: "foo", supervisor_role: "barge"
101
101
  assert_requested :post, action_url(@conference, "update")
102
102
  end
103
103
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class TelnyxErrorTest < Test::Unit::TestCase
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../test_helper"
4
+
4
5
  module Telnyx
5
6
  class FaxTest < Test::Unit::TestCase
6
7
  should "fetch index" do
@@ -11,7 +12,7 @@ module Telnyx
11
12
  end
12
13
 
13
14
  should "send fax" do
14
- fax = Fax.create connection_id: "foo", media_url: "example.com", to: "+13127367276"
15
+ fax = Fax.create connection_id: "foo", media_url: "example.com", to: "+13127367276", from: "+13127367277"
15
16
  assert_requested :post, "#{Telnyx.api_base}/v2/faxes"
16
17
  assert_kind_of Fax, fax
17
18
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class ListObjectTest < Test::Unit::TestCase
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class MessageTest < Test::Unit::TestCase
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class MessagingPhoneNumberTest < Test::Unit::TestCase
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class MessagingProfileTest < Test::Unit::TestCase
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../test_helper"
4
+
3
5
  module Telnyx
4
6
  class NumberReservationTest < Test::Unit::TestCase
5
7
  should "be listable" do
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../test_helper"
4
+ module Telnyx
5
+ class PortingOrderTest < Test::Unit::TestCase
6
+ should "list porting orders" do
7
+ porting_orders = PortingOrder.list
8
+ assert_requested :get, "#{Telnyx.api_base}/v2/porting_orders"
9
+ assert_kind_of ListObject, porting_orders
10
+ assert_kind_of PortingOrder, porting_orders.first
11
+ end
12
+
13
+ should "create porting order" do
14
+ PortingOrder.create phone_numbers: %w[12223334444 12223335555]
15
+ assert_requested :post, "#{Telnyx.api_base}/v2/porting_orders"
16
+ end
17
+
18
+ should "retrieve porting order" do
19
+ porting_order = PortingOrder.retrieve "id"
20
+ assert_requested :get, "#{Telnyx.api_base}/v2/porting_orders/id"
21
+ assert_kind_of PortingOrder, porting_order
22
+ end
23
+
24
+ should "delete porting order" do
25
+ porting_order = PortingOrder.retrieve("id")
26
+
27
+ porting_order.delete
28
+ assert_requested :delete, "#{Telnyx.api_base}/v2/porting_orders/#{porting_order.id}"
29
+ end
30
+
31
+ should "update porting order" do
32
+ porting_order = PortingOrder.retrieve("id")
33
+
34
+ porting_order.user_feedback.user_comment = "user comment!"
35
+ porting_order.save
36
+ assert_requested :patch, "#{Telnyx.api_base}/v2/porting_orders/#{porting_order.id}"
37
+ end
38
+
39
+ context "commands" do
40
+ should "get loa template" do
41
+ omit "API still in beta"
42
+ porting_order = PortingOrder.retrieve("id")
43
+
44
+ porting_order.loa_template
45
+
46
+ assert_requested :get, "#{Telnyx.api_base}/v2/porting_orders/#{porting_order.id}/loa_template"
47
+ end
48
+
49
+ should "fetch porting phone numbers" do
50
+ end
51
+ end
52
+ end
53
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class PublicKeyTest < Test::Unit::TestCase
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../test_helper"
4
+
5
+ module Telnyx
6
+ class QueueTest < Test::Unit::TestCase
7
+ should "retrieve queue" do
8
+ queue = Queue.retrieve("id")
9
+ assert_requested :get, "#{Telnyx.api_base}/v2/queues/id"
10
+ assert_kind_of Queue, queue
11
+ end
12
+
13
+ should "retrieve call from queue" do
14
+ queue = Queue.retrieve("id")
15
+ queue_call = queue.retrieve("call_control_id")
16
+ assert_requested :get, "#{Telnyx.api_base}/v2/queues/id/calls/call_control_id"
17
+ assert_kind_of QueueCall, queue_call
18
+ end
19
+
20
+ should "list calls from queue" do
21
+ queue = Queue.retrieve("id")
22
+ queue_calls = queue.list
23
+ assert_requested :get, "#{Telnyx.api_base}/v2/queues/id/calls"
24
+ assert_kind_of QueueCall, queue_calls.first
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../test_helper"
4
+
5
+ module Telnyx
6
+ class TelephonyCredentialTest < Test::Unit::TestCase
7
+ should "list telephony credentials" do
8
+ telephony_credentials = TelephonyCredential.list
9
+ assert_requested :get, "#{Telnyx.api_base}/v2/telephony_credentials"
10
+ assert_kind_of ListObject, telephony_credentials
11
+ assert_kind_of TelephonyCredential, telephony_credentials.first
12
+ end
13
+
14
+ should "create telephony credential" do
15
+ TelephonyCredential.create(
16
+ name: "Test credential",
17
+ connection_id: "1234567890"
18
+ )
19
+ assert_requested :post, "#{Telnyx.api_base}/v2/telephony_credentials"
20
+ end
21
+
22
+ should "retrieve telephony credential" do
23
+ telephony_credential = TelephonyCredential.retrieve("id")
24
+ assert_requested :get, "#{Telnyx.api_base}/v2/telephony_credentials/id"
25
+ assert_kind_of TelephonyCredential, telephony_credential
26
+ end
27
+
28
+ should "delete telephony credential" do
29
+ telephony_credential = TelephonyCredential.retrieve("id")
30
+
31
+ telephony_credential.delete
32
+ assert_requested :delete, "#{Telnyx.api_base}/v2/telephony_credentials/id"
33
+ end
34
+
35
+ should "update telephony credential" do
36
+ telephony_credential = TelephonyCredential.retrieve("id")
37
+
38
+ telephony_credential.expires_at = "2021-07-27T17:58:54Z"
39
+ telephony_credential.save
40
+ assert_requested :patch, "#{Telnyx.api_base}/v2/telephony_credentials/id"
41
+ end
42
+ end
43
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class TelnyxClientTest < Test::Unit::TestCase
@@ -235,19 +235,17 @@ module Telnyx
235
235
 
236
236
  context "Telnyx-Account header" do
237
237
  should "use a globally set header" do
238
- begin
239
- old = Telnyx.telnyx_account
240
- Telnyx.telnyx_account = "acct_1234"
238
+ old = Telnyx.telnyx_account
239
+ Telnyx.telnyx_account = "acct_1234"
241
240
 
242
- stub_request(:post, "#{Telnyx.api_base}/v2/messaging_profiles")
243
- .with(headers: { "Telnyx-Account" => Telnyx.telnyx_account })
244
- .to_return(body: JSON.generate(object: "account"))
241
+ stub_request(:post, "#{Telnyx.api_base}/v2/messaging_profiles")
242
+ .with(headers: { "Telnyx-Account" => Telnyx.telnyx_account })
243
+ .to_return(body: JSON.generate(object: "account"))
245
244
 
246
- client = TelnyxClient.new
247
- client.execute_request(:post, "/v2/messaging_profiles", params: { name: "foobar" })
248
- ensure
249
- Telnyx.telnyx_account = old
250
- end
245
+ client = TelnyxClient.new
246
+ client.execute_request(:post, "/v2/messaging_profiles", params: { name: "foobar" })
247
+ ensure
248
+ Telnyx.telnyx_account = old
251
249
  end
252
250
 
253
251
  should "use a locally set header" do
@@ -274,40 +272,38 @@ module Telnyx
274
272
 
275
273
  context "app_info" do
276
274
  should "send app_info if set" do
277
- begin
278
- old = Telnyx.app_info
279
- Telnyx.set_app_info(
280
- "MyAwesomePlugin",
281
- partner_id: "partner_1234",
282
- url: "https://myawesomeplugin.info",
283
- version: "1.2.34"
284
- )
275
+ old = Telnyx.app_info
276
+ Telnyx.set_app_info(
277
+ "MyAwesomePlugin",
278
+ partner_id: "partner_1234",
279
+ url: "https://myawesomeplugin.info",
280
+ version: "1.2.34"
281
+ )
285
282
 
286
- stub_request(:post, "#{Telnyx.api_base}/v2/messaging_profiles")
287
- .with do |req|
288
- assert_equal \
289
- "Telnyx/v2 RubyBindings/#{Telnyx::VERSION} " \
290
- "MyAwesomePlugin/1.2.34 (https://myawesomeplugin.info)",
291
- req.headers["User-Agent"]
283
+ stub_request(:post, "#{Telnyx.api_base}/v2/messaging_profiles")
284
+ .with do |req|
285
+ assert_equal \
286
+ "Telnyx/v2 RubyBindings/#{Telnyx::VERSION} " \
287
+ "MyAwesomePlugin/1.2.34 (https://myawesomeplugin.info)",
288
+ req.headers["User-Agent"]
292
289
 
293
- data = JSON.parse(req.headers["X-Telnyx-Client-User-Agent"],
294
- symbolize_names: true)
290
+ data = JSON.parse(req.headers["X-Telnyx-Client-User-Agent"],
291
+ symbolize_names: true)
295
292
 
296
- assert_equal({
297
- name: "MyAwesomePlugin",
298
- partner_id: "partner_1234",
299
- url: "https://myawesomeplugin.info",
300
- version: "1.2.34",
301
- }, data[:application])
293
+ assert_equal({
294
+ name: "MyAwesomePlugin",
295
+ partner_id: "partner_1234",
296
+ url: "https://myawesomeplugin.info",
297
+ version: "1.2.34",
298
+ }, data[:application])
302
299
 
303
- true
304
- end.to_return(body: JSON.generate(record_type: "messaging_profile"))
300
+ true
301
+ end.to_return(body: JSON.generate(record_type: "messaging_profile"))
305
302
 
306
- client = TelnyxClient.new
307
- client.execute_request(:post, "/v2/messaging_profiles")
308
- ensure
309
- Telnyx.app_info = old
310
- end
303
+ client = TelnyxClient.new
304
+ client.execute_request(:post, "/v2/messaging_profiles")
305
+ ensure
306
+ Telnyx.app_info = old
311
307
  end
312
308
  end
313
309
 
@@ -591,16 +587,14 @@ module Telnyx
591
587
  end
592
588
 
593
589
  should "reset local thread state after a call" do
594
- begin
595
- Thread.current[:telnyx_client] = :telnyx_client
590
+ Thread.current[:telnyx_client] = :telnyx_client
596
591
 
597
- client = TelnyxClient.new
598
- client.request {}
592
+ client = TelnyxClient.new
593
+ client.request {}
599
594
 
600
- assert_equal :telnyx_client, Thread.current[:telnyx_client]
601
- ensure
602
- Thread.current[:telnyx_client] = nil
603
- end
595
+ assert_equal :telnyx_client, Thread.current[:telnyx_client]
596
+ ensure
597
+ Thread.current[:telnyx_client] = nil
604
598
  end
605
599
  end
606
600
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class TelnyxObjectTest < Test::Unit::TestCase
@@ -159,21 +159,19 @@ module Telnyx
159
159
 
160
160
  context "#to_hash" do
161
161
  should "skip calling to_hash on nil" do
162
- begin
163
- module NilWithToHash
164
- def to_hash
165
- raise "Can't call to_hash on nil"
166
- end
162
+ module NilWithToHash
163
+ def to_hash
164
+ raise "Can't call to_hash on nil"
167
165
  end
168
- ::NilClass.include NilWithToHash
169
-
170
- hash_with_nil = { id: 3, foo: nil }
171
- obj = TelnyxObject.construct_from(hash_with_nil)
172
- expected_hash = { id: 3, foo: nil }
173
- assert_equal expected_hash, obj.to_hash
174
- ensure
175
- ::NilClass.send(:undef_method, :to_hash)
176
166
  end
167
+ ::NilClass.include NilWithToHash
168
+
169
+ hash_with_nil = { id: 3, foo: nil }
170
+ obj = TelnyxObject.construct_from(hash_with_nil)
171
+ expected_hash = { id: 3, foo: nil }
172
+ assert_equal expected_hash, obj.to_hash
173
+ ensure
174
+ ::NilClass.send(:undef_method, :to_hash)
177
175
  end
178
176
 
179
177
  should "recursively call to_hash on its values" do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class TelnyxResponseTest < Test::Unit::TestCase
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
 
5
5
  module Telnyx
6
6
  class UtilTest < Test::Unit::TestCase
@@ -1,10 +1,48 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../test_helper"
4
+
3
5
  module Telnyx
4
6
  class VerificationTest < Test::Unit::TestCase
5
- should "create verification" do
6
- Verification.create phone_number: "+15555555555", twofa_profile_id: "1234", type: "sms", verify_profile_id: "foobar"
7
- assert_requested :post, "#{Telnyx.api_base}/v2/verifications"
7
+ context "create verification" do
8
+ should "call" do
9
+ Verification.call phone_number: "+15555555555",
10
+ verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292"
11
+ assert_requested :post, "#{Telnyx.api_base}/v2/verifications/call"
12
+ end
13
+
14
+ should "send sms" do
15
+ Verification.sms phone_number: "+15555555555",
16
+ verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292",
17
+ timeout_secs: 600
18
+ assert_requested :post, "#{Telnyx.api_base}/v2/verifications/sms"
19
+ end
20
+
21
+ should "trigger psd2" do
22
+ Verification.psd2 phone_number: "+15555555555",
23
+ verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292",
24
+ amount: "12.34",
25
+ currency: "USD",
26
+ payee: "FooBar Inc.",
27
+ timeout_secs: 600
28
+
29
+ assert_requested :post, "#{Telnyx.api_base}/v2/verifications/psd2"
30
+ end
31
+
32
+ should "flashcall" do
33
+ Verification.flashcall phone_number: "+15555555555",
34
+ timeout_secs: 600,
35
+ verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292"
36
+ assert_requested :post, "#{Telnyx.api_base}/v2/verifications/flashcall"
37
+ end
38
+
39
+ should "whatsapp" do
40
+ Verification.whatsapp phone_number: "+15555555555",
41
+ timeout_secs: 600,
42
+ verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292",
43
+ app_name: "FooBar"
44
+ assert_requested :post, "#{Telnyx.api_base}/v2/verifications/whatsapp"
45
+ end
8
46
  end
9
47
 
10
48
  should "retrieve verification" do
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../test_helper"
4
+
3
5
  module Telnyx
4
6
  class VerifyProfileTest < Test::Unit::TestCase
5
7
  should "list verify_profiles" do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path("../../test_helper", __FILE__)
3
+ require_relative "../test_helper"
4
4
  require "securerandom"
5
5
 
6
6
  module Telnyx
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../test_helper"
4
+
4
5
  module Telnyx
5
6
  class WirelessDetailRecordsReportTest < Test::Unit::TestCase
6
7
  should "list detail records report" do
data/test/telnyx_test.rb CHANGED
@@ -4,33 +4,29 @@ require ::File.expand_path("../test_helper", __FILE__)
4
4
 
5
5
  class TelnyxTest < Test::Unit::TestCase
6
6
  should "allow app_info to be configured" do
7
- begin
8
- old = Telnyx.app_info
9
- Telnyx.set_app_info(
10
- "MyAwesomePlugin",
11
- partner_id: "partner_1234",
12
- url: "https://myawesomeplugin.info",
13
- version: "1.2.34"
14
- )
15
- assert_equal({
16
- name: "MyAwesomePlugin",
17
- partner_id: "partner_1234",
18
- url: "https://myawesomeplugin.info",
19
- version: "1.2.34",
20
- }, Telnyx.app_info)
21
- ensure
22
- Telnyx.app_info = old
23
- end
7
+ old = Telnyx.app_info
8
+ Telnyx.set_app_info(
9
+ "MyAwesomePlugin",
10
+ partner_id: "partner_1234",
11
+ url: "https://myawesomeplugin.info",
12
+ version: "1.2.34"
13
+ )
14
+ assert_equal({
15
+ name: "MyAwesomePlugin",
16
+ partner_id: "partner_1234",
17
+ url: "https://myawesomeplugin.info",
18
+ version: "1.2.34",
19
+ }, Telnyx.app_info)
20
+ ensure
21
+ Telnyx.app_info = old
24
22
  end
25
23
 
26
24
  should "allow max_network_retries to be configured" do
27
- begin
28
- old = Telnyx.max_network_retries
29
- Telnyx.max_network_retries = 99
30
- assert_equal 99, Telnyx.max_network_retries
31
- ensure
32
- Telnyx.max_network_retries = old
33
- end
25
+ old = Telnyx.max_network_retries
26
+ Telnyx.max_network_retries = 99
27
+ assert_equal 99, Telnyx.max_network_retries
28
+ ensure
29
+ Telnyx.max_network_retries = old
34
30
  end
35
31
 
36
32
  should "have default open and read timeouts" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telnyx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Telnyx
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.13'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '2.0'
23
20
  - - "!="
24
21
  - !ruby/object:Gem::Version
25
22
  version: 0.16.0
@@ -32,6 +29,9 @@ dependencies:
32
29
  - - "!="
33
30
  - !ruby/object:Gem::Version
34
31
  version: 0.17.1
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,9 +39,6 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0.13'
42
- - - "<"
43
- - !ruby/object:Gem::Version
44
- version: '2.0'
45
42
  - - "!="
46
43
  - !ruby/object:Gem::Version
47
44
  version: 0.16.0
@@ -54,20 +51,29 @@ dependencies:
54
51
  - - "!="
55
52
  - !ruby/object:Gem::Version
56
53
  version: 0.17.1
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: net-http-persistent
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '3.0'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '5.0'
64
67
  type: :runtime
65
68
  prerelease: false
66
69
  version_requirements: !ruby/object:Gem::Requirement
67
70
  requirements:
68
- - - "~>"
71
+ - - ">="
69
72
  - !ruby/object:Gem::Version
70
73
  version: '3.0'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: '5.0'
71
77
  - !ruby/object:Gem::Dependency
72
78
  name: ed25519
73
79
  requirement: !ruby/object:Gem::Requirement
@@ -92,7 +98,9 @@ extra_rdoc_files: []
92
98
  files:
93
99
  - ".github/ISSUE_TEMPLATE.md"
94
100
  - ".github/scripts/before_install.sh"
101
+ - ".github/workflows/publish-gem-on-release.yml"
95
102
  - ".github/workflows/ruby.yml"
103
+ - ".github/workflows/tweet-release.yml"
96
104
  - ".gitignore"
97
105
  - ".rubocop.yml"
98
106
  - ".rubocop_todo.yml"
@@ -151,11 +159,15 @@ files:
151
159
  - lib/telnyx/outbound_voice_profile.rb
152
160
  - lib/telnyx/phone_number.rb
153
161
  - lib/telnyx/phone_number_regulatory_requirement.rb
162
+ - lib/telnyx/porting_order.rb
154
163
  - lib/telnyx/portout.rb
155
164
  - lib/telnyx/public_key.rb
165
+ - lib/telnyx/queue.rb
166
+ - lib/telnyx/queue_call.rb
156
167
  - lib/telnyx/regulatory_requirement.rb
157
168
  - lib/telnyx/sim_card.rb
158
169
  - lib/telnyx/singleton_api_resource.rb
170
+ - lib/telnyx/telephony_credential.rb
159
171
  - lib/telnyx/telnyx_client.rb
160
172
  - lib/telnyx/telnyx_object.rb
161
173
  - lib/telnyx/telnyx_response.rb
@@ -197,9 +209,12 @@ files:
197
209
  - test/telnyx/outbound_voice_profile_test.rb
198
210
  - test/telnyx/phone_number_regulatory_requirement_test.rb
199
211
  - test/telnyx/phone_number_test.rb
212
+ - test/telnyx/porting_order_test.rb
200
213
  - test/telnyx/public_key_test.rb
214
+ - test/telnyx/queue_test.rb
201
215
  - test/telnyx/regulatory_requirement_test.rb
202
216
  - test/telnyx/sim_card_test.rb
217
+ - test/telnyx/telephony_credential_test.rb
203
218
  - test/telnyx/telnyx_client_test.rb
204
219
  - test/telnyx/telnyx_object_test.rb
205
220
  - test/telnyx/telnyx_response_test.rb
@@ -220,7 +235,7 @@ metadata:
220
235
  github_repo: ssh://github.com/team-telnyx/telnyx-ruby
221
236
  homepage_uri: https://telnyx.com
222
237
  source_code_uri: https://github.com/team-telnyx/telnyx-ruby
223
- post_install_message:
238
+ post_install_message:
224
239
  rdoc_options: []
225
240
  require_paths:
226
241
  - lib
@@ -235,8 +250,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
250
  - !ruby/object:Gem::Version
236
251
  version: '0'
237
252
  requirements: []
238
- rubygems_version: 3.1.4
239
- signing_key:
253
+ rubygems_version: 3.0.3.1
254
+ signing_key:
240
255
  specification_version: 4
241
256
  summary: Ruby bindings for the Telnyx API
242
257
  test_files:
@@ -271,9 +286,12 @@ test_files:
271
286
  - test/telnyx/outbound_voice_profile_test.rb
272
287
  - test/telnyx/phone_number_regulatory_requirement_test.rb
273
288
  - test/telnyx/phone_number_test.rb
289
+ - test/telnyx/porting_order_test.rb
274
290
  - test/telnyx/public_key_test.rb
291
+ - test/telnyx/queue_test.rb
275
292
  - test/telnyx/regulatory_requirement_test.rb
276
293
  - test/telnyx/sim_card_test.rb
294
+ - test/telnyx/telephony_credential_test.rb
277
295
  - test/telnyx/telnyx_client_test.rb
278
296
  - test/telnyx/telnyx_object_test.rb
279
297
  - test/telnyx/telnyx_response_test.rb