Skip to content

Commit

Permalink
add new wireless endpoints (#78)
Browse files Browse the repository at this point in the history
* add new wireless endpoints

added:
* ota_updates
* mobile_operator_networks

* replace coveralls with coveralls_reborn
  • Loading branch information
pyrareae authored Aug 17, 2021
1 parent d58779b commit 0597666
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gemspec

group :development do
gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "faraday", "~> 1.0"
gem "mocha", "~> 0.13.2"
gem "rake"
Expand Down
8 changes: 5 additions & 3 deletions lib/telnyx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,29 @@
require "telnyx/connection"
require "telnyx/credential_connection"
require "telnyx/event"
require "telnyx/fax"
require "telnyx/fax_application"
require "telnyx/fax"
require "telnyx/fqdn_connection"
require "telnyx/fqdn"
require "telnyx/ip_connection"
require "telnyx/ip"
require "telnyx/message"
require "telnyx/messaging_phone_number"
require "telnyx/messaging_profile"
require "telnyx/mobile_operator_network"
require "telnyx/number_lookup"
require "telnyx/number_order_document"
require "telnyx/number_order"
require "telnyx/number_reservation"
require "telnyx/ota_update"
require "telnyx/outbound_voice_profile"
require "telnyx/phone_number_regulatory_requirement"
require "telnyx/phone_number"
require "telnyx/portout"
require "telnyx/porting_order"
require "telnyx/portout"
require "telnyx/public_key"
require "telnyx/queue"
require "telnyx/queue_call"
require "telnyx/queue"
require "telnyx/regulatory_requirement"
require "telnyx/sim_card"
require "telnyx/telephony_credential"
Expand Down
9 changes: 9 additions & 0 deletions lib/telnyx/mobile_operator_network.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

module Telnyx
class MobileOperatorNetwork < APIResource
extend APIOperations::List

OBJECT_NAME = "mobile_operator_network".freeze
end
end
9 changes: 9 additions & 0 deletions lib/telnyx/ota_update.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

module Telnyx
class OtaUpdate < APIResource
extend APIOperations::List

OBJECT_NAME = "ota_update".freeze
end
end
14 changes: 14 additions & 0 deletions test/telnyx/mobile_operator_network_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
class MobileOperatorNetworkTest < Test::Unit::TestCase
should "be listable" do
mobile_ops = MobileOperatorNetwork.list
assert_requested :get, "#{Telnyx.api_base}/v2/mobile_operator_networks"
assert_kind_of ListObject, mobile_ops
assert_kind_of MobileOperatorNetwork, mobile_ops.first
end
end
end
20 changes: 20 additions & 0 deletions test/telnyx/ota_update_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
class OtaUpdateTest < Test::Unit::TestCase
should "be retrievable" do
ota_update = OtaUpdate.retrieve "12345"
assert_requested :get, "#{Telnyx.api_base}/v2/ota_updates/12345"
assert_kind_of OtaUpdate, ota_update
end

should "be listable" do
ota_updates = OtaUpdate.list
assert_requested :get, "#{Telnyx.api_base}/v2/ota_updates"
assert_kind_of ListObject, ota_updates
assert_kind_of OtaUpdate, ota_updates.first
end
end
end

0 comments on commit 0597666

Please sign in to comment.