calendlyr 0.7.4 → 0.10.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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +9 -5
  3. data/.gitignore +2 -1
  4. data/CHANGELOG.md +66 -0
  5. data/README.md +31 -79
  6. data/calendlyr.gemspec +6 -7
  7. data/docs/resources/data_compliance.md +1 -1
  8. data/docs/resources/event_types/availability_schedule.md +28 -0
  9. data/docs/resources/event_types/event_type.md +18 -7
  10. data/docs/resources/events/cancellation.md +1 -1
  11. data/docs/resources/events/event.md +2 -2
  12. data/docs/resources/events/invitee.md +17 -0
  13. data/docs/resources/locations/location.md +16 -0
  14. data/docs/resources/organizations/organization.md +0 -9
  15. data/docs/resources/share.md +2 -9
  16. data/docs/resources/webhooks/invitee_payload.md +1 -1
  17. data/docs/resources/webhooks/payload.md +1 -1
  18. data/docs/resources/webhooks/subscription.md +1 -1
  19. data/lib/calendlyr/client.rb +20 -45
  20. data/lib/calendlyr/collection.rb +18 -3
  21. data/lib/calendlyr/error.rb +17 -26
  22. data/lib/calendlyr/object.rb +77 -14
  23. data/lib/calendlyr/objects/event_type.rb +0 -4
  24. data/lib/calendlyr/objects/event_types/availability_schedule.rb +8 -0
  25. data/lib/calendlyr/objects/events/invitee.rb +1 -1
  26. data/lib/calendlyr/objects/location.rb +4 -0
  27. data/lib/calendlyr/objects/organization.rb +0 -4
  28. data/lib/calendlyr/objects/share.rb +0 -5
  29. data/lib/calendlyr/resource.rb +34 -7
  30. data/lib/calendlyr/resources/event_types.rb +37 -0
  31. data/lib/calendlyr/resources/{event.rb → events.rb} +6 -1
  32. data/lib/calendlyr/resources/{group.rb → groups.rb} +1 -1
  33. data/lib/calendlyr/resources/locations.rb +8 -0
  34. data/lib/calendlyr/resources/{organization.rb → organizations.rb} +1 -1
  35. data/lib/calendlyr/resources/{routing_form.rb → routing_forms.rb} +1 -1
  36. data/lib/calendlyr/resources/{share.rb → shares.rb} +1 -1
  37. data/lib/calendlyr/resources/{user.rb → users.rb} +1 -1
  38. data/lib/calendlyr/resources/{webhook.rb → webhooks.rb} +1 -5
  39. data/lib/calendlyr/version.rb +1 -1
  40. data/lib/calendlyr.rb +15 -15
  41. data/test/calendlyr/client_test.rb +25 -0
  42. data/test/calendlyr/collection_test.rb +64 -0
  43. data/test/calendlyr/object_test.rb +32 -1
  44. data/test/calendlyr/objects/event_type_test.rb +0 -15
  45. data/test/calendlyr/objects/event_types/availability_schedule_test.rb +20 -0
  46. data/test/calendlyr/objects/events/cancellation_test.rb +1 -1
  47. data/test/calendlyr/objects/events/guest_test.rb +1 -1
  48. data/test/calendlyr/objects/events/invitee_no_show_test.rb +1 -1
  49. data/test/calendlyr/objects/events/invitee_test.rb +10 -3
  50. data/test/calendlyr/objects/location_test.rb +22 -0
  51. data/test/calendlyr/objects/organization_test.rb +0 -8
  52. data/test/calendlyr/objects/organizations/invitation_test.rb +1 -1
  53. data/test/calendlyr/objects/share_test.rb +3 -9
  54. data/test/calendlyr/resource_test.rb +178 -2
  55. data/test/calendlyr/resources/data_compliance_test.rb +1 -4
  56. data/test/calendlyr/resources/event_types_test.rb +48 -0
  57. data/test/calendlyr/resources/events_test.rb +19 -0
  58. data/test/calendlyr/resources/locations_test.rb +18 -0
  59. data/test/calendlyr/resources/webhooks_test.rb +0 -8
  60. data/test/fixtures/event_invitees/retrieve.json +11 -1
  61. data/test/fixtures/event_type_availability_schedules/list.json +17 -0
  62. data/test/fixtures/event_type_availability_schedules/update.json +3 -0
  63. data/test/fixtures/event_types/create.json +30 -0
  64. data/test/fixtures/event_types/update.json +30 -0
  65. data/test/fixtures/events/create_invitee.json +37 -0
  66. data/test/fixtures/events/retrieve.json +12 -2
  67. data/test/fixtures/locations/list.json +16 -0
  68. data/test/fixtures/objects/event.json +10 -2
  69. data/test/fixtures/objects/event_types/availability_schedule.json +6 -0
  70. data/test/fixtures/objects/location.json +5 -0
  71. data/test/test_helper.rb +9 -7
  72. metadata +47 -65
  73. data/docs/resources/event_types/available_time.md +0 -21
  74. data/docs/resources/event_types/membership.md +0 -29
  75. data/docs/resources/scheduling_link.md +0 -26
  76. data/lib/calendlyr/objects/event_types/available_time.rb +0 -4
  77. data/lib/calendlyr/objects/event_types/membership.rb +0 -11
  78. data/lib/calendlyr/objects/scheduling_link.rb +0 -9
  79. data/lib/calendlyr/resources/event_type.rb +0 -28
  80. data/lib/calendlyr/resources/outgoing_communication.rb +0 -8
  81. data/lib/calendlyr/resources/scheduling_link.rb +0 -8
  82. data/test/calendlyr/objects/event_types/available_time_test.rb +0 -20
  83. data/test/calendlyr/objects/event_types/membership_test.rb +0 -32
  84. data/test/calendlyr/objects/scheduling_link_test.rb +0 -17
  85. data/test/calendlyr/resources/event_types/membership_test.rb +0 -22
  86. data/test/calendlyr/resources/outgoing_communications_test.rb +0 -16
  87. data/test/calendlyr/resources/scheduling_links_test.rb +0 -15
  88. data/test/fixtures/event_type_available_times/list.json +0 -22
  89. data/test/fixtures/objects/event_types/available_time.json +0 -6
  90. data/test/fixtures/objects/event_types/membership.json +0 -65
  91. data/test/fixtures/objects/scheduling_links/event_type.json +0 -5
  92. data/test/fixtures/outgoing_communications/list.json +0 -26
  93. data/test/fixtures/scheduling_links/create.json +0 -7
  94. data/test/fixtures/webhooks/sample.json +0 -105
