calendlyr 0.4.0 → 0.5.0

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: 8c61eeba097d722afae96ec580cd3c846b81ddf3086be6af4937ec4988a54a3d
4
- data.tar.gz: e36f1d86bcfdded9881de1f5da03cf68bcaac08f83599be9398224f6484412be
3
+ metadata.gz: 8333c9dbe0f1d7e633eaff538790c0cd4f57ee3d9cf8c1b0f5e4638373578a60
4
+ data.tar.gz: 9eb3dfaab07649e6b15d1fca3286c6fab0592a74f689f6809c7b2506e13e6b2b
5
5
  SHA512:
6
- metadata.gz: fc9d65be6a30c2319e386afed5301d9e6a45131fb846a5b3701b5d4f8d14afe292344bbf05e57bb3bdf78e68038eb962a2226fac75255d24269ee95da3cb2591
7
- data.tar.gz: aab622e3c919bb2bbad49fb026e6f17bfd460f81b3929c3d4c854d2d230f1cd4712b1bb62711223b93477dbe347b6d87be9405698aaa1fbbce8313d193c1e1d7
6
+ metadata.gz: 81f0d93eb9049accadaf68e8af5174800bfb6630570008a69d50e3f0ede02c60d9577a59e9a2aa161d92c68222957cefae618fee7471b5474d2569317b8e86ab
7
+ data.tar.gz: 6073bce53858d69dc7c40b814e54bd3d3dce0be7abf720873f55441b2b1e62eae360ecf30b4f201703c12cd337b94b8ff7a1e78370e1848bc1844e262c2f393a
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.4.0]
5
+ ## [0.5.0]
6
6
  * First real usable release :tada:
7
7
 
8
- [0.4.0]: https://github.com/araluce/calendlyr/compare/v0.1.0...v0.4.0
8
+ [0.5.0]: https://github.com/araluce/calendlyr/compare/v0.1.0...v0.5.0
data/README.md CHANGED
@@ -7,10 +7,16 @@
7
7
 
