nylas 5.10.0 → 5.11.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: 8dfc25b74725b0ba024320c432c69a1318f4b5524f550323d493b59aeb70e181
4
- data.tar.gz: 0a50c968682d1b718aecdf7aaacfd32ea324e8d89c8db2c1f9369142189cf350
3
+ metadata.gz: 5f59eea98b61cf99f73b87277cf360310f9fa8584a4164297d58faa2ef2575cd
4
+ data.tar.gz: 1afd54d9481f76af4330d8e12a2f90b8fe667628247e455453211425b198f470
5
5
  SHA512:
6
- metadata.gz: 439de1cc121378d1438047d4e2399faa5cd3ec3efcf5647a1dbefa4b858191c83bc0d4bcfb58d3795be30cf9627feaa17828b33ed916bb2a310778cbd64c6e91
7
- data.tar.gz: 0a5a619c18eadad1a5a81fa85e528303e172bef906746cbde9bd2baba5647213e2ff0e7f5cab634bdfc9adf9dc8489b18e159618348973df452d2a50aa6295f2
6
+ metadata.gz: ebf09713be0037d694e9d43c3aa5b3c3c4a5557296593773bbd792f21f281662ef96fb2079ca34d1325a0c43b4810f0805a80e963de29eef0b0762b805a74581
7
+ data.tar.gz: cb2c8c558dd67b36aa446d7b92a91902978b0e41af1f1a24e3629c833817ad3038fa71f2c1c42f0e79f3ab32c8bb02f836fc10f1481eaf0fb9f78ed021fbb44e
data/lib/nylas/event.rb CHANGED
@@ -34,6 +34,8 @@ module Nylas
34
34
  has_n_of_attribute :notifications, :event_notification
35
35
  has_n_of_attribute :round_robin_order, :string
36
36
  attribute :original_start_time, :unix_timestamp
37
+ attribute :reminder_minutes, :string
38
+ attribute :reminder_method, :string
37
39
  attribute :job_status_id, :string, read_only: true
38
40
 
39
41
  attr_accessor :notify_participants
@@ -48,6 +50,7 @@ module Nylas
48
50
 
49
51
  def save
50
52
  validate
53
+ format_reminder_minutes
51
54
 
52
55
  super
53
56
  end
@@ -111,6 +114,13 @@ module Nylas
111
114
  payload
112
115
  end
113
116
 
117
+ # Formats the reminder minute field to match the API format: "[%d]"
118
+ def format_reminder_minutes
119
+ return if reminder_minutes.nil? || reminder_minutes.empty? || reminder_minutes.match(/\[\d+\]/)
120
+
121
+ self.reminder_minutes = "[#{reminder_minutes}]"
122
+ end
123
+
114
124
  def query_params
115
125
  if notify_participants.nil?
116
126
  {}
@@ -5,7 +5,7 @@ module Nylas
5
5
  require "base64"
6
6
 
7
7
  # Plain HTTP client that can be used to interact with the Nylas API sans any type casting.
8
- class HttpClient # rubocop:disable Metrics/ClassLength
8
+ class HttpClient
9
9
  module AuthMethod
10
10
  BEARER = 1
11
11
  BASIC = 2
@@ -16,6 +16,7 @@ module Nylas
16
16
  attribute :status, :string, read_only: true
17
17
  attribute :created_at, :unix_timestamp, read_only: true
18
18
  attribute :reason, :string, read_only: true
19
+ attribute :metadata, :hash, read_only: true
19
20
 
20
21
  # Returns the status of a job as a boolean
21
22
  # @return [Boolean] If the job was successful
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.10.0"
4
+ VERSION = "5.11.0"
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.10.0
4
+ version: 5.11.0
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-05-10 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -380,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
380
  - !ruby/object:Gem::Version
381
381
  version: '0'
382
382
  requirements: []
383
- rubygems_version: 3.3.3
383
+ rubygems_version: 3.3.11
384
384
  signing_key:
385
385
  specification_version: 4
386
386
  summary: Gem for interacting with the Nylas API