nylas 4.6.0 → 4.6.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: 46e28cb5adc245b84ca2b193137308a2d0d95b45ec76938b8ce8bc50ad43e39e
4
- data.tar.gz: 7b518a3084cacc0416ccfe7124d5580f092e63d9589c62d693a4c889618155ec
3
+ metadata.gz: 70ffcaf730f5d3ee22c56de4a93675f0d2a180515226be18efcb4f772450a2ec
4
+ data.tar.gz: de98665b0ca9f325ba70d7bc7c6336a5ff5cc6e71b6d95e36f13f78ec2fc4b1e
5
5
  SHA512:
6
- metadata.gz: 77debca7d2c13b8da3f64266843d834a1e49b2cbb982a5176e6fd084eb472c5b7a6ba9e865266092c1e4240eedcc7f9db3eb959f114b7f33c1bef0d4f888cf09
7
- data.tar.gz: be398a3b5ca813fc91f9bd44abba42d1a6c36f20397646529b97829e1b752f1b4b45f56c223ce1a72fedeed1b0c566b92b3148db517332344d93bd08bd9bf43c
6
+ metadata.gz: c894b283e65168725049ab8f08e130d19d94e953969575487dcefe0c43f0e89d1c00249122d47ea917b7f1fada1080c133be1c02293b6b8195f9789c3789770e
7
+ data.tar.gz: 724bc969684a5e113903f31c4ef32263bd16e49b359bd3aa349660199a19570c3f62ce47ae99732978ddb95d6eb0a25552de5ec221b434a319ef47a7cb4a7774
@@ -36,6 +36,18 @@ module Nylas
36
36
  )
37
37
  end
38
38
 
39
+ def exchange_code_for_token(code)
40
+ data = {
41
+ "client_id" => app_id,
42
+ "client_secret" => client.app_secret,
43
+ "grant_type" => "authorization_code",
44
+ "code" => code
45
+ }
46
+
47
+ response_json = execute(method: :post, path: "/oauth/token", payload: data)
48
+ response_json[:access_token]
49
+ end
50
+
39
51
  # @return [Collection<Contact>] A queryable collection of Contacts
40
52
  def contacts
41
53
  @contacts ||= Collection.new(model: Contact, api: self)
@@ -29,7 +29,6 @@ module Nylas
29
29
  attribute :manager_name, :string
30
30
  attribute :office_location, :string
31
31
  attribute :notes, :string
32
- attribute :web_page, :web_page
33
32
  attribute :source, :string
34
33
 
35
34
  has_n_of_attribute :groups, :contact_group
@@ -15,6 +15,7 @@ module Nylas
15
15
  attribute :calendar_id, :string
16
16
  attribute :master_event_id, :string
17
17
  attribute :message_id, :string
18
+ attribute :ical_uid, :string
18
19
 
19
20
  attribute :busy, :boolean
20
21
  attribute :description, :string
@@ -59,6 +59,10 @@ module Nylas
59
59
  super(payload)
60
60
  end
61
61
 
62
+ def update_folder(folder_id)
63
+ update(folder_id: folder_id)
64
+ end
65
+
62
66
  def expanded
63
67
  return self unless headers.nil?
64
68
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Nylas
4
4
  module Model
5
- # Allows defining of tyypecastable attributes on a model
5
+ # Allows defining of typecastable attributes on a model
6
6
  module Attributable
7
7
  def self.included(model)
8
8
  model.extend(ClassMethods)
@@ -45,6 +45,10 @@ module Nylas
45
45
  super(data)
46
46
  end
47
47
 
48
+ def update_folder(folder_id)
49
+ update(folder_id: folder_id)
50
+ end
51
+
48
52
  def starred?
49
53
  starred
50
54
  end
@@ -86,6 +86,7 @@ module Nylas
86
86
  end
87
87
 
88
88
  def serialize(object)
89
+ return nil if object.nil?
89
90
  object.to_i
90
91
  end
91
92
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nylas
4
- VERSION = "4.6.0"
4
+ VERSION = "4.6.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: 4.6.0
4
+ version: 4.6.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: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -336,7 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
336
  - !ruby/object:Gem::Version
337
337
  version: '0'
338
338
  requirements: []
339
- rubygems_version: 3.0.3
339
+ rubyforge_project:
340
+ rubygems_version: 2.7.6.2
340
341
  signing_key:
341
342
  specification_version: 4
342
343
  summary: Gem for interacting with the Nylas API