@@ -1,15 +0,0 @@
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: owner_uri, max_event_count: max_event_count, owner_type: owner_type)
14
- end
15
- end
@@ -1,22 +0,0 @@
1
- {
2
- "collection": [
3
- {
4
- "status": "available",
5
- "invitees_remaining": 2,
6
- "start_time": "2020-01-02T20:00:00.000000Z",
7
- "scheduling_url": "https://calendly.com/acmesales/discovery-call/2020-01-02T20:00:00Z?month=2020-01&date=2020-01-02"
8
- },
9
- {
10
- "status": "available",
11
- "invitees_remaining": 1,
12
- "start_time": "2020-01-03T15:00:00.000000Z",
13
- "scheduling_url": "https://calendly.com/acmesales/discovery-call/2020-01-03T15:00:00Z?month=2020-01&date=2020-01-03"
14
- },
15
- {
16
- "status": "available",
17
- "invitees_remaining": 3,
18
- "start_time": "2020-01-07T23:00:00.000000Z",
19
- "scheduling_url": "https://calendly.com/acmesales/discovery-call/2020-01-07T23:00:00Z?month=2020-01&date=2020-01-07"
20
- }
21
- ]
22
- }
@@ -1,6 +0,0 @@
1
- {
2
- "status": "available",
3
- "invitees_remaining": 2,
4
- "start_time": "2020-01-02T20:00:00.000000Z",
5
- "scheduling_url": "https://calendly.com/acmesales/discovery-call/2020-01-02T20:00:00Z?month=2020-01&date=2020-01-02"
6
- }
@@ -1,65 +0,0 @@
1
- {
2
- "uri": "https://api.calendly.com/event_type_memberships/AAAAAAAAAAAAAAAA",
3
- "event_type": {
4
- "uri": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
5
- "name": "15 Minute Meeting",
6
- "active": true,
7
- "slug": "acmesales",
8
- "scheduling_url": "https://calendly.com/acmesales",
9
- "duration": 30,
10
- "kind": "solo",
11
- "pooling_type": "round_robin",
12
- "type": "StandardEventType",
13
- "color": "#fff200",
14
- "created_at": "2019-01-02T03:04:05.678123Z",
15
- "updated_at": "2019-08-07T06:05:04.321123Z",
16
- "internal_note": "Internal note",
17
- "description_plain": "15 Minute Meeting",
18
- "description_html": "<p>15 Minute Meeting</p>",
19
- "profile": {
20
- "type": "User",
21
- "name": "Tamara Jones",
22
- "owner": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
23
- },
24
- "secret": true,
25
- "booking_method": "poll",
26
- "custom_questions": [
27
- {
28
- "name": "string",
29
- "type": "string",
30
- "position": 0,
31
- "enabled": true,
32
- "required": true,
33
- "answer_choices": [
34
- "string"
35
- ],
36
- "include_other": true
37
- }
38
- ],
39
- "deleted_at": "2019-01-02T03:04:05.678123Z",
40
- "admin_managed": true,
41
- "locations": [
42
- {
43
- "kind": "inbound_call",
44
- "phone_number": 380934567654,
45
- "additional_info": "Additional information about location"
46
- }
47
- ],
48
- "position": 0
49
- },
50
- "member": {
51
- "uri": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
52
- "name": "John Doe",
53
- "slug": "acmesales",
54
- "email": "test@example.com",
55
- "scheduling_url": "https://calendly.com/acmesales",
56
- "timezone": "America/New York",
57
- "avatar_url": "https://01234567890.cloudfront.net/uploads/user/avatar/0123456/a1b2c3d4.png",
58
- "created_at": "2019-01-02T03:04:05.678123Z",
59
- "updated_at": "2019-08-07T06:05:04.321123Z",
60
- "current_organization": "https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA",
61
- "resource_type": "User"
62
- },
63
- "updated_at": "2019-01-02T03:04:05.678123Z",
64
- "created_at": "2019-01-02T03:04:05.678123Z"
65
- }
@@ -1,5 +0,0 @@
1
- {
2
- "booking_url": "https://calendly.com/d/abcd-brv8/15-minute-meeting",
3
- "owner": "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2",
4
- "owner_type": "EventType"
5
- }
@@ -1,26 +0,0 @@
1
- {
2
- "collection": [
3
- {
4
- "type": "sms",
5
- "to": "+14047549876",
6
- "from": "+14042916667",
7
- "subject": "",
8
- "body": "Your scheduled event is coming up.",
9
- "sender_uri": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
10
- "sender_email": "user@example.com",
11
- "event_type_uri": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA",
12
- "event_uri": "https://api.calendly.com/scheduled_events/ABCDABCDABCDABCD",
13
- "sent_at": "2023-09-24T11:12:13.145Z",
14
- "created_at": "2023-09-24T11:12:13.145Z",
15
- "scheduling_url": "https://calendly.com/event/name"
16
- }
17
- ],
18
- "pagination": {
19
- "count": 20,
20
- "next_page": "https://api.calendly.com/event_types?count=1&page_token=sNjq4TvMDfUHEl7zHRR0k0E1PCEJWvdi",
21
- "previous_page": "https://api.calendly.com/event_types?count=1&page_token=VJs2rfDYeY8ahZpq0QI1O114LJkNjd7H",
22
- "next_page_token": "sNjq4TvMDfUHEl7zHRR0k0E1PCEJWvdi",
23
- "previous_page_token": "VJs2rfDYeY8ahZpq0QI1O114LJkNjd7H"
24
- },
25
- "total_count": 0
26
- }
@@ -1,7 +0,0 @@
1
- {
2
- "resource": {
3
- "booking_url": "https://calendly.com/d/abcd-brv8/15-minute-meeting",
4
- "owner": "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2",
5
- "owner_type": "EventType"
6
- }
7
- }
@@ -1,105 +0,0 @@
1
- {
2
- "event": "invitee.created",
3
- "created_at": "2019-08-24T14:15:22Z",
4
- "created_by": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
5
- "payload": {
6
- "uri": "https://calendly.com/scheduled_events/AAAAAAAAAAAAAAAA/invitees/AAAAAAAAAAAAAAAA",
7
- "email": "test@example.com",
8
- "first_name": "John",
9
- "last_name": "Doe",
10
- "name": "John Doe",
11
- "status": "active",
12
- "questions_and_answers": [
13
- {
14
- "question": "string",
15
- "answer": "string",
16
- "position": 0
17
- }
18
- ],
19
- "timezone": "string",
20
- "event": "https://api.calendly.com/scheduled_events/AAAAAAAAAAAAAAAA",
21
- "created_at": "2019-01-02T03:04:05.678123Z",
22
- "updated_at": "2019-08-07T06:05:04.321123Z",
23
- "tracking": {
24
- "utm_campaign": "string",
25
- "utm_source": "string",
26
- "utm_medium": "string",
27
- "utm_content": "string",
28
- "utm_term": "string",
29
- "salesforce_uuid": "string"
30
- },
31
- "text_reminder_number": "+1 404-555-1234",
32
- "rescheduled": true,
33
- "old_invitee": "http://example.com",
34
- "new_invitee": "http://example.com",
35
- "cancel_url": "http://example.com",
36
- "reschedule_url": "http://example.com",
37
- "routing_form_submission": "https://api.calendly.com/routing_form_submissions/AAAAAAAAAAAAAAAA",
38
- "cancellation": {
39
- "canceled_by": "string",
40
- "reason": "string",
41
- "canceler_type": "host",
42
- "created_at": "2019-01-02T03:04:05.678123Z"
43
- },
44
- "payment": {
45
- "external_id": "string",
46
- "provider": "stripe",
47
- "amount": 0,
48
- "currency": "AUD",
49
- "terms": "sample terms of payment (up to 1,024 characters)",
50
- "successful": true
51
- },
52
- "no_show": {
53
- "uri": "string",
54
- "created_at": "2019-01-02T03:04:05.678123Z"
55
- },
56
- "reconfirmation": {
57
- "created_at": "2020-11-23T17:51:18.341657Z",
58
- "confirmed_at": "2020-11-23T17:51:18.341657Z"
59
- },
60
- "scheduling_method": "instant_book",
61
- "invitee_scheduled_by": "http://example.com",
62
- "scheduled_event": {
63
- "uri": "https://api.calendly.com/scheduled_events/GBGBDCAADAEDCRZ2",
64
- "name": "15 Minute Meeting",
65
- "meeting_notes_plain": "15 Minute Meeting",
66
- "meeting_notes_html": "<p>15 Minute Meeting</p>",
67
- "status": "active",
68
- "start_time": "2019-08-24T14:15:22Z",
69
- "end_time": "2019-08-24T14:15:22Z",
70
- "event_type": "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2",
71
- "location": {
72
- "type": "physical",
73
- "location": "Calendly Office",
74
- "additional_info": "Please check in at the main lobby."
75
- },
76
- "invitees_counter": {
77
- "total": 0,
78
- "active": 0,
79
- "limit": 0
80
- },
81
- "created_at": "2019-01-02T03:04:05.678123Z",
82
- "updated_at": "2019-01-02T03:04:05.678123Z",
83
- "event_memberships": [
84
- {
85
- "user": "https://api.calendly.com/users/GBGBDCAADAEDCRZ2",
86
- "user_email": "user@example.com",
87
- "user_name": "John Smith"
88
- }
89
- ],
90
- "event_guests": [
91
- {
92
- "email": "user@example.com",
93
- "created_at": "2019-08-24T14:15:22Z",
94
- "updated_at": "2019-08-24T14:15:22Z"
95
- }
96
- ],
97
- "cancellation": {
98
- "canceled_by": "string",
99
- "reason": "string",
100
- "canceler_type": "host",
101
- "created_at": "2019-01-02T03:04:05.678123Z"
102
- }
103
- }
104
- }
105
- }