nexmo 6.3.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 431850b9568a3bacf15de1cf1f31883616451e0fdd49283e9f78deb76cf74ba9
4
- data.tar.gz: 8d3c2e1314efd2235abb2e3b243367fa715eb9d568048178f8d86e7455ed2abd
3
+ metadata.gz: c11d202ac7a62f8ee5ae904f0a3c3edfd92d9d04899b747f8369811ca140d6d3
4
+ data.tar.gz: 595afbed12c7c0e2bda951059beac3f904ded148a229b2d1eec84996c5a9c736
5
5
  SHA512:
6
- metadata.gz: c27cf8e95a1793a0c16f5787a9c9fe0063dfdd245e1bb8f162c8195f051f7b3ccbdec407f879e0ff7084c55f7a46ccf8932249255edfa4bb22c30384380cf587
7
- data.tar.gz: e5d15599fb9f691337d053f76d2c74e498744787e98890256fab12bfa4f681105e9ca932397af14cb034b33cd379065a66d0f80f1ce23a4c2d1bc1fe4df63db3
6
+ metadata.gz: c0bb244ff331d3faa4eec0b79b173e8829aead849682ad508bb9c152be677276387db0d602a801f09c7c5237699d00c43ac65021ba2b9f8d8ee0f5c096c9b5d1
7
+ data.tar.gz: 527352b2f4a00c318a39f234182f240b7955018b75882ed084809ef5b3a245b202036d94dad8c210e50512f7a08b6b71fd41faec3fa9f8ee2b7e830ee9a4c265
data/README.md CHANGED
@@ -2,15 +2,18 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/nexmo.svg)](https://badge.fury.io/rb/nexmo) [![Build Status](https://api.travis-ci.org/Nexmo/nexmo-ruby.svg?branch=master)](https://travis-ci.org/Nexmo/nexmo-ruby) [![Coverage Status](https://coveralls.io/repos/github/Nexmo/nexmo-ruby/badge.svg?branch=coveralls)](https://coveralls.io/github/Nexmo/nexmo-ruby?branch=master)
4
4
 
5
+ <img src="https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg" height="48px" alt="Nexmo is now known as Vonage" />
6
+
5
7
  This is the Ruby client library for Nexmo's API. To use it you'll
6
8
  need a Nexmo account. Sign up [for free at nexmo.com][signup].
7
9
 
8
10
  * [Requirements](#requirements)
9
11
  * [Installation](#installation)
10
12
  * [Usage](#usage)
11
- * [Logging](#logging)
12
- * [JWT authentication](#jwt-authentication)
13
- * [Webhook signatures](#webhook-signatures)
13
+ * [Logging](#logging)
14
+ * [Overriding the default hosts](#overriding-the-default-hosts)
15
+ * [JWT authentication](#jwt-authentication)
16
+ * [Webhook signatures](#webhook-signatures)
14
17
  * [Documentation](#documentation)
15
18
  * [License](#license)
16
19
 
@@ -73,6 +76,21 @@ By default the library sets the logger to `Rails.logger` if it is defined.
73
76
  To disable logging set the logger to `nil`.
74
77
 
75
78
 
79
+ ## Overriding the default hosts
80
+
81
+ To override the default hosts that the SDK uses for HTTP requests, you need to
82
+ specify the `api_host`, `rest_host` or both in the client configuration. For example:
83
+
84
+ ```ruby
85
+ client = Nexmo::Client.new(
86
+ api_host: 'api-sg-1.nexmo.com',
87
+ rest_host: 'rest-sg-1.nexmo.com'
88
+ )
89
+ ```
90
+
91
+ By default the hosts are set to `api.nexmo.com` and `rest.nexmo.com`, respectively.
92
+
93
+
76
94
  ## JWT authentication
77
95
 
78
96
  To call newer endpoints that support JWT authentication such as the Voice API you'll
@@ -1,8 +1,9 @@
1
- # typed: false
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
5
  class Account < Namespace
6
+ extend T::Sig
6
7
  include Keys
7
8
 
8
9
  self.host = :rest_host
@@ -13,6 +14,7 @@ module Nexmo
13
14
  #
14
15
  # @see https://developer.nexmo.com/api/developer/account#get-balance
15
16
  #
17
+ sig { returns(Nexmo::Response) }
16
18
  def balance
17
19
  request('/account/get-balance')
18
20
  end
@@ -35,6 +37,7 @@ module Nexmo
35
37
  #
36
38
  # @see https://developer.nexmo.com/api/developer/account#settings
37
39
  #
40
+ sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
38
41
  def update(params)
39
42
  request('/account/settings', params: camelcase(params), type: Post)
40
43
  end
@@ -50,6 +53,7 @@ module Nexmo
50
53
  #
51
54
  # @see https://developer.nexmo.com/api/developer/account#top-up
52
55
  #
56
+ sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
53
57
  def topup(params)
54
58
  request('/account/top-up', params: params, type: Post)
55
59
  end
@@ -1,8 +1,9 @@
1
- # typed: false
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
5
  class Alerts < Namespace
6
+ extend T::Sig
6
7
  self.host = :rest_host
7
8
 
8
9
  # Request the list of phone numbers opted out from your campaign.
@@ -11,6 +12,7 @@ module Nexmo
11
12
  #
12
13
  # @return [Response]
13
14
  #
15
+ sig { returns(Nexmo::Response) }
14
16
  def list
15
17
  request('/sc/us/alert/opt-in/query/json')
16
18
  end
@@ -26,6 +28,7 @@ module Nexmo
26
28
  #
27
29
  # @see https://developer.nexmo.com/api/sms/us-short-codes/alerts/subscription
28
30
  #
31
+ sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
29
32
  def remove(params)
30
33
  request('/sc/us/alert/opt-in/manage/json', params: params, type: Post)
31
34
  end
@@ -61,6 +64,7 @@ module Nexmo
61
64
  #
62
65
  # @see https://developer.nexmo.com/api/sms/us-short-codes/alerts/sending
63
66
  #
67
+ sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
64
68
  def send(params)
65
69
  request('/sc/us/alert/json', params: params, type: Post)
66
70
  end
@@ -32,12 +32,6 @@ module Nexmo
32
32
  @applications ||= Applications.new(config)
33
33
  end
34
34
 
35
- # @return [Calls]
36
- #
37
- def calls
38
- @calls ||= Calls.new(config)
39
- end
40
-
41
35
  # @return [Conversations]
42
36
  #
43
37
  def conversations
@@ -109,5 +103,11 @@ module Nexmo
109
103
  def verify
110
104
  @verify ||= Verify.new(config)
111
105
  end
106
+
107
+ # @return [Voice]
108
+ #
109
+ def voice
110
+ @voice ||= Voice.new(config)
111
+ end
112
112
  end
113
113
  end
@@ -8,9 +8,9 @@ module Nexmo
8
8
  self.api_host = 'api.nexmo.com'
9
9
  self.api_key = ENV['NEXMO_API_KEY']
10
10
  self.api_secret = ENV['NEXMO_API_SECRET']
11
- self.application_id = nil
11
+ self.application_id = ENV['NEXMO_APPLICATION_ID']
12
12
  self.logger = (defined?(Rails.logger) && Rails.logger) || ::Logger.new(nil)
13
- self.private_key = nil
13
+ self.private_key = ENV['NEXMO_PRIVATE_KEY_PATH'] ? File.read(ENV['NEXMO_PRIVATE_KEY_PATH']) : ENV['NEXMO_PRIVATE_KEY']
14
14
  self.rest_host = 'rest.nexmo.com'
15
15
  self.signature_secret = ENV['NEXMO_SIGNATURE_SECRET']
16
16
  self.signature_method = ENV['NEXMO_SIGNATURE_METHOD'] || 'md5hash'
@@ -21,6 +21,8 @@ module Nexmo
21
21
 
22
22
  if hash.key?('error_title')
23
23
  hash['error_title']
24
+ elsif hash.key?('error-code-label')
25
+ hash['error-code-label']
24
26
  elsif hash.key?('description')
25
27
  hash['description']
26
28
  elsif problem_details?(hash)
@@ -46,14 +46,6 @@ module Nexmo
46
46
  @request_headers ||= {}
47
47
  end
48
48
 
49
- def self.response_class
50
- @response_class ||= Response
51
- end
52
-
53
- def self.response_class=(response_class)
54
- @response_class = response_class
55
- end
56
-
57
49
  protected
58
50
 
59
51
  Get = Net::HTTP::Get
@@ -61,7 +53,7 @@ module Nexmo
61
53
  Post = Net::HTTP::Post
62
54
  Delete = Net::HTTP::Delete
63
55
 
64
- def request(path, params: nil, type: Get, response_class: nil, &block)
56
+ def request(path, params: nil, type: Get, response_class: Response, &block)
65
57
  uri = URI('https://' + @host + path)
66
58
 
67
59
  params ||= {}
@@ -97,7 +89,7 @@ module Nexmo
97
89
 
98
90
  logger.debug(response.body) if response.body
99
91
 
100
- parse(response, response_class || self.class.response_class)
92
+ parse(response, response_class)
101
93
  end
102
94
 
103
95
  def parse(response, response_class)
@@ -3,8 +3,6 @@
3
3
 
4
4
  module Nexmo
5
5
  class NumberInsight < Namespace
6
- self.response_class = Response
7
-
8
6
  # Provides basic number insight information about a number.
9
7
  #
10
8
  # @example
@@ -25,7 +23,11 @@ module Nexmo
25
23
  # @see https://developer.nexmo.com/api/number-insight#getNumberInsightBasic
26
24
  #
27
25
  def basic(params)
28
- request('/ni/basic/json', params: params)
26
+ response = request('/ni/basic/json', params: params)
27
+
28
+ raise Error, response[:status_message] unless response.status.zero?
29
+
30
+ response
29
31
  end
30
32
 
31
33
  # Provides standard number insight information about a number.
@@ -53,7 +55,11 @@ module Nexmo
53
55
  # @see https://developer.nexmo.com/api/number-insight#getNumberInsightStandard
54
56
  #
55
57
  def standard(params)
56
- request('/ni/standard/json', params: params)
58
+ response = request('/ni/standard/json', params: params)
59
+
60
+ raise Error, response[:status_message] unless response.status.zero?
61
+
62
+ response
57
63
  end
58
64
 
59
65
  # Provides advanced number insight information about a number synchronously.
@@ -85,7 +91,11 @@ module Nexmo
85
91
  # @see https://developer.nexmo.com/api/number-insight#getNumberInsightAdvanced
86
92
  #
87
93
  def advanced(params)
88
- request('/ni/advanced/json', params: params)
94
+ response = request('/ni/advanced/json', params: params)
95
+
96
+ raise Error, response[:status_message] unless response.status.zero?
97
+
98
+ response
89
99
  end
90
100
 
91
101
  # Provides advanced number insight number information *asynchronously* using the URL specified in the callback parameter.
@@ -120,7 +130,11 @@ module Nexmo
120
130
  # @see https://developer.nexmo.com/api/number-insight#getNumberInsightAsync
121
131
  #
122
132
  def advanced_async(params)
123
- request('/ni/advanced/async/json', params: params)
133
+ response = request('/ni/advanced/async/json', params: params)
134
+
135
+ raise Error, response[:status_message] unless response.status.zero?
136
+
137
+ response
124
138
  end
125
139
  end
126
140
  end
@@ -13,11 +13,7 @@ module Nexmo
13
13
  # @example
14
14
  # response = client.sms.send(from: 'Ruby', to: '447700900000', text: 'Hello world')
15
15
  #
16
- # if response.success?
17
- # puts "Sent message id=#{response.messages.first.message_id}"
18
- # else
19
- # puts "Error: #{response.messages.first.error_text}"
20
- # end
16
+ # puts "Sent message id=#{response.messages.first.message_id}"
21
17
  #
22
18
  # @option params [required, String] :from
23
19
  # The name or number the message should be sent from.
@@ -96,7 +92,7 @@ module Nexmo
96
92
  #
97
93
  # @see https://developer.nexmo.com/api/sms#send-an-sms
98
94
  #
99
- sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::SMS::Response) }
95
+ sig { params(params: T::Hash[Symbol, T.untyped]).returns(Nexmo::Response) }
100
96
  def send(params)
101
97
  if unicode?(params.fetch(:text)) && params[:type] != 'unicode'
102
98
  message = 'Sending unicode text SMS without setting the type parameter to "unicode". ' \
@@ -106,7 +102,13 @@ module Nexmo
106
102
  logger.warn(message)
107
103
  end
108
104
 
109
- request('/sms/json', params: hyphenate(params), type: Post, response_class: Response)
105
+ response = request('/sms/json', params: hyphenate(params), type: Post)
106
+
107
+ unless response.messages.first.status == '0'
108
+ raise Error, response.messages.first[:error_text]
109
+ end
110
+
111
+ response
110
112
  end
111
113
 
112
114
  private
@@ -7,8 +7,6 @@ module Nexmo
7
7
 
8
8
  private :http_request
9
9
 
10
- self.response_class = Response
11
-
12
10
  # Generate and send a PIN to your user.
13
11
  #
14
12
  # @note You can make a maximum of one Verify request per second.
@@ -16,11 +14,7 @@ module Nexmo
16
14
  # @example
17
15
  # response = client.verify.request(number: '447700900000', brand: 'Acme Inc')
18
16
  #
19
- # if response.success?
20
- # puts "Started verification request_id=#{response.request_id}"
21
- # else
22
- # puts "Error: #{response.error_text}"
23
- # end
17
+ # puts "Started verification request_id=#{response.request_id}"
24
18
  #
25
19
  # @option params [required, String] :number
26
20
  # The mobile or landline phone number to verify.
@@ -66,7 +60,11 @@ module Nexmo
66
60
  # @see https://developer.nexmo.com/api/verify#verifyRequest
67
61
  #
68
62
  def request(params)
69
- http_request('/verify/json', params: params, type: Post)
63
+ response = http_request('/verify/json', params: params, type: Post)
64
+
65
+ raise Error, response[:error_text] if error?(response)
66
+
67
+ response
70
68
  end
71
69
 
72
70
  # Confirm that the PIN you received from your user matches the one sent by Nexmo in your verification request.
@@ -74,11 +72,7 @@ module Nexmo
74
72
  # @example
75
73
  # response = client.verify.check(request_id: request_id, code: '1234')
76
74
  #
77
- # if response.success?
78
- # puts "Verification complete, event_id=#{response.event_id}"
79
- # else
80
- # puts "Error: #{response.error_text}"
81
- # end
75
+ # puts "Verification complete, event_id=#{response.event_id}"
82
76
  #
83
77
  # @option params [required, String] :request_id
84
78
  # The Verify request to check.
@@ -98,7 +92,11 @@ module Nexmo
98
92
  # @see https://developer.nexmo.com/api/verify#verifyCheck
99
93
  #
100
94
  def check(params)
101
- http_request('/verify/check/json', params: params, type: Post)
95
+ response = http_request('/verify/check/json', params: params, type: Post)
96
+
97
+ raise Error, response[:error_text] if error?(response)
98
+
99
+ response
102
100
  end
103
101
 
104
102
  # Check the status of past or current verification requests.
@@ -120,7 +118,11 @@ module Nexmo
120
118
  # @see https://developer.nexmo.com/api/verify#verifySearch
121
119
  #
122
120
  def search(params)
123
- http_request('/verify/search/json', params: params)
121
+ response = http_request('/verify/search/json', params: params)
122
+
123
+ raise Error, response[:error_text] if error?(response)
124
+
125
+ response
124
126
  end
125
127
 
126
128
  # Control the progress of your verification requests.
@@ -142,7 +144,11 @@ module Nexmo
142
144
  # @see https://developer.nexmo.com/api/verify#verifyControl
143
145
  #
144
146
  def control(params)
145
- http_request('/verify/control/json', params: params, type: Post)
147
+ response = http_request('/verify/control/json', params: params, type: Post)
148
+
149
+ raise Error, response[:error_text] if error?(response)
150
+
151
+ response
146
152
  end
147
153
 
148
154
  # Cancel an existing verification request.
@@ -174,5 +180,11 @@ module Nexmo
174
180
  def trigger_next_event(id)
175
181
  control(request_id: id, cmd: 'trigger_next_event')
176
182
  end
183
+
184
+ private
185
+
186
+ def error?(response)
187
+ response.respond_to?(:error_text)
188
+ end
177
189
  end
178
190
  end
@@ -1,5 +1,5 @@
1
1
  # typed: strong
2
2
 
3
3
  module Nexmo
4
- VERSION = '6.3.0'
4
+ VERSION = '7.0.0'
5
5
  end
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
- class Calls < Namespace
5
+ class Voice < Namespace
6
6
  self.authentication = BearerToken
7
7
 
8
8
  self.request_body = JSON
@@ -10,7 +10,7 @@ module Nexmo
10
10
  # Create an outbound Call.
11
11
  #
12
12
  # @example
13
- # response = client.calls.create({
13
+ # response = client.voice.create({
14
14
  # to: [{type: 'phone', number: '14843331234'}],
15
15
  # from: {type: 'phone', number: '14843335555'},
16
16
  # answer_url: ['https://example.com/answer']
@@ -61,7 +61,7 @@ module Nexmo
61
61
  # Get details of your calls.
62
62
  #
63
63
  # @example
64
- # response = client.calls.list
64
+ # response = client.voice.list
65
65
  # response.each do |item|
66
66
  # puts "#{item.uuid} #{item.direction} #{item.status}"
67
67
  # end
@@ -100,7 +100,7 @@ module Nexmo
100
100
  # Get detail of a specific call.
101
101
  #
102
102
  # @example
103
- # response = client.calls.get(id)
103
+ # response = client.voice.get(id)
104
104
  #
105
105
  # @param [String] id
106
106
  #
@@ -115,7 +115,7 @@ module Nexmo
115
115
  # Modify an in progress call.
116
116
  #
117
117
  # @example
118
- # response = client.calls.update(id, action: 'hangup')
118
+ # response = client.voice.update(id, action: 'hangup')
119
119
  #
120
120
  # @option params [required, String] :action
121
121
  #
@@ -136,7 +136,7 @@ module Nexmo
136
136
  # Hangup an in progress call.
137
137
  #
138
138
  # @example
139
- # response = client.calls.hangup(id)
139
+ # response = client.voice.hangup(id)
140
140
  #
141
141
  # @param [String] id
142
142
  #
@@ -151,7 +151,7 @@ module Nexmo
151
151
  # Mute an in progress call.
152
152
  #
153
153
  # @example
154
- # response = client.calls.mute(id)
154
+ # response = client.voice.mute(id)
155
155
  #
156
156
  # @param [String] id
157
157
  #
@@ -166,7 +166,7 @@ module Nexmo
166
166
  # Unmute an in progress call.
167
167
  #
168
168
  # @example
169
- # response = client.calls.unmute(id)
169
+ # response = client.voice.unmute(id)
170
170
  #
171
171
  # @param [String] id
172
172
  #
@@ -181,7 +181,7 @@ module Nexmo
181
181
  # Earmuff an in progress call.
182
182
  #
183
183
  # @example
184
- # response = client.calls.earmuff(id)
184
+ # response = client.voice.earmuff(id)
185
185
  #
186
186
  # @param [String] id
187
187
  #
@@ -196,7 +196,7 @@ module Nexmo
196
196
  # Unearmuff an in progress call.
197
197
  #
198
198
  # @example
199
- # response = client.calls.unearmuff(id)
199
+ # response = client.voice.unearmuff(id)
200
200
  #
201
201
  # @param [String] id
202
202
  #
@@ -216,7 +216,7 @@ module Nexmo
216
216
  # url: ['https://example.com/ncco.json']
217
217
  # }
218
218
  #
219
- # response = client.calls.transfer(id, destination: destination)
219
+ # response = client.voice.transfer(id, destination: destination)
220
220
  #
221
221
  # @param [String] id
222
222
  # @param [Hash] destination
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
- class Calls::DTMF < Namespace
5
+ class Voice::DTMF < Namespace
6
6
  self.authentication = BearerToken
7
7
 
8
8
  self.request_body = JSON
@@ -1,6 +1,6 @@
1
1
  # typed: ignore
2
2
 
3
- class Nexmo::Calls::ListResponse < Nexmo::Response
3
+ class Nexmo::Voice::ListResponse < Nexmo::Response
4
4
  include Enumerable
5
5
 
6
6
  def each
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
- class Calls::Stream < Namespace
5
+ class Voice::Stream < Namespace
6
6
  self.authentication = BearerToken
7
7
 
8
8
  self.request_body = JSON
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Nexmo
5
- class Calls::Talk < Namespace
5
+ class Voice::Talk < Namespace
6
6
  self.authentication = BearerToken
7
7
 
8
8
  self.request_body = JSON
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexmo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-24 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -76,11 +76,6 @@ files:
76
76
  - lib/nexmo/authentication_error.rb
77
77
  - lib/nexmo/basic.rb
78
78
  - lib/nexmo/bearer_token.rb
79
- - lib/nexmo/calls.rb
80
- - lib/nexmo/calls/dtmf.rb
81
- - lib/nexmo/calls/list_response.rb
82
- - lib/nexmo/calls/stream.rb
83
- - lib/nexmo/calls/talk.rb
84
79
  - lib/nexmo/client.rb
85
80
  - lib/nexmo/client_error.rb
86
81
  - lib/nexmo/config.rb
@@ -105,7 +100,6 @@ files:
105
100
  - lib/nexmo/messages.rb
106
101
  - lib/nexmo/namespace.rb
107
102
  - lib/nexmo/number_insight.rb
108
- - lib/nexmo/number_insight/response.rb
109
103
  - lib/nexmo/numbers.rb
110
104
  - lib/nexmo/numbers/list_response.rb
111
105
  - lib/nexmo/numbers/response.rb
@@ -119,12 +113,15 @@ files:
119
113
  - lib/nexmo/server_error.rb
120
114
  - lib/nexmo/signature.rb
121
115
  - lib/nexmo/sms.rb
122
- - lib/nexmo/sms/response.rb
123
116
  - lib/nexmo/tfa.rb
124
117
  - lib/nexmo/user_agent.rb
125
118
  - lib/nexmo/verify.rb
126
- - lib/nexmo/verify/response.rb
127
119
  - lib/nexmo/version.rb
120
+ - lib/nexmo/voice.rb
121
+ - lib/nexmo/voice/dtmf.rb
122
+ - lib/nexmo/voice/list_response.rb
123
+ - lib/nexmo/voice/stream.rb
124
+ - lib/nexmo/voice/talk.rb
128
125
  - nexmo.gemspec
129
126
  homepage: https://github.com/Nexmo/nexmo-ruby
130
127
  licenses:
@@ -150,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
147
  - !ruby/object:Gem::Version
151
148
  version: '0'
152
149
  requirements: []
153
- rubygems_version: 3.1.2
150
+ rubygems_version: 3.0.0
154
151
  signing_key:
155
152
  specification_version: 4
156
153
  summary: This is the Ruby client library for Nexmo's API. To use it you'll need a
@@ -1,7 +0,0 @@
1
- # typed: false
2
-
3
- class Nexmo::NumberInsight::Response < Nexmo::Response
4
- def success?
5
- status.zero?
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- # typed: false
2
- # frozen_string_literal: true
3
-
4
- class Nexmo::SMS::Response < Nexmo::Response
5
- def success?
6
- messages.all? { |item| item.status == '0' }
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- # typed: false
2
-
3
- class Nexmo::Verify::Response < Nexmo::Response
4
- def success?
5
- respond_to?(:status) && !respond_to?(:error_text)
6
- end
7
- end