calendly 0.7.0 → 0.8.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: 7ba1370ffbfb35b34a37f514d94f48879a20a2ee5b33ebb1791969883a7303a7
4
- data.tar.gz: 5deec005ae70cdbf6f864c7ed7eec03d8186ef3127452f4221e9c9e3863f7c8d
3
+ metadata.gz: 5e6b1e9a3e025d825c0fea46f89e00bff03a5ff64e075fae3794022aad9d6271
4
+ data.tar.gz: efb1c10ff8a3e73f4799193a6225c31bfa74d200969699c305cb7aa815c09890
5
5
  SHA512:
6
- metadata.gz: 9de051c920eb9480c7c337829c75d4a81ce8690fb95c30ba0e8a493677886de52581bbae1d4dc926274f1a6ccb0dfcecf6ea184770b358c3fccf948d64a8d459
7
- data.tar.gz: a4f7068f0bbddf86699506133cebbeb1a8871a9f7523eac8e67e443a458367f1f5fc3de10b6d078801f8d502efe31bd20fb6c5d52fcbb0c588024b8ca1625fab
6
+ metadata.gz: 6543fec0b13503100c112334d7fe2a32b9bfd69b263064334c52a7ac622ec6f16c0345b222b8d5e94e12912fbbbd841ea26328a5ccd36bdc27b8eb2103a1da0d
7
+ data.tar.gz: c86ce5d7a1e7ccf1f60dd3a210aea4435e19910592ca75c7e7da5c357fbd7ab8aaec9e05f3a132c3b89bd9f481c560ec090151e719d21fe72a997b9e6855ef3c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.0
4
+
5
+ - used keyword arguments for optional parameters, to be friendly for programmer.
6
+ - changed methods are followings:
7
+ - Client
8
+ - event_types
9
+ - event_types_by_user
10
+ - scheduled_events
11
+ - scheduled_events_by_user
12
+ - event_invitees
13
+ - memberships
14
+ - memberships_by_user
15
+ - invitations
16
+ - webhooks
17
+ - user_scope_webhooks
18
+ - create_schedule_link
19
+ - Event
20
+ - invitees
21
+ - invitees!
22
+ - EventType
23
+ - create_schedule_link
24
+ - Organization
25
+ - memberships
26
+ - memberships!
27
+ - invitations
28
+ - invitations!
29
+ - event_types
30
+ - event_types!
31
+ - scheduled_events
32
+ - scheduled_events!
33
+ - webhooks
34
+ - webhooks!
35
+ - OrganizationMembership
36
+ - user_scope_webhooks
37
+ - user_scope_webhooks!
38
+ - User
39
+ - event_types
40
+ - scheduled_events
41
+ - webhooks
42
+ - webhooks!
43
+
3
44
  ## 0.7.0
4
45
 
