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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fde70fc0a75d2f007d9c317974f657973264297eab5ff2f0b2a0f959e30d2d2
4
- data.tar.gz: cb9bad90faa280eeea6a127fc8885bb63bf3eeb6dd607eb3483f27be3469ff3c
3
+ metadata.gz: 9dc78fcfe4e496c197244a6e62ad347bc439c52334d69a453f25977f7981c23b
4
+ data.tar.gz: 6cef4d63e95ddd4455dd4a003b60bdfc3dfb1b10cfc1049cee9aecc7d8d5fb41
5
5
  SHA512:
6
- metadata.gz: 1ede3f901990e717e00ce5765d9df78edf7797663f2211da70a4ae37d0c1a7b339a6d0f91b6f462563bf2c4ded69f227987da630e5d4dcb2c87b9017790a0e70
7
- data.tar.gz: 29866e1b73c36d108604860a13d1434f2cf85b0905ef21d485e5114c8dd6bb8b4aa640bb1ceba0c472691e5225c4904cde9b312ef7427d0a107b59b5c4bbe2ed
6
+ metadata.gz: f235d92c2c49b14c7529c3aa2ad5e8fb6e03adf66a74f4d55229b1b262c66d8beca1a9137ff1d24da439a8d9051915765c7371e17fc1eae63bc0e56e8b96f715
7
+ data.tar.gz: 4b264d192ab011f784aedd9f336e750a1d20b9413d6cb9fd2e67d37cef6b36f7ceed25b80d6dbb74e90b4ffb452f90939b3343a732d2043138071a2b15f6260e
@@ -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
- Verify.new(request(:delete, "verify/#{id}"))
232
+ request(:delete, "verify/#{id}")
227
233
  end
228
234
 
229
235
  # Retrieve the information of specific message.
@@ -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, :recipient, :reference, :status, :href
10
- attr_reader :created_datetime, :valid_until_date_time
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 valid_until_date_time=(value)
17
- @valid_until_date_time = value_to_time(value)
21
+ def valid_until_datetime=(value)
22
+ @valid_until_datetime = value_to_time(value)
18
23
  end
19
24
  end
20
25
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'messagebird/base'
4
+
5
+ module MessageBird
6
+ class VerifyEmailMessage < MessageBird::Base
7
+ attr_accessor :id, :status
8
+ end
9
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MessageBird
4
4
  module Version
5
- STRING = '2.0.1'
5
+ STRING = '3.0.0'
6
6
  end
7
7
  end
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: 2.0.1
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-09 00:00:00.000000000 Z
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: 1.9.3
116
+ version: '2.0'
116
117
  required_rubygems_version: !ruby/object:Gem::Requirement
117
118
  requirements:
118
119
  - - ">="