messagebird-rest 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messagebird/client.rb +9 -3
- data/lib/messagebird/verify.rb +10 -5
- data/lib/messagebird/verify_email_message.rb +9 -0
- data/lib/messagebird/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dc78fcfe4e496c197244a6e62ad347bc439c52334d69a453f25977f7981c23b
|
4
|
+
data.tar.gz: 6cef4d63e95ddd4455dd4a003b60bdfc3dfb1b10cfc1049cee9aecc7d8d5fb41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f235d92c2c49b14c7529c3aa2ad5e8fb6e03adf66a74f4d55229b1b262c66d8beca1a9137ff1d24da439a8d9051915765c7371e17fc1eae63bc0e56e8b96f715
|
7
|
+
data.tar.gz: 4b264d192ab011f784aedd9f336e750a1d20b9413d6cb9fd2e67d37cef6b36f7ceed25b80d6dbb74e90b4ffb452f90939b3343a732d2043138071a2b15f6260e
|
data/lib/messagebird/client.rb
CHANGED
@@ -20,6 +20,7 @@ require 'messagebird/message'
|
|
20
20
|
require 'messagebird/number'
|
21
21
|
require 'messagebird/number_client'
|
22
22
|
require 'messagebird/verify'
|
23
|
+
require 'messagebird/verify_email_message'
|
23
24
|
require 'messagebird/voice/client'
|
24
25
|
require 'messagebird/voice/list'
|
25
26
|
require 'messagebird/voice/webhook'
|
@@ -77,7 +78,7 @@ module MessageBird
|
|
77
78
|
|
78
79
|
def request(method, path, params = {})
|
79
80
|
response_body = @http_client.request(method, path, params)
|
80
|
-
return if response_body.empty?
|
81
|
+
return if response_body.nil? || response_body.empty?
|
81
82
|
|
82
83
|
parse_body(response_body)
|
83
84
|
end
|
@@ -207,6 +208,11 @@ module MessageBird
|
|
207
208
|
Verify.new(request(:get, "verify/#{id}"))
|
208
209
|
end
|
209
210
|
|
211
|
+
# Retrieve the information of specific Verify email message
|
212
|
+
def verify_email_message(id)
|
213
|
+
VerifyEmailMessage.new(request(:get, "verify/messages/email/#{id}"))
|
214
|
+
end
|
215
|
+
|
210
216
|
# Generate a new One-Time-Password message.
|
211
217
|
def verify_create(recipient, params = {})
|
212
218
|
Verify.new(request(
|
@@ -221,9 +227,9 @@ module MessageBird
|
|
221
227
|
Verify.new(request(:get, "verify/#{id}?token=#{token}"))
|
222
228
|
end
|
223
229
|
|
224
|
-
# Delete a Verify
|
230
|
+
# Delete a Verify, response is empty
|
225
231
|
def verify_delete(id)
|
226
|
-
|
232
|
+
request(:delete, "verify/#{id}")
|
227
233
|
end
|
228
234
|
|
229
235
|
# Retrieve the information of specific message.
|
data/lib/messagebird/verify.rb
CHANGED
@@ -1,20 +1,25 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'time'
|
4
|
-
|
5
4
|
require 'messagebird/base'
|
6
5
|
|
7
6
|
module MessageBird
|
8
7
|
class Verify < MessageBird::Base
|
9
|
-
attr_accessor :id,
|
10
|
-
|
8
|
+
attr_accessor :id,
|
9
|
+
:href,
|
10
|
+
:recipient,
|
11
|
+
:reference,
|
12
|
+
:messages,
|
13
|
+
:status
|
14
|
+
attr_reader :created_datetime,
|
15
|
+
:valid_until_datetime
|
11
16
|
|
12
17
|
def created_datetime=(value)
|
13
18
|
@created_datetime = value_to_time(value)
|
14
19
|
end
|
15
20
|
|
16
|
-
def
|
17
|
-
@
|
21
|
+
def valid_until_datetime=(value)
|
22
|
+
@valid_until_datetime = value_to_time(value)
|
18
23
|
end
|
19
24
|
end
|
20
25
|
end
|
data/lib/messagebird/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messagebird-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maurice Nonnekes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/messagebird/recipient.rb
|
90
90
|
- lib/messagebird/signed_request.rb
|
91
91
|
- lib/messagebird/verify.rb
|
92
|
+
- lib/messagebird/verify_email_message.rb
|
92
93
|
- lib/messagebird/version.rb
|
93
94
|
- lib/messagebird/voice/base.rb
|
94
95
|
- lib/messagebird/voice/call.rb
|
@@ -112,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
113
|
requirements:
|
113
114
|
- - ">="
|
114
115
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
116
|
+
version: '2.0'
|
116
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
118
|
requirements:
|
118
119
|
- - ">="
|