5
46
  - supported a signing key parameter when creating webhooks. (#33)
data/README.md CHANGED
@@ -145,7 +145,7 @@ This library supports a configurable logger.
145
145
  ```ruby
146
146
  # if the log level set :debug, you can get the request/response information.
147
147
  Calendly.configuration.logger.level = :debug
148
- invitation = my_org.create_invitation('foobar@example.com')
148
+ invitation = org.create_invitation('foobar@example.com')
149
149
  # D, [2020-08-10T10:48:15] DEBUG -- : Request POST https://api.calendly.com/organizations/ORG001/invitations params:, body:{:email=>"foobar@example.com"}
150
150
  # D, [2020-08-10T10:48:16] DEBUG -- : Response status:201, body:{"resource":{"created_at":"2020-08-10T10:48:16.051159Z","email":"foobar@example.com","last_sent_at":"2020-08-10T10:48:16.096518Z","organization":"https://api.calendly.com/organizations/ORG001","status":"pending","updated_at":"2020-08-10T10:48:16.051159Z","uri":"https://api.calendly.com/organizations/ORG001/invitations/INV001"}}
151
151
  ```
@@ -106,22 +106,22 @@ module Calendly
106
106
  # Returns all Event Types associated with a specified organization.
107
107
  #
108
108
  # @param [String] org_uri the specified organization (organization's uri).
109
- # @param [Hash] opts the optional request parameters.
110
- # @option opts [Integer] :count Number of rows to return.
111
- # @option opts [String] :page_token Pass this to get the next portion of collection.
112
- # @option opts [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
109
+ # @param [Hash] options the optional request parameters. Optional.
110
+ # @option options [Integer] :count Number of rows to return.
111
+ # @option options [String] :page_token Pass this to get the next portion of collection.
112
+ # @option options [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
113
113
  # @return [Array<Array<Calendly::EventType>, Hash>]
114
114
  # - [Array<Calendly::EventType>] event_types
115
115
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
116
116
  # @raise [Calendly::Error] if the org_uri arg is empty.
117
117
  # @raise [Calendly::ApiError] if the api returns error code.
118
118
  # @since 0.6.0
119
- def event_types(org_uri, opts = {})
119
+ def event_types(org_uri, options: nil)
120
120
  check_not_empty org_uri, 'org_uri'
121
121
 
122
122
  opts_keys = %i[count page_token sort]
123
123
  params = {organization: org_uri}
124
- params = merge_options opts, opts_keys, params
124
+ params = merge_options options, opts_keys, params
125
125
  body = request :get, 'event_types', params: params
126
126
 
127
127
  items = body[:collection] || []
@@ -133,22 +133,22 @@ module Calendly
133
133
  # Returns all Event Types associated with a specified user.
134
134
  #
135
135
  # @param [String] user_uri the specified user (user's uri).
136
- # @param [Hash] opts the optional request parameters.
137
- # @option opts [Integer] :count Number of rows to return.
138
- # @option opts [String] :page_token Pass this to get the next portion of collection.
139
- # @option opts [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
136
+ # @param [Hash] options the optional request parameters. Optional.
137
+ # @option options [Integer] :count Number of rows to return.
138
+ # @option options [String] :page_token Pass this to get the next portion of collection.
139
+ # @option options [String] :sort Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values.
140
140
  # @return [Array<Array<Calendly::EventType>, Hash>]
141
141
  # - [Array<Calendly::EventType>] event_types
142
142
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
143
143
  # @raise [Calendly::Error] if the user_uri arg is empty.
144
144
  # @raise [Calendly::ApiError] if the api returns error code.
145
145
  # @since 0.0.2
146
- def event_types_by_user(user_uri, opts = {})
146
+ def event_types_by_user(user_uri, options: nil)
147
147
  check_not_empty user_uri, 'user_uri'
148
148
 
149
149
  opts_keys = %i[count page_token sort]
150
150
  params = {user: user_uri}
151
- params = merge_options opts, opts_keys, params
151
+ params = merge_options options, opts_keys, params
152
152
  body = request :get, 'event_types', params: params
153
153
 
154
154
  items = body[:collection] || []
@@ -174,26 +174,26 @@ module Calendly
174
174
  # Get List of scheduled events belonging to a specific organization.
175
175
  #
176
176
  # @param [String] org_uri the specified organization (organization's uri).
177
- # @param [Hash] opts the optional request parameters.
178
- # @option opts [Integer] :count Number of rows to return.
179
- # @option opts [String] :invitee_email Return events scheduled with the specified invitee email.
180
- # @option opts [String] :max_start_time Upper bound (inclusive) for an event's start time to filter by.
181
- # @option opts [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
182
- # @option opts [String] :page_token Pass this to get the next portion of collection.
183
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
184
- # @option opts [String] :status Whether the scheduled event is active or canceled.
177
+ # @param [Hash] options the optional request parameters. Optional.
178
+ # @option options [Integer] :count Number of rows to return.
179
+ # @option options [String] :invitee_email Return events scheduled with the specified invitee email.
180
+ # @option options [String] :max_start_time Upper bound (inclusive) for an event's start time to filter by.
181
+ # @option options [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
182
+ # @option options [String] :page_token Pass this to get the next portion of collection.
183
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
184
+ # @option options [String] :status Whether the scheduled event is active or canceled.
185
185
  # @return [Array<Array<Calendly::Event>, Hash>]
186
186
  # - [Array<Calendly::Event>] events
187
187
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
188
188
  # @raise [Calendly::Error] if the org_uri arg is empty.
189
189
  # @raise [Calendly::ApiError] if the api returns error code.
190
190
  # @since 0.5.0
191
- def scheduled_events(org_uri, opts = {})
191
+ def scheduled_events(org_uri, options: nil)
192
192
  check_not_empty org_uri, 'org_uri'
193
193
 
194
194
  opts_keys = %i[count invitee_email max_start_time min_start_time page_token sort status]
195
195
  params = {organization: org_uri}
196
- params = merge_options opts, opts_keys, params
196
+ params = merge_options options, opts_keys, params
197
197
  body = request :get, 'scheduled_events', params: params
198
198
 
199
199
  items = body[:collection] || []
@@ -205,27 +205,27 @@ module Calendly
205
205
  # Get List of scheduled events belonging to a specific user.
206
206
  #
207
207
  # @param [String] user_uri the specified user (user's uri).
208
- # @param [Hash] opts the optional request parameters.
209
- # @option opts [String] :organization the specified organization (organization's uri).
210
- # @option opts [Integer] :count Number of rows to return.
211
- # @option opts [String] :invitee_email Return events scheduled with the specified invitee email.
212
- # @option opts [String] :max_start_time Upper bound (inclusive) for an event's start time to filter by.
213
- # @option opts [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
214
- # @option opts [String] :page_token Pass this to get the next portion of collection.
215
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
216
- # @option opts [String] :status Whether the scheduled event is active or canceled.
208
+ # @param [Hash] options the optional request parameters. Optional.
209
+ # @option options [String] :organization the specified organization (organization's uri).
210
+ # @option options [Integer] :count Number of rows to return.
211
+ # @option options [String] :invitee_email Return events scheduled with the specified invitee email.
212
+ # @option options [String] :max_start_time Upper bound (inclusive) for an event's start time to filter by.
213
+ # @option options [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
214
+ # @option options [String] :page_token Pass this to get the next portion of collection.
215
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
216
+ # @option options [String] :status Whether the scheduled event is active or canceled.
217
217
  # @return [Array<Array<Calendly::Event>, Hash>]
218
218
  # - [Array<Calendly::Event>] events
219
219
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
220
220
  # @raise [Calendly::Error] if the user_uri arg is empty.
221
221
  # @raise [Calendly::ApiError] if the api returns error code.
222
222
  # @since 0.0.3
223
- def scheduled_events_by_user(user_uri, opts = {})
223
+ def scheduled_events_by_user(user_uri, options: nil)
224
224
  check_not_empty user_uri, 'user_uri'
225
225
 
226
226
  opts_keys = %i[organization count invitee_email max_start_time min_start_time page_token sort status]
227
227
  params = {user: user_uri}
228
- params = merge_options opts, opts_keys, params
228
+ params = merge_options options, opts_keys, params
229
229
  body = request :get, 'scheduled_events', params: params
230
230
 
231
231
  items = body[:collection] || []
@@ -255,23 +255,23 @@ module Calendly
255
255
  # Get List of Event Invitees.
256
256
  #
257
257
  # @param [String] uuid the specified event (event's uuid).
258
- # @param [Hash] opts the optional request parameters.
259
- # @option opts [Integer] :count Number of rows to return.
260
- # @option opts [String] :email Filter by email.
261
- # @option opts [String] :page_token Pass this to get the next portion of collection.
262
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
263
- # @option opts [String] :status Whether the scheduled event is active or canceled.
258
+ # @param [Hash] options the optional request parameters. Optional.
259
+ # @option options [Integer] :count Number of rows to return.
260
+ # @option options [String] :email Filter by email.
261
+ # @option options [String] :page_token Pass this to get the next portion of collection.
262
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
263
+ # @option options [String] :status Whether the scheduled event is active or canceled.
264
264
  # @return [Array<Array<Calendly::Invitee>, Hash>]
265
265
  # - [Array<Calendly::Invitee>] invitees
266
266
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
267
267
  # @raise [Calendly::Error] if the uuid arg is empty.
268
268
  # @raise [Calendly::ApiError] if the api returns error code.
269
269
  # @since 0.0.4
270
- def event_invitees(uuid, opts = {})
270
+ def event_invitees(uuid, options: nil)
271
271
  check_not_empty uuid, 'uuid'
272
272
 
273
273
  opts_keys = %i[count email page_token sort status]
274
- params = merge_options opts, opts_keys
274
+ params = merge_options options, opts_keys
275
275
  body = request :get, "scheduled_events/#{uuid}/invitees", params: params
276
276
 
277
277
  items = body[:collection] || []
@@ -297,22 +297,22 @@ module Calendly
297
297
  # Get List of memberships belonging to specific an organization.
298
298
  #
299
299
  # @param [String] org_uri the specified organization (organization's uri).
300
- # @param [Hash] opts the optional request parameters.
301
- # @option opts [Integer] :count Number of rows to return.
302
- # @option opts [String] :email Filter by email.
303
- # @option opts [String] :page_token Pass this to get the next portion of collection.
300
+ # @param [Hash] options the optional request parameters. Optional.
301
+ # @option options [Integer] :count Number of rows to return.
302
+ # @option options [String] :email Filter by email.
303
+ # @option options [String] :page_token Pass this to get the next portion of collection.
304
304
  # @return [Array<Array<Calendly::OrganizationMembership>, Hash>]
305
305
  # - [Array<Calendly::OrganizationMembership>] memberships
306
306
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
307
307
  # @raise [Calendly::Error] if the org_uri arg is empty.
308
308
  # @raise [Calendly::ApiError] if the api returns error code.
309
309
  # @since 0.0.5
310
- def memberships(org_uri, opts = {})
310
+ def memberships(org_uri, options: nil)
311
311
  check_not_empty org_uri, 'org_uri'
312
312
 
313
313
  opts_keys = %i[count email page_token]
314
314
  params = {organization: org_uri}
315
- params = merge_options opts, opts_keys, params
315
+ params = merge_options options, opts_keys, params
316
316
  body = request :get, 'organization_memberships', params: params
317
317
 
318
318
  items = body[:collection] || []
@@ -324,22 +324,22 @@ module Calendly
324
324
  # Get List of memberships belonging to specific a user.
325
325
  #
326
326
  # @param [String] user_uri the specified user (user's uri).
327
- # @param [Hash] opts the optional request parameters.
328
- # @option opts [Integer] :count Number of rows to return.
329
- # @option opts [String] :email Filter by email.
330
- # @option opts [String] :page_token Pass this to get the next portion of collection.
327
+ # @param [Hash] options the optional request parameters. Optional.
328
+ # @option options [Integer] :count Number of rows to return.
329
+ # @option options [String] :email Filter by email.
330
+ # @option options [String] :page_token Pass this to get the next portion of collection.
331
331
  # @return [Array<Array<Calendly::OrganizationMembership>, Hash>]
332
332
  # - [Array<Calendly::OrganizationMembership>] memberships
333
333
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
334
334
  # @raise [Calendly::Error] if the user_uri arg is empty.
335
335
  # @raise [Calendly::ApiError] if the api returns error code.
336
336
  # @since 0.0.5
337
- def memberships_by_user(user_uri, opts = {})
337
+ def memberships_by_user(user_uri, options: nil)
338
338
  check_not_empty user_uri, 'user_uri'
339
339
 
340
340
  opts_keys = %i[count email page_token]
341
341
  params = {user: user_uri}
342
- params = merge_options opts, opts_keys, params
342
+ params = merge_options options, opts_keys, params
343
343
  body = request :get, 'organization_memberships', params: params
344
344
 
345
345
  items = body[:collection] || []
@@ -383,23 +383,23 @@ module Calendly
383
383
  # Get Organization Invitations.
384
384
  #
385
385
  # @param [String] uuid the specified organization (organization's uuid).
386
- # @param [Hash] opts the optional request parameters.
387
- # @option opts [Integer] :count Number of rows to return.
388
- # @option opts [String] :email Filter by email.
389
- # @option opts [String] :page_token Pass this to get the next portion of collection.
390
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
391
- # @option opts [String] :status Filter by status.
386
+ # @param [Hash] options the optional request parameters. Optional.
387
+ # @option options [Integer] :count Number of rows to return.
388
+ # @option options [String] :email Filter by email.
389
+ # @option options [String] :page_token Pass this to get the next portion of collection.
390
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
391
+ # @option options [String] :status Filter by status.
392
392
  # @return [<Array<Array<Calendly::OrganizationInvitation>, Hash>]
393
393
  # - [Array<Calendly::OrganizationInvitation>] organizations
394
394
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
395
395
  # @raise [Calendly::Error] if the uuid arg is empty.
396
396
  # @raise [Calendly::ApiError] if the api returns error code.
397
397
  # @since 0.0.6
398
- def invitations(uuid, opts = {})
398
+ def invitations(uuid, options: nil)
399
399
  check_not_empty uuid, 'uuid'
400
400
 
401
401
  opts_keys = %i[count email page_token sort status]
402
- params = merge_options opts, opts_keys
402
+ params = merge_options options, opts_keys
403
403
 
404
404
  body = request :get, "organizations/#{uuid}/invitations", params: params
405
405
  items = body[:collection] || []
@@ -463,22 +463,22 @@ module Calendly
463
463
  # Get List of organization scope Webhooks.
464
464
  #
465
465
  # @param [String] org_uri the specified organization (organization's uri).
466
- # @param [Hash] opts the optional request parameters.
467
- # @option opts [Integer] :count Number of rows to return.
468
- # @option opts [String] :page_token Pass this to get the next portion of collection.
469
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
466
+ # @param [Hash] options the optional request parameters. Optional.
467
+ # @option options [Integer] :count Number of rows to return.
468
+ # @option options [String] :page_token Pass this to get the next portion of collection.
469
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
470
470
  # @return [Array<Array<Calendly::WebhookSubscription>, Hash>]
471
471
  # - [Array<Calendly::WebhookSubscription>] webhooks
472
472
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
473
473
  # @raise [Calendly::Error] if the org_uri arg is empty.
474
474
  # @raise [Calendly::ApiError] if the api returns error code.
475
475
  # @since 0.1.3
476
- def webhooks(org_uri, opts = {})
476
+ def webhooks(org_uri, options: nil)
477
477
  check_not_empty org_uri, 'org_uri'
478
478
 
479
479
  opts_keys = %i[count page_token sort]
480
480
  params = {organization: org_uri, scope: 'organization'}
481
- params = merge_options opts, opts_keys, params
481
+ params = merge_options options, opts_keys, params
482
482
  body = request :get, 'webhook_subscriptions', params: params
483
483
  items = body[:collection] || []
484
484
  evs = items.map { |item| WebhookSubscription.new item, self }
@@ -490,10 +490,10 @@ module Calendly
490
490
  #
491
491
  # @param [String] org_uri the specified organization (organization's uri).
492
492
  # @param [String] user_uri the specified user (user's uri).
493
- # @param [Hash] opts the optional request parameters.
494
- # @option opts [Integer] :count Number of rows to return.
495
- # @option opts [String] :page_token Pass this to get the next portion of collection.
496
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
493
+ # @param [Hash] options the optional request parameters. Optional.
494
+ # @option options [Integer] :count Number of rows to return.
495
+ # @option options [String] :page_token Pass this to get the next portion of collection.
496
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
497
497
  # @return [Array<Array<Calendly::WebhookSubscription>, Hash>]
498
498
  # - [Array<Calendly::WebhookSubscription>] webhooks
499
499
  # - [Hash] next_params the parameters to get next data. if thre is no next it returns nil.
@@ -501,13 +501,13 @@ module Calendly
501
501
  # @raise [Calendly::Error] if the user_uri arg is empty.
502
502
  # @raise [Calendly::ApiError] if the api returns error code.
503
503
  # @since 0.1.3
504
- def user_scope_webhooks(org_uri, user_uri, opts = {})
504
+ def user_scope_webhooks(org_uri, user_uri, options: nil)
505
505
  check_not_empty org_uri, 'org_uri'
506
506
  check_not_empty user_uri, 'user_uri'
507
507
 
508
508
  opts_keys = %i[count page_token sort]
509
509
  params = {organization: org_uri, user: user_uri, scope: 'user'}
510
- params = merge_options opts, opts_keys, params
510
+ params = merge_options options, opts_keys, params
511
511
  body = request :get, 'webhook_subscriptions', params: params
512
512
  items = body[:collection] || []
513
513
  evs = items.map { |item| WebhookSubscription.new item, self }
@@ -565,7 +565,7 @@ module Calendly
565
565
  #
566
566
  # @param [String] uri A link to the resource that owns this scheduling Link.
567
567
  # @param [String] max_event_count The max number of events that can be scheduled using this scheduling link.
568
- # @param [String] resource_type Resource type.
568
+ # @param [String] owner_type Resource type.
569
569
  # @return [Hash]
570
570
  # e.g.
571
571
  # {
@@ -575,17 +575,17 @@ module Calendly
575
575
  # }
576
576
  # @raise [Calendly::Error] if the uri arg is empty.
577
577
  # @raise [Calendly::Error] if the max_event_count arg is empty.
578
- # @raise [Calendly::Error] if the resource_type arg is empty.
578
+ # @raise [Calendly::Error] if the owner_type arg is empty.
579
579
  # @raise [Calendly::ApiError] if the api returns error code.
580
580
  # @since 0.5.2
581
- def create_schedule_link(uri, max_event_count = 1, resource_type: 'EventType')
581
+ def create_schedule_link(uri, max_event_count: 1, owner_type: 'EventType')
582
582
  check_not_empty uri, 'uri'
583
583
  check_not_empty max_event_count, 'max_event_count'
584
- check_not_empty resource_type, 'resource_type'
584
+ check_not_empty owner_type, 'owner_type'
585
585
  params = {
586
586
  max_event_count: max_event_count,
587
587
  owner: uri,
588
- owner_type: resource_type
588
+ owner_type: owner_type
589
589
  }
590
590
  body = request :post, 'scheduling_links', body: params
591
591
  body[:resource]
@@ -87,10 +87,10 @@ module Calendly
87
87
  #
88
88
  # Returns all Event Invitees associated with self.
89
89
  #
90
- # @param [Hash] opts the optional request parameters.
91
- # @option opts [Integer] :count Number of rows to return.
92
- # @option opts [String] :email Filter by email.
93
- # @option opts [String] :page_token
90
+ # @param [Hash] options the optional request parameters. Optional.
91
+ # @option options [Integer] :count Number of rows to return.
92
+ # @option options [String] :email Filter by email.
93
+ # @option options [String] :page_token
94
94
  # Pass this to get the next portion of collection.
95
95
  # @option opts [String] :sort Order results by the specified field and directin.
96
96
  # Accepts comma-separated list of {field}:{direction} values.
@@ -99,17 +99,17 @@ module Calendly
99
99
  # @raise [Calendly::Error] if the uuid is empty.
100
100
  # @raise [Calendly::ApiError] if the api returns error code.
101
101
  # @since 0.1.0
102
- def invitees(opts = {})
102
+ def invitees(options: nil)
103
103
  return @cached_invitees if defined?(@cached_invitees) && @cached_invitees
104
104
 
105
- request_proc = proc { |options| client.event_invitees uuid, options }
106
- @cached_invitees = auto_pagination request_proc, opts
105
+ request_proc = proc { |opts| client.event_invitees uuid, options: opts }
106
+ @cached_invitees = auto_pagination request_proc, options
107
107
  end
108
108
 
109
109
  # @since 0.2.0
110
- def invitees!(opts = {})
110
+ def invitees!(options: nil)
111
111
  @cached_invitees = nil
112
- invitees opts
112
+ invitees options: options
113
113
  end
114
114
 
115
115
  private
@@ -132,8 +132,8 @@ module Calendly
132
132
  # @raise [Calendly::Error] if the max_event_count arg is empty.
133
133
  # @raise [Calendly::ApiError] if the api returns error code.
134
134
  # @since 0.5.2
135
- def create_schedule_link(max_event_count = 1)
136
- client.create_schedule_link uri, max_event_count, resource_type: 'EventType'
135
+ def create_schedule_link(max_event_count: 1)
136
+ client.create_schedule_link uri, max_event_count: max_event_count, owner_type: 'EventType'
137
137
  end
138
138
 
139
139
  private
@@ -20,52 +20,52 @@ module Calendly
20
20
  #
21
21
  # Get List memberships of all users belonging to self.
22
22
  #
23
- # @param [Hash] opts the optional request parameters.
24
- # @option opts [Integer] :count Number of rows to return.
25
- # @option opts [String] :email Filter by email.
26
- # @option opts [String] :page_token Pass this to get the next portion of collection.
23
+ # @param [Hash] options the optional request parameters. Optional.
24
+ # @option options [Integer] :count Number of rows to return.
25
+ # @option options [String] :email Filter by email.
26
+ # @option options [String] :page_token Pass this to get the next portion of collection.
27
27
  # @return [Array<Calendly::OrganizationMembership>]
28
28
  # @raise [Calendly::Error] if the uri is empty.
29
29
  # @raise [Calendly::ApiError] if the api returns error code.
30
30
  # @since 0.1.0
31
- def memberships(opts = {})
31
+ def memberships(options: nil)
32
32
  return @cached_memberships if defined?(@cached_memberships) && @cached_memberships
33
33
 
34
- request_proc = proc { |options| client.memberships uri, options }
35
- @cached_memberships = auto_pagination request_proc, opts
34
+ request_proc = proc { |opts| client.memberships uri, options: opts }
35
+ @cached_memberships = auto_pagination request_proc, options
36
36
  end
37
37
 
38
38
  # @since 0.2.0
39
- def memberships!(opts = {})
39
+ def memberships!(options: nil)
40
40
  @cached_memberships = nil
41
- memberships opts
41
+ memberships options: options
42
42
  end
43
43
 
44
44
  #
45
45
  # Get Organization Invitations.
46
46
  #
47
- # @param [Hash] opts the optional request parameters.
48
- # @option opts [Integer] :count Number of rows to return.
49
- # @option opts [String] :email Filter by email.
50
- # @option opts [String] :page_token Pass this to get the next portion of collection.
51
- # @option opts [String] :sort Order results by the specified field and directin.
47
+ # @param [Hash] options the optional request parameters. Optional.
48
+ # @option options [Integer] :count Number of rows to return.
49
+ # @option options [String] :email Filter by email.
50
+ # @option options [String] :page_token Pass this to get the next portion of collection.
51
+ # @option options [String] :sort Order results by the specified field and directin.
52
52
  # Accepts comma-separated list of {field}:{direction} values.
53
- # @option opts [String] :status Filter by status.
53
+ # @option options [String] :status Filter by status.
54
54
  # @return [Array<Calendly::OrganizationInvitation>]
55
55
  # @raise [Calendly::Error] if the uuid is empty.
56
56
  # @raise [Calendly::ApiError] if the api returns error code.
57
57
  # @since 0.1.0
58
- def invitations(opts = {})
58
+ def invitations(options: nil)
59
59
  return @cached_invitations if defined?(@cached_invitations) && @cached_invitations
60
60
 
61
- request_proc = proc { |options| client.invitations uuid, options }
62
- @cached_invitations = auto_pagination request_proc, opts
61
+ request_proc = proc { |opts| client.invitations uuid, options: opts }
62
+ @cached_invitations = auto_pagination request_proc, options
63
63
  end
64
64
 
65
65
  # @since 0.2.0
66
- def invitations!(opts = {})
66
+ def invitations!(options: nil)
67
67
  @cached_invitations = nil
68
- invitations opts
68
+ invitations options: options
69
69
  end
70
70
 
71
71
  #
@@ -84,80 +84,80 @@ module Calendly
84
84
  #
85
85
  # Returns all Event Types associated with self.
86
86
  #
87
- # @param [Hash] opts the optional request parameters.
88
- # @option opts [Integer] :count Number of rows to return.
89
- # @option opts [String] :page_token Pass this to get the next portion of collection.
90
- # @option opts [String] :sort Order results by the specified field and direction.
87
+ # @param [Hash] options the optional request parameters. Optional.
88
+ # @option options [Integer] :count Number of rows to return.
89
+ # @option options [String] :page_token Pass this to get the next portion of collection.
90
+ # @option options [String] :sort Order results by the specified field and direction.
91
91
  # Accepts comma-separated list of {field}:{direction} values.
92
92
  # @return [Array<Calendly::EventType>]
93
93
  # @raise [Calendly::Error] if the uri is empty.
94
94
  # @raise [Calendly::ApiError] if the api returns error code.
95
95
  # @since 0.6.0
96
- def event_types(opts = {})
96
+ def event_types(options: nil)
97
97
  return @cached_event_types if defined?(@cached_event_types) && @cached_event_types
98
98
 
99
- request_proc = proc { |options| client.event_types uri, options }
100
- @cached_event_types = auto_pagination request_proc, opts
99
+ request_proc = proc { |opts| client.event_types uri, options: opts }
100
+ @cached_event_types = auto_pagination request_proc, options
101
101
  end
102
102
 
103
103
  # @since 0.6.0
104
- def event_types!(opts = {})
104
+ def event_types!(options: nil)
105
105
  @cached_event_types = nil
106
- event_types opts
106
+ event_types options: options
107
107
  end
108
108
 
109
109
  #
110
110
  # Returns all Scheduled Events associated with self.
111
111
  #
112
- # @param [Hash] opts the optional request parameters.
113
- # @option opts [Integer] :count Number of rows to return.
114
- # @option opts [String] :invitee_email Return events scheduled with the specified invitee email
115
- # @option opts [String] :max_start_timeUpper bound (inclusive) for an event's start time to filter by.
116
- # @option opts [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
117
- # @option opts [String] :page_token Pass this to get the next portion of collection.
118
- # @option opts [String] :sort Order results by the specified field and directin.
112
+ # @param [Hash] options the optional request parameters. Optional.
113
+ # @option options [Integer] :count Number of rows to return.
114
+ # @option options [String] :invitee_email Return events scheduled with the specified invitee email
115
+ # @option options [String] :max_start_timeUpper bound (inclusive) for an event's start time to filter by.
116
+ # @option options [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
117
+ # @option options [String] :page_token Pass this to get the next portion of collection.
118
+ # @option options [String] :sort Order results by the specified field and directin.
119
119
  # Accepts comma-separated list of {field}:{direction} values.
120
- # @option opts [String] :status Whether the scheduled event is active or canceled
120
+ # @option options [String] :status Whether the scheduled event is active or canceled
121
121
  # @return [Array<Calendly::Event>]
122
122
  # @raise [Calendly::Error] if the uri is empty.
123
123
  # @raise [Calendly::ApiError] if the api returns error code.
124
124
  # @since 0.5.0
125
- def scheduled_events(opts = {})
125
+ def scheduled_events(options: nil)
126
126
  return @cached_scheduled_events if defined?(@cached_scheduled_events) && @cached_scheduled_events
127
127
 
128
- request_proc = proc { |options| client.scheduled_events uri, options }
129
- @cached_scheduled_events = auto_pagination request_proc, opts
128
+ request_proc = proc { |opts| client.scheduled_events uri, options: opts }
129
+ @cached_scheduled_events = auto_pagination request_proc, options
130
130
  end
131
131
 
132
132
  # @since 0.5.0
133
- def scheduled_events!(opts = {})
133
+ def scheduled_events!(options: nil)
134
134
  @cached_scheduled_events = nil
135
- scheduled_events opts
135
+ scheduled_events options: options
136
136
  end
137
137
 
138
138
  #
139
139
  # Get List of organization scope Webhooks associated with self.
140
140
  #
141
- # @param [Hash] opts the optional request parameters.
142
- # @option opts [Integer] :count Number of rows to return.
143
- # @option opts [String] :page_token Pass this to get the next portion of collection.
144
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
141
+ # @param [Hash] options the optional request parameters. Optional.
142
+ # @option options [Integer] :count Number of rows to return.
143
+ # @option options [String] :page_token Pass this to get the next portion of collection.
144
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
145
145
  # Accepts comma-separated list of {field}:{direction} values.
146
146
  # @return [Array<Calendly::WebhookSubscription>]
147
147
  # @raise [Calendly::Error] if the uri is empty.
148
148
  # @raise [Calendly::ApiError] if the api returns error code.
149
149
  # @since 0.1.3
150
- def webhooks(opts = {})
150
+ def webhooks(options: nil)
151
151
  return @cached_webhooks if defined?(@cached_webhooks) && @cached_webhooks
152
152
 
153
- request_proc = proc { |options| client.webhooks uri, options }
154
- @cached_webhooks = auto_pagination request_proc, opts
153
+ request_proc = proc { |opts| client.webhooks uri, options: opts }
154
+ @cached_webhooks = auto_pagination request_proc, options
155
155
  end
156
156
 
157
157
  # @since 0.2.0
158
- def webhooks!(opts = {})
158
+ def webhooks!(options: nil)
159
159
  @cached_webhooks = nil
160
- webhooks opts
160
+ webhooks options: options
161
161
  end
162
162
 
163
163
  #
@@ -65,23 +65,23 @@ module Calendly
65
65
  #
66
66
  # Get List of user scope Webhooks associated with self.
67
67
  #
68
- # @param [Hash] opts the optional request parameters.
69
- # @option opts [Integer] :count Number of rows to return.
70
- # @option opts [String] :page_token Pass this to get the next portion of collection.
71
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
68
+ # @param [Hash] options the optional request parameters. Optional.
69
+ # @option options [Integer] :count Number of rows to return.
70
+ # @option options [String] :page_token Pass this to get the next portion of collection.
71
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
72
72
  # Accepts comma-separated list of {field}:{direction} values.
73
73
  # @return [Array<Calendly::WebhookSubscription>]
74
74
  # @raise [Calendly::Error] if the organization.uri is empty.
75
75
  # @raise [Calendly::Error] if the user.uri is empty.
76
76
  # @raise [Calendly::ApiError] if the api returns error code.
77
77
  # @since 0.1.3
78
- def user_scope_webhooks(opts = {})
79
- user.webhooks(opts)
78
+ def user_scope_webhooks(options: nil)
79
+ user.webhooks options: options
80
80
  end
81
81
 
82
82
  # @since 0.2.0
83
- def user_scope_webhooks!(opts = {})
84
- user.webhooks!(opts)
83
+ def user_scope_webhooks!(options: nil)
84
+ user.webhooks! options: options
85
85
  end
86
86
 
87
87
  #
@@ -91,82 +91,82 @@ module Calendly
91
91
  #
92
92
  # Returns all Event Types associated with self.
93
93
  #
94
- # @param [Hash] opts the optional request parameters.
95
- # @option opts [Integer] :count Number of rows to return.
96
- # @option opts [String] :page_token Pass this to get the next portion of collection.
97
- # @option opts [String] :sort Order results by the specified field and direction.
94
+ # @param [Hash] options the optional request parameters. Optional.
95
+ # @option options [Integer] :count Number of rows to return.
96
+ # @option options [String] :page_token Pass this to get the next portion of collection.
97
+ # @option options [String] :sort Order results by the specified field and direction.
98
98
  # Accepts comma-separated list of {field}:{direction} values.
99
99
  # @return [Array<Calendly::EventType>]
100
100
  # @raise [Calendly::Error] if the uri is empty.
101
101
  # @raise [Calendly::ApiError] if the api returns error code.
102
102
  # @since 0.1.0
103
- def event_types(opts = {})
103
+ def event_types(options: nil)
104
104
  return @cached_event_types if defined?(@cached_event_types) && @cached_event_types
105
105
 
106
- request_proc = proc { |options| client.event_types_by_user uri, options }
107
- @cached_event_types = auto_pagination request_proc, opts
106
+ request_proc = proc { |opts| client.event_types_by_user uri, options: opts }
107
+ @cached_event_types = auto_pagination request_proc, options
108
108
  end
109
109
 
110
110
  # @since 0.2.0
111
- def event_types!(opts = {})
111
+ def event_types!(options: nil)
112
112
  @cached_event_types = nil
113
- event_types opts
113
+ event_types options: options
114
114
  end
115
115
 
116
116
  #
117
117
  # Returns all Scheduled Events associated with self.
118
118
  #
119
- # @param [Hash] opts the optional request parameters.
120
- # @option opts [Integer] :count Number of rows to return.
121
- # @option opts [String] :invitee_email Return events scheduled with the specified invitee email
122
- # @option opts [String] :max_start_timeUpper bound (inclusive) for an event's start time to filter by.
123
- # @option opts [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
124
- # @option opts [String] :page_token Pass this to get the next portion of collection.
125
- # @option opts [String] :sort Order results by the specified field and directin.
119
+ # @param [Hash] options the optional request parameters. Optional.
120
+ # @option options [Integer] :count Number of rows to return.
121
+ # @option options [String] :invitee_email Return events scheduled with the specified invitee email
122
+ # @option options [String] :max_start_timeUpper bound (inclusive) for an event's start time to filter by.
123
+ # @option options [String] :min_start_time Lower bound (inclusive) for an event's start time to filter by.
124
+ # @option options [String] :page_token Pass this to get the next portion of collection.
125
+ # @option options [String] :sort Order results by the specified field and directin.
126
126
  # Accepts comma-separated list of {field}:{direction} values.
127
- # @option opts [String] :status Whether the scheduled event is active or canceled
127
+ # @option options [String] :status Whether the scheduled event is active or canceled
128
128
  # @return [Array<Calendly::Event>]
129
129
  # @raise [Calendly::Error] if the uri is empty.
130
130
  # @raise [Calendly::ApiError] if the api returns error code.
131
131
  # @since 0.1.0
132
- def scheduled_events(opts = {})
132
+ def scheduled_events(options: nil)
133
133
  return @cached_scheduled_events if defined?(@cached_scheduled_events) && @cached_scheduled_events
134
134
 
135
- request_proc = proc { |options| client.scheduled_events_by_user uri, options }
136
- @cached_scheduled_events = auto_pagination request_proc, opts
135
+ request_proc = proc { |opts| client.scheduled_events_by_user uri, options: opts }
136
+ @cached_scheduled_events = auto_pagination request_proc, options
137
137
  end
138
138
 
139
139
  # @since 0.2.0
140
- def scheduled_events!(opts = {})
140
+ def scheduled_events!(options: nil)
141
141
  @cached_scheduled_events = nil
142
- scheduled_events opts
142
+ scheduled_events options: options
143
143
  end
144
144
 
145
145
  #
146
146
  # Get List of user scope Webhooks associated with self.
147
147
  #
148
- # @param [Hash] opts the optional request parameters.
149
- # @option opts [Integer] :count Number of rows to return.
150
- # @option opts [String] :page_token Pass this to get the next portion of collection.
151
- # @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
148
+ # @param [Hash] options the optional request parameters. Optional.
149
+ # @option options [Integer] :count Number of rows to return.
150
+ # @option options [String] :page_token Pass this to get the next portion of collection.
151
+ # @option options [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values.
152
152
  # Accepts comma-separated list of {field}:{direction} values.
153
153
  # @return [Array<Calendly::WebhookSubscription>]
154
154
  # @raise [Calendly::Error] if the organization.uri is empty.
155
155
  # @raise [Calendly::Error] if the uri is empty.
156
156
  # @raise [Calendly::ApiError] if the api returns error code.
157
157
  # @since 0.6.0
158
- def webhooks(opts = {})
158
+ def webhooks(options: nil)
159
159
  return @cached_webhooks if defined?(@cached_webhooks) && @cached_webhooks
160
160
 
161
161
  org_uri = current_organization&.uri
162
- request_proc = proc { |options| client.user_scope_webhooks org_uri, uri, options }
163
- @cached_webhooks = auto_pagination request_proc, opts
162
+ request_proc = proc { |opts| client.user_scope_webhooks org_uri, uri, options: opts }
163
+ @cached_webhooks = auto_pagination request_proc, options
164
164
  end
165
165
 
166
166
  # @since 0.6.0
167
- def webhooks!(opts = {})
167
+ def webhooks!(options: nil)
168
168
  @cached_webhooks = nil
169
- webhooks opts
169
+ webhooks options: options
170
170
  end
171
171
 
172
172
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calendly
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
@@ -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.7.0
164
+ documentation_uri: https://www.rubydoc.info/gems/calendly/0.8.0
165
165
  post_install_message:
166
166
  rdoc_options: []
167
167
  require_paths: