Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Merge 4873563 into bfbdf5f
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Greenberg committed Apr 6, 2020
2 parents bfbdf5f + 4873563 commit 22acb7b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 15 deletions.
6 changes: 5 additions & 1 deletion lib/nexmo/account.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# typed: false
# typed: strict
# frozen_string_literal: true

module Nexmo
class Account < Namespace
extend T::Sig
include Keys

self.host = :rest_host
Expand All @@ -13,6 +14,7 @@ class Account < Namespace
#
# @see https://developer.nexmo.com/api/developer/account#get-balance
#
sig { returns(Nexmo::Response) }
def balance
request('/account/get-balance')
end
Expand All @@ -35,6 +37,7 @@ def balance
#
# @see https://developer.nexmo.com/api/developer/account#settings
#
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
def update(params)
request('/account/settings', params: camelcase(params), type: Post)
end
Expand All @@ -50,6 +53,7 @@ def update(params)
#
# @see https://developer.nexmo.com/api/developer/account#top-up
#
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
def topup(params)
request('/account/top-up', params: params, type: Post)
end
Expand Down
6 changes: 5 additions & 1 deletion lib/nexmo/alerts.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# typed: false
# typed: strict
# frozen_string_literal: true

module Nexmo
class Alerts < Namespace
extend T::Sig
self.host = :rest_host

# Request the list of phone numbers opted out from your campaign.
Expand All @@ -11,6 +12,7 @@ class Alerts < Namespace
#
# @return [Response]
#
sig { returns(Nexmo::Response) }
def list
request('/sc/us/alert/opt-in/query/json')
end
Expand All @@ -26,6 +28,7 @@ def list
#
# @see https://developer.nexmo.com/api/sms/us-short-codes/alerts/subscription
#
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
def remove(params)
request('/sc/us/alert/opt-in/manage/json', params: params, type: Post)
end
Expand Down Expand Up @@ -61,6 +64,7 @@ def remove(params)
#
# @see https://developer.nexmo.com/api/sms/us-short-codes/alerts/sending
#
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
def send(params)
request('/sc/us/alert/json', params: params, type: Post)
end
Expand Down
7 changes: 0 additions & 7 deletions sorbet/rbi/gems/rake.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ module Rake::FileUtilsExt
def chown_R(*args, **options, &block); end
def copy(*args, **options, &block); end
def cp(*args, **options, &block); end
def cp_lr(*args, **options, &block); end
def cp_r(*args, **options, &block); end
def install(*args, **options, &block); end
def link(*args, **options, &block); end
Expand Down Expand Up @@ -187,7 +186,6 @@ class Rake::FileList
def at(*args, &block); end
def bsearch(*args, &block); end
def bsearch_index(*args, &block); end
def chain(*args, &block); end
def chunk(*args, &block); end
def chunk_while(*args, &block); end
def clear(*args, &block); end
Expand All @@ -205,7 +203,6 @@ class Rake::FileList
def delete_at(*args, &block); end
def delete_if(*args, &block); end
def detect(*args, &block); end
def difference(*args, &block); end
def dig(*args, &block); end
def drop(*args, &block); end
def drop_while(*args, &block); end
Expand All @@ -226,8 +223,6 @@ class Rake::FileList
def ext(newext = nil); end
def fetch(*args, &block); end
def fill(*args, &block); end
def filter!(*args, &block); end
def filter(*args, &block); end
def find(*args, &block); end
def find_all(*args, &block); end
def find_index(*args, &block); end
Expand Down Expand Up @@ -319,7 +314,6 @@ class Rake::FileList
def to_s; end
def to_set(*args, &block); end
def transpose(*args, &block); end
def union(*args, &block); end
def uniq!(*args, &block); end
def uniq(*args, &block); end
def unshift(*args, &block); end
Expand Down Expand Up @@ -574,7 +568,6 @@ module Rake::DSL
def chown_R(*args, **options, &block); end
def copy(*args, **options, &block); end
def cp(*args, **options, &block); end
def cp_lr(*args, **options, &block); end
def cp_r(*args, **options, &block); end
def desc(description); end
def directory(*args, &block); end
Expand Down
1 change: 0 additions & 1 deletion sorbet/rbi/gems/webmock.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ class StubSocket
end
class Net::WebMockNetBufferedIO < Net::BufferedIO
def initialize(io, *args); end
def rbuf_fill; end
end
module WebMock::NetHTTPUtility
def self.check_right_http_connection; end
Expand Down
4 changes: 2 additions & 2 deletions sorbet/rbi/gems/yard.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ class Insertion
def insertion(val, rel, recursive = nil, list = nil); end
end
class File < IO
def self.cleanpath(path, rel_root = nil); end
def self.empty?(arg0); end
def self.join(*arg0); end
def self.read_binary(file); end
def self.relative_path(from, to); end
def self.split(arg0); end
end
module Gem
def self.source_index; end
Expand Down
6 changes: 5 additions & 1 deletion sorbet/rbi/gems/zeitwerk.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/zeitwerk/all/zeitwerk.rbi
#
# zeitwerk-2.2.2
# zeitwerk-2.3.0
module Zeitwerk::RealModName
def real_mod_name(mod); end
end
Expand All @@ -27,6 +27,9 @@ class Zeitwerk::Loader
def autoloaded_dirs; end
def autoloads; end
def cdef?(parent, cname); end
def collapse(*glob_patterns); end
def collapse_dirs; end
def collapse_glob_patterns; end
def cpath(parent, cname); end
def dir?(path); end
def dirs; end
Expand Down Expand Up @@ -60,6 +63,7 @@ class Zeitwerk::Loader
def promote_namespace_from_implicit_to_explicit(dir:, file:, parent:, cname:); end
def push_dir(path); end
def raise_if_conflicting_directory(dir); end
def recompute_collapse_dirs; end
def recompute_ignored_paths; end
def register_explicit_namespace(cpath); end
def reload; end
Expand Down
33 changes: 31 additions & 2 deletions sorbet/rbi/hidden-definitions/hidden.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -1375,15 +1375,18 @@ class File::Stat
end

class File
<<<<<<< HEAD
def self.cleanpath(path, rel_root=T.unsafe(nil)); end

=======
>>>>>>> master
def self.exists?(_); end

def self.lutime(*_); end

def self.mkfifo(*_); end

def self.open!(file, *args, &block); end

def self.read_binary(file); end
end

FileList = Rake::FileList
Expand Down Expand Up @@ -1991,6 +1994,23 @@ Net::HTTPMultipleChoice = Net::HTTPMultipleChoices
class Net::HTTPNotExtended
HAS_BODY = ::T.let(nil, ::T.untyped)
end
<<<<<<< HEAD

class Net::HTTPNotExtended
end

class Net::HTTPProcessing
HAS_BODY = ::T.let(nil, ::T.untyped)
end

class Net::HTTPProcessing
end

Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError

Net::HTTPRedirectionCode = Net::HTTPRedirection

=======

class Net::HTTPNotExtended
end
Expand All @@ -2006,6 +2026,7 @@ Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError

Net::HTTPRedirectionCode = Net::HTTPRedirection

>>>>>>> master
Net::HTTPRequestURITooLarge = Net::HTTPRequestURITooLong

Net::HTTPResponceReceiver = Net::HTTPResponse
Expand Down Expand Up @@ -2048,6 +2069,11 @@ class Nexmo::Account
include ::Nexmo::Keys
end

class Nexmo::Account
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end

class Nexmo::Alerts
end

Expand Down Expand Up @@ -2220,6 +2246,8 @@ end
class Nexmo::Voice::Stream
end

<<<<<<< HEAD
=======
class Nexmo::Voice::Talk
end

Expand All @@ -2228,6 +2256,7 @@ class NilClass
def to_i(); end
end

>>>>>>> master
class NoMethodError
def args(); end

Expand Down

0 comments on commit 22acb7b

Please sign in to comment.