8
8
  Easy and complete rubygem for [Calendly](https://calendly.com/). Currently supports [API v2](https://calendly.stoplight.io/docs/api-docs).
9
9
 
10
- No dependencies, just needed a Personal Access Token.
10
+ Just needed a Personal Access Token.
11
11
 
12
12
  > If you need a Oauth authentication maybe you need [calendly-api-ruby-client](https://github.com/koshilife/calendly-api-ruby-client)
13
13
 
14
+ ## Dependencies
15
+
16
+ No dependencies :tada:
17
+
18
+ We know about the importance of not add dependencies that you don't want.
19
+
14
20
  ## Installation
15
21
 
16
22
  Add this line to your application's Gemfile:
@@ -144,12 +150,16 @@ client.organizations.retrieve_membership(membership_uuid: "membership_uuid")
144
150
  client.organizations.remove_user(membership_uuid: "membership_uuid")
145
151
 
146
152
  client.organization.events
153
+
154
+ # List/Creaete webhooks
155
+ client.organization.list_webhooks(scope: "scope")
156
+ client.organization.create_webhook(url: "post_callback_url", events: ["invitee.canceled", "invitee.created"], scope: "scope")
147
157
  ````
148
158
 
149
159
  ### Webhooks
150
160
  ```ruby
151
161
  client.webhooks.list(organization_uri: "organization_uri", scope: "scope")
152
- client.webhooks.create(resource_uri: "resource_uri", events: ["invitee.canceled", "invitee.created"], organization_uri: "organization_uri", scope: "scope")
162
+ client.webhooks.create(url: "post_callback_url", events: ["invitee.canceled", "invitee.created"], organization_uri: "organization_uri", scope: "scope")
153
163
  client.webhooks.retrieve(webhook_uuid: "webhook_uuid")
154
164
  client.webhooks.delete(webhook_uuid: "webhook_uuid")
155
165
  ```
@@ -8,6 +8,14 @@ module Calendlyr
8
8
  client.organizations.list_invitations organization_uuid: uuid, **params
9
9
  end
10
10
 
11
+ def list_webhooks(**params)
12
+ client.webhooks.list(organization_uri: uri, **params)
13
+ end
14
+
15
+ def create_webhook(**params)
16
+ client.webhooks.create(organization_uri: uri, **params)
17
+ end
18
+
11
19
  def revoke_invitation(invitation_uuid:)
12
20
  client.organizations.revoke_invitation(organization_uuid: uuid, invitation_uuid: invitation_uuid)
13
21
  end
@@ -7,6 +7,8 @@ module Calendlyr
7
7
  class Resource
8
8
  attr_reader :client
9
9
 
10
+ ERROR_CODES = %w[400 401 403 404 409 500]
11
+
10
12
  def initialize(client)
11
13
  @client = client
12
14
  end
@@ -21,14 +23,6 @@ module Calendlyr
21
23
  handle_response request(url, Net::HTTP::Post, body: body)
22
24
  end
23
25
 
24
- def patch_request(url, body:)
25
- handle_response request(url, Net::HTTP::Patch, body: body)
26
- end
27
-
28
- def put_request(url, body)
29
- handle_response request(url, Net::HTTP::Put, body: body)
30
- end
31
-
32
26
  def delete_request(url, params: {})
33
27
  handle_response request(url, Net::HTTP::Delete, params: params)
34
28
  end
@@ -54,22 +48,11 @@ module Calendlyr
54
48
  end
55
49
 
56
50
  def handle_response(response)
51
+ return true unless response.read_body
52
+
57
53
  body = JSON.parse(response.read_body)
58
- case response.code
59
- when 400
60
- raise Error, "#{body["title"]}. #{body["message"]}"
61
- when 401
62
- raise Error, "#{body["title"]}. #{body["message"]}"
63
- when 403
64
- raise Error, "#{body["title"]}. #{body["message"]}"
65
- when 404
66
- raise Error, "#{body["title"]}. #{body["message"]}"
67
- when 429
68
- raise Error, "#{body["title"]}. #{body["message"]}"
69
- when 500
70
- raise Error, "#{body["title"]}. #{body["message"]}"
71
- when 503
72
- raise Error, "#{body["title"]}. #{body["message"]}"
54
+ if ERROR_CODES.include? response.code
55
+ raise Error, "[Error #{response.code}] #{body["title"]}. #{body["message"]}"
73
56
  else
74
57
  body
75
58
  end
@@ -1,7 +1,7 @@
1
1
  module Calendlyr
2
2
  class OrganizationResource < Resource
3
3
  def invite(organization_uuid:, email:)
4
- Invitation.new post_request("organizations/#{organization_uuid}/invitations", body: {email: email}).merge(client: client)
4
+ Invitation.new post_request("organizations/#{organization_uuid}/invitations", body: {email: email}).dig("resource").merge(client: client)
5
5
  end
6
6
 
7
7
  def list_invitations(organization_uuid:, **params)
@@ -1,3 +1,3 @@
1
1
  module Calendlyr
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -2,7 +2,10 @@ require "test_helper"
2
2
 
3
3
  class ClientTest < Minitest::Test
4
4
  def test_token
5
- client = Calendlyr::Client.new token: "test"
6
- assert_equal "test", client.token
5
+ assert_equal "fake", client.token
6
+ end
7
+
8
+ def test_inspect
9
+ assert_equal "#<Calendlyr::Client>", client.inspect
7
10
  end
8
11
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ class ResourceTest < Minitest::Test
6
+ def test_handle_response_error
7
+ error_code = Calendlyr::Resource::ERROR_CODES.sample
8
+ stub(path: "users/me", response: {body: fixture_file("resources/#{error_code}"), status: error_code.to_i})
9
+
10
+ assert_raises Calendlyr::Error do
11
+ client.me
12
+ end
13
+ end
14
+ end
@@ -40,25 +40,47 @@ class OrganizationsResourceTest < Minitest::Test
40
40
  assert_equal "sNjq4TvMDfUHEl7zHRR0k0E1PCEJWvdi", memberships.next_page_token
41
41
  end
42
42
 
43
+ def test_list_webhooks
44
+ stub(path: "webhook_subscriptions?organization=#{client.organization.uri}&scope=user", response: {body: fixture_file("webhooks/list"), status: 200})
45
+ webhooks = client.organization.list_webhooks(scope: "user")
46
+
47
+ assert_equal Calendlyr::Collection, webhooks.class
48
+ assert_equal Calendlyr::Webhook, webhooks.data.first.class
49
+ assert_equal 1, webhooks.count
50
+ assert_equal "sNjq4TvMDfUHEl7zHRR0k0E1PCEJWvdi", webhooks.next_page_token
51
+ end
52
+
53
+ def test_create_webhook
54
+ body = {url: "https://blah.foo/bar", events: ["invitee.created"], organization: client.organization.uri, scope: "user", user: client.me.uri}
55
+ stub(method: :post, path: "webhook_subscriptions", body: body, response: {body: fixture_file("webhooks/create"), status: 201})
56
+
57
+ assert client.webhooks.create(url: body[:url], events: body[:events], organization_uri: body[:organization], scope: body[:scope], user_uri: body[:user])
58
+ end
59
+
43
60
  def test_retrieve_invitation
44
- organization_uuid = "AAAAAAAAAAAAAAAA"
45
61
  invitation_uuid = "AAAAAAAAAAAAAAAA"
46
- response = {body: fixture_file("organizations/retrieve_invitation"), status: 200}
47
- stub(path: "organizations/#{organization_uuid}/invitations/#{invitation_uuid}", response: response)
48
- invitation = client.organizations.retrieve_invitation(organization_uuid: organization_uuid, invitation_uuid: invitation_uuid)
62
+
63
+ stub(path: "organizations/#{client.organization.uuid}/invitations/#{invitation_uuid}", response: {body: fixture_file("organizations/retrieve_invitation"), status: 200})
64
+ stub(method: :delete, path: "organizations/#{client.organization.uuid}/invitations/#{invitation_uuid}", response: {body: fixture_file("organizations/revoke_invitation")})
65
+ invitation = client.organizations.retrieve_invitation(organization_uuid: client.organization.uuid, invitation_uuid: invitation_uuid)
49
66
 
50
67
  assert_equal Calendlyr::Invitation, invitation.class
51
68
  assert_equal "test@example.com", invitation.email
69
+
70
+ assert invitation.associated_organization
71
+ assert invitation.revoke
52
72
  end
53
73
 
54
74
  def test_retrieve_membership
55
75
  membership_uuid = "AAAAAAAAAAAAAAAA"
56
76
  response = {body: fixture_file("organizations/retrieve_membership"), status: 200}
57
77
  stub(path: "organization_memberships/#{membership_uuid}", response: response)
78
+ stub(path: "users/#{membership_uuid}", response: {body: fixture_file("users/retrieve"), status: 200})
58
79
  membership = client.organizations.retrieve_membership(membership_uuid: membership_uuid)
59
80
 
60
81
  assert_equal Calendlyr::Membership, membership.class
61
82
  assert_equal "test@example.com", membership.user.email
83
+ assert_equal membership.associated_user, client.users.retrieve(user_uuid: membership_uuid)
62
84
  end
63
85
 
64
86
  def test_revoke_invitation
@@ -77,8 +99,6 @@ class OrganizationsResourceTest < Minitest::Test
77
99
  end
78
100
 
79
101
  def test_organization_invite_user
80
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
81
-
82
102
  email = "email@example.com"
83
103
  response = {body: fixture_file("organizations/invite"), status: 201}
84
104
  stub(method: :post, path: "organizations/#{client.organization.uuid}/invitations", body: {email: email}, response: response)
@@ -90,7 +110,6 @@ class OrganizationsResourceTest < Minitest::Test
90
110
  end
91
111
 
92
112
  def test_organization_list_invitations
93
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
94
113
  stub(path: "organizations/#{client.organization.uuid}/invitations", response: {body: fixture_file("organizations/list_invitations"), status: 200})
95
114
  invitations = client.organization.list_invitations
96
115
 
@@ -101,13 +120,11 @@ class OrganizationsResourceTest < Minitest::Test
101
120
  end
102
121
 
103
122
  def test_organization_revoke_invitation
104
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
105
123
  stub(method: :delete, path: "organizations/#{client.organization.uuid}/invitations/AAAAAAAAAAAAAAAA", response: {body: fixture_file("organizations/revoke_invitation")})
106
124
  assert client.organization.revoke_invitation(invitation_uuid: "AAAAAAAAAAAAAAAA")
107
125
  end
108
126
 
109
127
  def test_organization_invitation
110
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
111
128
  response = {body: fixture_file("organizations/retrieve_invitation"), status: 200}
112
129
  stub(path: "organizations/#{client.organization.uuid}/invitations/AAAAAAAAAAAAAAAA", response: response)
113
130
  invitation = client.organization.invitation(invitation_uuid: "AAAAAAAAAAAAAAAA")
@@ -117,7 +134,6 @@ class OrganizationsResourceTest < Minitest::Test
117
134
  end
118
135
 
119
136
  def test_organization_events
120
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
121
137
  stub(path: "scheduled_events?organization=#{client.organization.uri}", response: {body: fixture_file("events/list"), status: 200})
122
138
  events = client.organization.events
123
139
 
@@ -128,7 +144,6 @@ class OrganizationsResourceTest < Minitest::Test
128
144
  end
129
145
 
130
146
  def test_organization_memberships
131
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
132
147
  stub(path: "organization_memberships?organization=#{client.organization.uri}", response: {body: fixture_file("organizations/list_memberships"), status: 200})
133
148
  memberships = client.organization.memberships
134
149
 
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ class SchedulingLinksResourceTest < Minitest::Test
6
+ def test_create
7
+ owner_uri = "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2"
8
+ max_event_count = 20
9
+ owner_type = "EventType"
10
+ response = {body: fixture_file("scheduling_links/create"), status: 201}
11
+ stub(method: :post, path: "scheduling_links", body: {owner: owner_uri, max_event_count: max_event_count, owner_type: owner_type}, response: response)
12
+
13
+ assert client.scheduling_links.create(owner_uri: owner_uri, max_event_count: max_event_count, owner_type: owner_type)
14
+ end
15
+ end
@@ -37,7 +37,6 @@ class UsersResourceTest < Minitest::Test
37
37
  end
38
38
 
39
39
  def test_me_caching_reload
40
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
41
40
  me = client.me
42
41
  stub(path: "users/me", response: {body: fixture_file("users/reload"), status: 200})
43
42
  reloaded_me = client.me(force_reload: true)
@@ -55,7 +54,6 @@ class UsersResourceTest < Minitest::Test
55
54
  end
56
55
 
57
56
  def test_event_types
58
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
59
57
  me = client.me
60
58
 
61
59
  stub(path: "event_types?user=#{me.uri}&organization=#{me.organization.uri}", response: {body: fixture_file("event_types/list"), status: 200})
@@ -68,7 +66,6 @@ class UsersResourceTest < Minitest::Test
68
66
  end
69
67
 
70
68
  def test_events
71
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
72
69
  me = client.me
73
70
 
74
71
  stub(path: "scheduled_events?user=#{me.uri}&organization=#{me.organization.uri}", response: {body: fixture_file("events/list"), status: 200})
@@ -81,7 +78,6 @@ class UsersResourceTest < Minitest::Test
81
78
  end
82
79
 
83
80
  def test_memberships
84
- stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
85
81
  me = client.me
86
82
 
87
83
  stub(path: "organization_memberships?user=#{me.uri}&organization=#{me.organization.uri}", response: {body: fixture_file("organizations/list_memberships"), status: 200})
@@ -21,16 +21,19 @@ class WebhooksResourceTest < Minitest::Test
21
21
  stub(method: :post, path: "webhook_subscriptions", body: body, response: {body: fixture_file("webhooks/create"), status: 201})
22
22
 
23
23
  assert client.webhooks.create(url: body[:url], events: body[:events], organization_uri: body[:organization], scope: body[:scope], user_uri: body[:user])
24
+ assert client.organization.create_webhook(url: body[:url], events: body[:events], scope: body[:scope], user_uri: body[:user])
24
25
  end
25
26
 
26
27
  def test_retrieve
27
28
  webhook_uuid = "AAAAAAAAAAAAAAAA"
28
- response = {body: fixture_file("webhooks/retrieve"), status: 200}
29
- stub(path: "webhook_subscriptions/#{webhook_uuid}", response: response)
29
+ stub(path: "webhook_subscriptions/#{webhook_uuid}", response: {body: fixture_file("webhooks/retrieve"), status: 200})
30
+ stub(path: "users/AAAAAAAAAAAAAAAA", response: {body: fixture_file("users/retrieve"), status: 200})
30
31
  webhook = client.webhooks.retrieve(webhook_uuid: webhook_uuid)
31
32
 
32
33
  assert_equal Calendlyr::Webhook, webhook.class
33
34
  assert_equal "user", webhook.scope
35
+ assert_equal webhook.associated_user, client.users.retrieve(user_uuid: "AAAAAAAAAAAAAAAA")
36
+ assert_equal webhook.associated_organization, client.users.retrieve(user_uuid: "AAAAAAAAAAAAAAAA").organization
34
37
  end
35
38
 
36
39
  def test_delete
@@ -1,9 +1,11 @@
1
1
  {
2
- "created_at": "2020-01-01T20:30:00Z",
3
- "email": "email@example.com",
4
- "last_sent_at": "2020-01-01T20:30:00Z",
5
- "organization": "https://api.calendly.com/organizations/ABCDABCDABCDABCD",
6
- "status": "pending",
7
- "updated_at": "2020-01-01T20:30:00Z",
8
- "uri": "https://api.calendly.com/organizations/ABCDABCDABCDABCD/invitations/DCBADCBADCBADCBA"
2
+ "resource": {
3
+ "created_at": "2020-01-01T20:30:00Z",
4
+ "email": "email@example.com",
5
+ "last_sent_at": "2020-01-01T20:30:00Z",
6
+ "organization": "https://api.calendly.com/organizations/ABCDABCDABCDABCD",
7
+ "status": "pending",
8
+ "updated_at": "2020-01-01T20:30:00Z",
9
+ "uri": "https://api.calendly.com/organizations/ABCDABCDABCDABCD/invitations/DCBADCBADCBADCBA"
10
+ }
9
11
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "collection": [
3
3
  {
4
- "uri": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA/invitations",
4
+ "uri": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA/invitations/AAAAAAAAAAAAAAAA",
5
5
  "organization": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA",
6
6
  "email": "test@example.com",
7
7
  "status": "accepted",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "resource": {
3
- "uri": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA/invitations",
3
+ "uri": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA/invitations/AAAAAAAAAAAAAAAA",
4
4
  "organization": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA",
5
5
  "email": "test@example.com",
6
6
  "status": "accepted",
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Unauthenticated",
3
+ "message": "The access token is invalid",
4
+ "details": [
5
+ {
6
+ "parameter": "string",
7
+ "message": "string"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Invalid Argument",
3
+ "message": "The supplied parameters are invalid.",
4
+ "details": [
5
+ {
6
+ "parameter": "string",
7
+ "message": "string"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Permission Denied",
3
+ "message": "This user is not in your organization",
4
+ "details": [
5
+ {
6
+ "parameter": "string",
7
+ "message": "string"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Resource Not Found",
3
+ "message": "The server could not find the requested resource.",
4
+ "details": [
5
+ {
6
+ "parameter": "string",
7
+ "message": "string"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "title": "Already Exists",
3
+ "message": "Hook with this url already exists"
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "title": "Internal Server Error",
3
+ "message": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
4
+ "details": [
5
+ {
6
+ "parameter": "string",
7
+ "message": "string"
8
+ }
9
+ ]
10
+ }
data/test/test_helper.rb CHANGED
@@ -11,6 +11,11 @@ require "minitest/autorun"
11
11
  require "webmock/minitest"
12
12
 
13
13
  class Minitest::Test
14
+ def initialize(name)
15
+ stub(path: "users/me", response: {body: fixture_file("users/retrieve"), status: 200})
16
+ super
17
+ end
18
+
14
19
  def client
15
20
  @client ||= Calendlyr::Client.new(token: "fake")
16
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendlyr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - araluce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -141,12 +141,13 @@ files:
141
141
  - lib/calendlyr/version.rb
142
142
  - test/calendlyr/client_test.rb
143
143
  - test/calendlyr/object_test.rb
144
- - test/calendlyr/resources/data_compliance.rb
144
+ - test/calendlyr/resource_test.rb
145
+ - test/calendlyr/resources/data_compliance_test.rb
145
146
  - test/calendlyr/resources/event_invitees_test.rb
146
147
  - test/calendlyr/resources/event_types_test.rb
147
148
  - test/calendlyr/resources/events_test.rb
148
149
  - test/calendlyr/resources/organizations_test.rb
149
- - test/calendlyr/resources/scheduling_links.rb
150
+ - test/calendlyr/resources/scheduling_links_test.rb
150
151
  - test/calendlyr/resources/users_test.rb
151
152
  - test/calendlyr/resources/webhooks_test.rb
152
153
  - test/calendlyr_test.rb
@@ -164,6 +165,12 @@ files:
164
165
  - test/fixtures/organizations/retrieve_invitation.json
165
166
  - test/fixtures/organizations/retrieve_membership.json
166
167
  - test/fixtures/organizations/revoke_invitation.json
168
+ - test/fixtures/resources/400.json
169
+ - test/fixtures/resources/401.json
170
+ - test/fixtures/resources/403.json
171
+ - test/fixtures/resources/404.json
172
+ - test/fixtures/resources/409.json
173
+ - test/fixtures/resources/500.json
167
174
  - test/fixtures/scheduling_links/create.json
168
175
  - test/fixtures/users/reload.json
169
176
  - test/fixtures/users/retrieve.json
@@ -199,12 +206,13 @@ summary: Ruby bindings for Calendly API.
199
206
  test_files:
200
207
  - test/calendlyr/client_test.rb
201
208
  - test/calendlyr/object_test.rb
202
- - test/calendlyr/resources/data_compliance.rb
209
+ - test/calendlyr/resource_test.rb
210
+ - test/calendlyr/resources/data_compliance_test.rb
203
211
  - test/calendlyr/resources/event_invitees_test.rb
204
212
  - test/calendlyr/resources/event_types_test.rb
205
213
  - test/calendlyr/resources/events_test.rb
206
214
  - test/calendlyr/resources/organizations_test.rb
207
- - test/calendlyr/resources/scheduling_links.rb
215
+ - test/calendlyr/resources/scheduling_links_test.rb
208
216
  - test/calendlyr/resources/users_test.rb
209
217
  - test/calendlyr/resources/webhooks_test.rb
210
218
  - test/calendlyr_test.rb
@@ -222,6 +230,12 @@ test_files:
222
230
  - test/fixtures/organizations/retrieve_invitation.json
223
231
  - test/fixtures/organizations/retrieve_membership.json
224
232
  - test/fixtures/organizations/revoke_invitation.json
233
+ - test/fixtures/resources/400.json
234
+ - test/fixtures/resources/401.json
235
+ - test/fixtures/resources/403.json
236
+ - test/fixtures/resources/404.json
237
+ - test/fixtures/resources/409.json
238
+ - test/fixtures/resources/500.json
225
239
  - test/fixtures/scheduling_links/create.json
226
240
  - test/fixtures/users/reload.json
227
241
  - test/fixtures/users/retrieve.json
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "test_helper"
4
-
5
- class SchedulingLinksResourceTest < Minitest::Test
6
- def test_create
7
- body = {owner_uri: "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2", max_event_count: 20, owner_type: "EventType"}
8
- stub(method: :post, path: "scheduling_links", body: body, response: {body: fixture_file("scheduling_links/create"), status: 201})
9
-
10
- assert client.data_compliance.delete_invitee_data(**body)
11
- end
12
- end