calendly 0.8.0 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e6b1e9a3e025d825c0fea46f89e00bff03a5ff64e075fae3794022aad9d6271
4
- data.tar.gz: efb1c10ff8a3e73f4799193a6225c31bfa74d200969699c305cb7aa815c09890
3
+ metadata.gz: 706fe58387318797ed3fed0c46c629a52eaa9b3ef2b22ed160bbbb203e8b7ad8
4
+ data.tar.gz: 1329d04a6eeeb29da76a83b0b36e716368df61766055ea11684552d337526617
5
5
  SHA512:
6
- metadata.gz: 6543fec0b13503100c112334d7fe2a32b9bfd69b263064334c52a7ac622ec6f16c0345b222b8d5e94e12912fbbbd841ea26328a5ccd36bdc27b8eb2103a1da0d
7
- data.tar.gz: c86ce5d7a1e7ccf1f60dd3a210aea4435e19910592ca75c7e7da5c357fbd7ab8aaec9e05f3a132c3b89bd9f481c560ec090151e719d21fe72a997b9e6855ef3c
6
+ metadata.gz: 6b14cc3eb57722550794456b53405bdad576b426218beca539b8c92949e060ec75c9374d17b5fa3aea2835d863c57483bcf0a51bbe9c931ed35b1c61e259c709
7
+ data.tar.gz: 9a526d1719c5eca1f8bf43823b95e22307f650e5b5a833cf93caffb40c1d2b7094f9c9e452dc3e0dc3164e2fba645b4489027d5f6a0b20a52bc01af7c9541af7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 0.8.0
3
+ ## 0.8.3 - 2022-03-08
4
+
5
+ - support for filtering Event Types by 'active' or 'inactive' status. (#43)
6
+
7
+ ## 0.8.2 - 2022-02-26
8
+
9
+ - support cancellation field in the response of scheduled event endpoints. (#41)
10
+
11
+ ## 0.8.1 - 2021-10-20
12
+
13
+ - support new UUID format like 'bbc4f475-6125-435a-b713-2d1634651e10'. (#38, thanks to jameswilliamiii)
14
+
15
+ ## 0.8.0 - 2021-06-03
4
16
 
5
17
  - used keyword arguments for optional parameters, to be friendly for programmer.
6
18
  - changed methods are followings:
@@ -41,12 +53,12 @@
41
53
  - webhooks
42
54
  - webhooks!
43
55
 
44
- ## 0.7.0
56
+ ## 0.7.0 - 2021-06-03
45
57
 
46
- - supported a signing key parameter when creating webhooks. (#33)
58
+ - supported a signing key parameter when creating webhooks. (#33, thanks to ismael-texidor)
47
59
  - changed `user_uri` argument to keyword argument on Client#create_webhook.
48
60
 
49
- ## 0.6.0
61
+ ## 0.6.0 - 2021-05-30
50
62
 
51
63
  - supported new features until April 2021. (#29)
52
64
  - Client
@@ -84,16 +96,16 @@
84
96
  - fixed debug log encoding error. (#30)
85
97
  - improved inspect method to be more readable in CLI.
86
98
 
87
- ## 0.5.2
99
+ ## 0.5.2 - 2020-12-13
88
100
 
89
101
  - started to support a API
90
102
  - `POST /scheduling_links`
91
103
 
92
- ## 0.5.1
104
+ ## 0.5.1 - 2020-12-13
93
105
 
94
106
  - added method EventType#fetch
95
107
 
96
- ## 0.5.0
108
+ ## 0.5.0 - 2020-12-13
97
109
 
98
110
  - changed Calendly::Client#scheduled_events behavior (refs #21)
99
111
  - previous version:
@@ -102,7 +114,7 @@
102
114
  - getting all events belonging to a specific ORGANIZATION
103
115
  - added Calendly::Client#scheduled_events_by_user method instead_of the before behavior
104
116
 
105
- ## 0.4.2
117
+ ## 0.4.2 - 2020-11-26
106
118
 
107
119
  - added new following fields to Invitee model (refs #21)
108
120
  - :rescheduled
@@ -111,24 +123,24 @@
111
123
  - :cancel_url
112
124
  - :reschedule_url
113
125
 
114
- ## 0.4.1
126
+ ## 0.4.1 - 2020-11-22
115
127
 
116
128
  - started to support a API
117
129
  - `GET /event_types/{uuid}`
118
130
 
119
- ## 0.4.0
131
+ ## 0.4.0 - 2020-11-21
120
132
 
121
133
  - fixed a changes for Location fields such as `kind` to `type`. (refs #18)
122
134
 
123
- ## 0.3.0
135
+ ## 0.3.0 - 2020-11-18
124
136
 
125
137
  - removed zeitwerk dependency. (refs #16)
126
138
 
127
- ## 0.2.0
139
+ ## 0.2.0 - 2020-09-18
128
140
 
129
141
  - added caching features in object when fetching data. (refs #14)
130
142
 
131
- ## 0.1.3
143
+ ## 0.1.3 - 2020-09-17
132
144
 
133
145
  - support webhook APIs (refs #9)
134
146
  - `GET /webhook_subscriptions`
@@ -136,34 +148,34 @@
136
148
  - `POST /webhook_subscriptions`
137
149
  - `DELETE /webhook_subscriptions/{webhook_uuid}`
138
150
 
139
- ## 0.1.2
151
+ ## 0.1.2 - 2020-09-03
140
152
 
141
153
  - fixed rubocop warnings.
142
154
 
143
- ## 0.1.1
155
+ ## 0.1.1 - 2020-08-27
144
156
 
145
157
  - added tests to make coverage 100%.
146
158
 
147
- ## 0.1.0
159
+ ## 0.1.0 - 2020-08-25
148
160
 
149
161
  - defined methods to access associated resources with each model.
150
162
  - renamed methods:
151
163
  - `Calendly::Client#events` to `Calendly::Client#scheduled_events`
152
164
 
153
- ## 0.0.7.alpha
165
+ ## 0.0.7.alpha - 2020-08-23
154
166
 
155
167
  - started to support APIs
156
168
  - `POST /organizations/{uuid}/invitations`
157
169
  - `DELETE /organizations/{org_uuid}/invitations/{invitation_uuid}`
158
170
  - `DELETE /organization_memberships/{uuid}`
159
171
 
160
- ## 0.0.6.alpha
172
+ ## 0.0.6.alpha - 2020-08-22
161
173
 
162
174
  - started to support APIs
163
175
  - `GET /organizations/{uuid}/invitations`
164
176
  - `GET /organizations/{organization_uuid}/invitations/{invitation_uuid}`
165
177
 
166
- ## 0.0.5.alpha
178
+ ## 0.0.5.alpha - 2020-08-22
167
179
 
168
180
  - started to support APIs
169
181
  - `GET /organization_memberships`
@@ -172,24 +184,24 @@
172
184
  - Invitee#event to Invitee#event_uri
173
185
  - Event#event_type to Event#event_type_uri
174
186
 
175
- ## 0.0.4.alpha
187
+ ## 0.0.4.alpha - 2020-08-22
176
188
 
177
189
  - started to support APIs
178
190
  - `GET /scheduled_events/{event_uuid}/invitees`
179
191
  - `GET /scheduled_events/{event_uuid}/invitees/{invitee_uuid}`
180
192
 
181
- ## 0.0.3.alpha
193
+ ## 0.0.3.alpha - 2020-08-19
182
194
 
183
195
  - started to support APIs
184
196
  - `GET /scheduled_events`
185
197
  - `GET /scheduled_events/{uuid}`
186
198
 
187
- ## 0.0.2.alpha
199
+ ## 0.0.2.alpha - 2020-08-12
188
200
 
189
201
  - started to support APIs
190
202
  - `GET /event_types`
191
203
 
192
- ## 0.0.1.alpha
204
+ ## 0.0.1.alpha - 2020-08-09
193
205
 
194
206
  - Initial release
195
207
  - started to support a API
@@ -107,6 +107,7 @@ module Calendly
107
107
  #
108
108
  # @param [String] org_uri the specified organization (organization's uri).
109
109
  # @param [Hash] options the optional request parameters. Optional.
110
+ # @option options [Boolean] :active Return only active event types if true, only inactive if false, or all event types if this parameter is omitted.
110
111
  # @option options [Integer] :count Number of rows to return.
111
112
  # @option options [String] :page_token Pass this to get the next portion of collection.
112
113
  # @option options [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
@@ -119,7 +120,7 @@ module Calendly
119
120
  def event_types(org_uri, options: nil)
120
121
  check_not_empty org_uri, 'org_uri'
121
122
 
122
- opts_keys = %i[count page_token sort]
123
+ opts_keys = %i[active count page_token sort]
123
124
  params = {organization: org_uri}
124
125
  params = merge_options options, opts_keys, params
125
126
  body = request :get, 'event_types', params: params
@@ -134,6 +135,7 @@ module Calendly
134
135
  #
135
136
  # @param [String] user_uri the specified user (user's uri).
136
137
  # @param [Hash] options the optional request parameters. Optional.
138
+ # @option options [Boolean] :active Return only active event types if true, only inactive if false, or all event types if this parameter is omitted.
137
139
  # @option options [Integer] :count Number of rows to return.
138
140
  # @option options [String] :page_token Pass this to get the next portion of collection.
139
141
  # @option options [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
@@ -146,7 +148,7 @@ module Calendly
146
148
  def event_types_by_user(user_uri, options: nil)
147
149
  check_not_empty user_uri, 'user_uri'
148
150
 
149
- opts_keys = %i[count page_token sort]
151
+ opts_keys = %i[active count page_token sort]
150
152
  params = {user: user_uri}
151
153
  params = merge_options options, opts_keys, params
152
154
  body = request :get, 'event_types', params: params
@@ -4,6 +4,7 @@ require 'calendly/client'
4
4
  require 'calendly/models/model_utils'
5
5
  require 'calendly/models/event_type'
6
6
  require 'calendly/models/guest'
7
+ require 'calendly/models/invitee_cancellation'
7
8
  require 'calendly/models/invitees_counter'
8
9
  require 'calendly/models/location'
9
10
 
@@ -12,11 +13,12 @@ module Calendly
12
13
  # A meeting that has been scheduled.
13
14
  class Event
14
15
  include ModelUtils
15
- UUID_RE = %r{\A#{Client::API_HOST}/scheduled_events/(\w+)\z}.freeze
16
+ UUID_RE = %r{\A#{Client::API_HOST}/scheduled_events/(#{UUID_FORMAT})\z}.freeze
16
17
  TIME_FIELDS = %i[start_time end_time created_at updated_at].freeze
17
18
  ASSOCIATION = {
18
19
  event_type: EventType,
19
20
  event_guests: Guest,
21
+ cancellation: InviteeCancellation,
20
22
  invitees_counter: InviteesCounter,
21
23
  location: Location
22
24
  }.freeze
@@ -57,14 +59,18 @@ module Calendly
57
59
  # Reference to Event Type associated with this event.
58
60
  attr_accessor :event_type
59
61
 
60
- # @return [Calendly::Location]
61
- # location in this event.
62
- attr_accessor :location
62
+ # @return [InviteeCancellation]
63
+ # Provides data pertaining to the cancellation of the Invitee.
64
+ attr_accessor :cancellation
63
65
 
64
66
  # @return [InviteesCounter]
65
67
  # invitees counter.
66
68
  attr_accessor :invitees_counter
67
69
 
70
+ # @return [Calendly::Location]
71
+ # location in this event.
72
+ attr_accessor :location
73
+
68
74
  # @return [Array<User>]
69
75
  # Event membership list.
70
76
  attr_accessor :event_memberships
@@ -10,7 +10,7 @@ module Calendly
10
10
  # A configuration for a schedulable event.
11
11
  class EventType
12
12
  include ModelUtils
13
- UUID_RE = %r{\A#{Client::API_HOST}/event_types/(\w+)\z}.freeze
13
+ UUID_RE = %r{\A#{Client::API_HOST}/event_types/(#{UUID_FORMAT})\z}.freeze
14
14
  TIME_FIELDS = %i[created_at updated_at].freeze
15
15
  ASSOCIATION = {profile: EventTypeProfile, custom_questions: EventTypeCustomQuestion}.freeze
16
16
 
@@ -13,7 +13,7 @@ module Calendly
13
13
  # An individual who has been invited to meet with a Calendly member.
14
14
  class Invitee
15
15
  include ModelUtils
16
- UUID_RE = %r{\A#{Client::API_HOST}/scheduled_events/\w+/invitees/(\w+)\z}.freeze
16
+ UUID_RE = %r{\A#{Client::API_HOST}/scheduled_events/#{UUID_FORMAT}/invitees/(#{UUID_FORMAT})\z}.freeze
17
17
  TIME_FIELDS = %i[created_at updated_at].freeze
18
18
  ASSOCIATION = {
19
19
  event: Event,
@@ -13,5 +13,8 @@ module Calendly
13
13
 
14
14
  # @return [String] Reason that the cancellation occurred.
15
15
  attr_accessor :reason
16
+
17
+ # @return [String] Allowed values: host or invitee.
18
+ attr_accessor :canceler_type
16
19
  end
17
20
  end
@@ -6,6 +6,10 @@ require 'calendly/error'
6
6
  module Calendly
7
7
  # Calendly model utility.
8
8
  module ModelUtils
9
+ # UUID's format is ASCII.
10
+ # refs to official release note of October 2021.
11
+ UUID_FORMAT = '[[:ascii:]]+'
12
+
9
13
  # @param [Hash] attrs the attributes of the model.
10
14
  # @param [Calendly::Client] the api client.
11
15
  def initialize(attrs = nil, client = nil)
@@ -7,7 +7,7 @@ module Calendly
7
7
  # Calendly's organization model.
8
8
  class Organization
9
9
  include ModelUtils
10
- UUID_RE = %r{\A#{Client::API_HOST}/organizations/(\w+)\z}.freeze
10
+ UUID_RE = %r{\A#{Client::API_HOST}/organizations/(#{UUID_FORMAT})\z}.freeze
11
11
 
12
12
  # @return [String]
13
13
  # unique id of the Organization object.
@@ -85,6 +85,7 @@ module Calendly
85
85
  # Returns all Event Types associated with self.
86
86
  #
87
87
  # @param [Hash] options the optional request parameters. Optional.
88
+ # @option options [Boolean] :active Return only active event types if true, only inactive if false, or all event types if this parameter is omitted.
88
89
  # @option options [Integer] :count Number of rows to return.
89
90
  # @option options [String] :page_token Pass this to get the next portion of collection.
90
91
  # @option options [String] :sort Order results by the specified field and direction.
@@ -9,7 +9,7 @@ module Calendly
9
9
  # Calendly's organization invitation model.
10
10
  class OrganizationInvitation
11
11
  include ModelUtils
12
- UUID_RE = %r{\A#{Client::API_HOST}/organizations/\w+/invitations/(\w+)\z}.freeze
12
+ UUID_RE = %r{\A#{Client::API_HOST}/organizations/#{UUID_FORMAT}/invitations/(#{UUID_FORMAT})\z}.freeze
13
13
  TIME_FIELDS = %i[created_at updated_at last_sent_at].freeze
14
14
  ASSOCIATION = {user: User, organization: Organization}.freeze
15
15
 
@@ -9,7 +9,7 @@ module Calendly
9
9
  # Calendly's organization membership model.
10
10
  class OrganizationMembership
11
11
  include ModelUtils
12
- UUID_RE = %r{\A#{Client::API_HOST}/organization_memberships/(\w+)\z}.freeze
12
+ UUID_RE = %r{\A#{Client::API_HOST}/organization_memberships/(#{UUID_FORMAT})\z}.freeze
13
13
  TIME_FIELDS = %i[created_at updated_at].freeze
14
14
  ASSOCIATION = {user: User, organization: Organization}.freeze
15
15
 
@@ -7,7 +7,7 @@ module Calendly
7
7
  # Calendly's team model.
8
8
  class Team
9
9
  include ModelUtils
10
- UUID_RE = %r{\A#{Client::API_HOST}/teams/(\w+)\z}.freeze
10
+ UUID_RE = %r{\A#{Client::API_HOST}/teams/(#{UUID_FORMAT})\z}.freeze
11
11
 
12
12
  # @return [String]
13
13
  # unique id of the Team object.
@@ -8,7 +8,7 @@ module Calendly
8
8
  # Primary account details of a specific user.
9
9
  class User
10
10
  include ModelUtils
11
- UUID_RE = %r{\A#{Client::API_HOST}/users/(\w+)\z}.freeze
11
+ UUID_RE = %r{\A#{Client::API_HOST}/users/(#{UUID_FORMAT})\z}.freeze
12
12
  TIME_FIELDS = %i[created_at updated_at].freeze
13
13
  ASSOCIATION = {current_organization: Organization}.freeze
14
14
 
@@ -92,6 +92,7 @@ module Calendly
92
92
  # Returns all Event Types associated with self.
93
93
  #
94
94
  # @param [Hash] options the optional request parameters. Optional.
95
+ # @option options [Boolean] :active Return only active event types if true, only inactive if false, or all event types if this parameter is omitted.
95
96
  # @option options [Integer] :count Number of rows to return.
96
97
  # @option options [String] :page_token Pass this to get the next portion of collection.
97
98
  # @option options [String] :sort Order results by the specified field and direction.
@@ -9,7 +9,7 @@ module Calendly
9
9
  # Calendly's webhook model.
10
10
  class WebhookSubscription
11
11
  include ModelUtils
12
- UUID_RE = %r{\A#{Client::API_HOST}/webhook_subscriptions/(\w+)\z}.freeze
12
+ UUID_RE = %r{\A#{Client::API_HOST}/webhook_subscriptions/(#{UUID_FORMAT})\z}.freeze
13
13
  TIME_FIELDS = %i[created_at updated_at retry_started_at].freeze
14
14
  ASSOCIATION = {organization: Organization, user: User, creator: User}.freeze
15
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calendly
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-03 00:00:00.000000000 Z
11
+ date: 2022-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -161,7 +161,7 @@ metadata:
161
161
  homepage_uri: https://github.com/koshilife/calendly-api-ruby-client
162
162
  source_code_uri: https://github.com/koshilife/calendly-api-ruby-client
163
163
  changelog_uri: https://github.com/koshilife/calendly-api-ruby-client/blob/master/CHANGELOG.md
164
- documentation_uri: https://www.rubydoc.info/gems/calendly/0.8.0
164
+ documentation_uri: https://www.rubydoc.info/gems/calendly/0.8.3
165
165
  post_install_message:
166
166
  rdoc_options: []
167
167
  require_paths: