nylas 5.9.0 → 5.9.1

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: b390b7c22a3dfcc7a4eed1db3966295d71a5f8928efd4b81bedbabd0c7bac0dc
4
- data.tar.gz: d27e92177ddf12626917c2b20334bc74bcc703f04d5d68721375429aa4ce06fe
3
+ metadata.gz: c62ff2cfcd6e73840a14c281b0d46da494dcea2d49f42da51eb94a30080307e8
4
+ data.tar.gz: 957a04e0146a2cea58a2fe064d11814462a7aae36c88fee38d2c4b71ad5c3d97
5
5
  SHA512:
6
- metadata.gz: c0d5c385aa98002eceed26178f6d63e60950344fd48cd229c2c32fd4b3998c837db894ca2fd883da8886f4dd91ee8fef01b07885f7e3941ef5b17d8bb4c2afe6
7
- data.tar.gz: 86d6663b12da809962c28d6284ee5a22c90951ac9055bbadce90a347a55061ac1c67ff1feeb7e22b711d2311f24df2d0928e858be3ca03074e9e109022199b62
6
+ metadata.gz: 8316f1b5ebb2470a0154c1a8c33bfcd23ede0318555546e8fcf3f23b19fb5a84f052621d1150b38d10893db07c98c71a6ba997487b8bae9a1562d58dd95f1f25
7
+ data.tar.gz: da299c0110d2755b5514dc6e604b6ad3ecf3fecffca0998fc61ab417ffb096f52c775a360728724487688cada34c3bef4f7285cc1d9e09633b278a2dc91ab4dc
@@ -26,8 +26,14 @@ module Nylas
26
26
 
27
27
  attribute :tracking, :message_tracking
28
28
 
29
+ # Sends the new message
30
+ # @return [Message] The sent message
31
+ # @raise [RuntimeError] if the API response data was not a hash
29
32
  def send!
30
- Message.new(**api.execute(method: :post, path: "/send", payload: to_json).merge(api: api))
33
+ message_data = api.execute(method: :post, path: "/send", payload: to_json)
34
+ raise "Unexpected response from the server, data received not a Message" unless message_data.is_a?(Hash)
35
+
36
+ Message.from_hash(message_data, api: api)
31
37
  end
32
38
  end
33
39
  end
@@ -6,6 +6,7 @@ module Nylas
6
6
  include Model::Attributable
7
7
  attribute :name, :string
8
8
  attribute :email, :string
9
+ attribute :phone_number, :string
9
10
  attribute :comment, :string
10
11
  attribute :status, :string, read_only: true
11
12
  end
data/lib/nylas/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nylas
4
- VERSION = "5.9.0"
4
+ VERSION = "5.9.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nylas
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.0
4
+ version: 5.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nylas, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-07 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler