youcanbookme 0.0.3.alpha → 0.0.4.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/{.rubocom.yml → .rubocop.yml} +12 -9
  3. data/CHANGELOG.md +15 -6
  4. data/README.md +17 -20
  5. data/lib/youcanbookme/client.rb +3 -5
  6. data/lib/youcanbookme/models/account.rb +153 -13
  7. data/lib/youcanbookme/models/account_allocation.rb +22 -0
  8. data/lib/youcanbookme/models/account_child.rb +20 -0
  9. data/lib/youcanbookme/models/{caligraph_safe_local_account.rb → account_parent.rb} +3 -2
  10. data/lib/youcanbookme/models/action.rb +5 -0
  11. data/lib/youcanbookme/models/answer.rb +0 -1
  12. data/lib/youcanbookme/models/booking.rb +8 -4
  13. data/lib/youcanbookme/models/booking_lobby.rb +2 -1
  14. data/lib/youcanbookme/models/calendar.rb +1 -1
  15. data/lib/youcanbookme/models/card.rb +0 -1
  16. data/lib/youcanbookme/models/event.rb +6 -9
  17. data/lib/youcanbookme/models/{participant.rb → event_participant.rb} +3 -2
  18. data/lib/youcanbookme/models/{reminder.rb → event_reminder.rb} +3 -3
  19. data/lib/youcanbookme/models/link.rb +0 -1
  20. data/lib/youcanbookme/models/name_and_address.rb +0 -1
  21. data/lib/youcanbookme/models/permission.rb +17 -5
  22. data/lib/youcanbookme/models/profile.rb +4 -3
  23. data/lib/youcanbookme/models/{profile_local_account.rb → profile_account.rb} +1 -2
  24. data/lib/youcanbookme/models/profile_afterwards.rb +0 -1
  25. data/lib/youcanbookme/models/profile_appointment_type.rb +0 -1
  26. data/lib/youcanbookme/models/profile_appointment_types.rb +0 -1
  27. data/lib/youcanbookme/models/profile_calendar.rb +6 -1
  28. data/lib/youcanbookme/models/profile_calendars.rb +0 -1
  29. data/lib/youcanbookme/models/profile_cancel_or_reschedule.rb +0 -1
  30. data/lib/youcanbookme/models/profile_display.rb +0 -1
  31. data/lib/youcanbookme/models/profile_payments.rb +1 -1
  32. data/lib/youcanbookme/models/profile_remote_account.rb +3 -2
  33. data/lib/youcanbookme/models/profile_remote_reminder.rb +0 -1
  34. data/lib/youcanbookme/models/profile_team_member.rb +0 -1
  35. data/lib/youcanbookme/models/profile_team_members.rb +1 -1
  36. data/lib/youcanbookme/models/profile_tentative.rb +0 -2
  37. data/lib/youcanbookme/models/profile_times.rb +1 -1
  38. data/lib/youcanbookme/models/profile_vouchers.rb +0 -1
  39. data/lib/youcanbookme/models/provider.rb +0 -1
  40. data/lib/youcanbookme/models/purchase.rb +8 -4
  41. data/lib/youcanbookme/models/purchases_sync_changes.rb +0 -1
  42. data/lib/youcanbookme/models/question.rb +1 -0
  43. data/lib/youcanbookme/models/remote_account.rb +8 -4
  44. data/lib/youcanbookme/models/template_event.rb +0 -1
  45. data/lib/youcanbookme/models/transaction.rb +6 -3
  46. data/lib/youcanbookme/models/warning.rb +0 -1
  47. data/lib/youcanbookme/version.rb +1 -1
  48. metadata +10 -19
  49. data/lib/youcanbookme/models/appointment_type.rb +0 -7
  50. data/lib/youcanbookme/models/caligraph_calendar.rb +0 -29
  51. data/lib/youcanbookme/models/caligraph_event.rb +0 -8
  52. data/lib/youcanbookme/models/caligraph_link.rb +0 -17
  53. data/lib/youcanbookme/models/caligraph_local_account.rb +0 -47
  54. data/lib/youcanbookme/models/caligraph_permission.rb +0 -32
  55. data/lib/youcanbookme/models/caligraph_remote_account.rb +0 -23
  56. data/lib/youcanbookme/models/instant.rb +0 -9
  57. data/lib/youcanbookme/models/local_account.rb +0 -180
  58. data/lib/youcanbookme/models/query.rb +0 -8
  59. data/lib/youcanbookme/models/team_member.rb +0 -8
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ class AccountChild
5
+ include ModelUtils
6
+
7
+ ASSOCIATION = {
8
+ profiles: Profile
9
+ }.freeze
10
+
11
+ # @return [String]
12
+ attr_accessor :email
13
+ # @return [String]
14
+ attr_accessor :id
15
+ # @return [Boolean]
16
+ attr_accessor :parentId
17
+ # @return [Array<Profile>]
18
+ attr_accessor :profiles
19
+ end
20
+ end
@@ -1,13 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's CaligraphSafeLocalAccount model.
5
- class CaligraphSafeLocalAccount
4
+ class AccountParent
6
5
  include ModelUtils
7
6
 
8
7
  # @return [String]
9
8
  attr_accessor :email
10
9
  # @return [String]
11
10
  attr_accessor :id
11
+ # @return [Integer]
12
+ attr_accessor :quantityPaidFor
12
13
  end
13
14
  end
@@ -8,6 +8,9 @@ module YouCanBookMe
8
8
  # @return [String]
9
9
  attr_accessor :accountId
10
10
  # @return [String]
11
+ # ['BOOKING_CREATED', 'BOOKING_RESCHEDULED', 'BOOKING_CANCELLED', 'BOOKING_RESCHEDULED_BY_OWNER',
12
+ # 'BOOKING_RESCHEDULED_BY_BOOKER', 'BOOKING_CANCELLED_BY_OWNER', 'BOOKING_CANCELLED_BY_BOOKER', 'BOOKING_ACCEPTED',
13
+ # 'BOOKING_REJECTED', 'BOOKING_STARTS', 'BOOKING_ENDS', 'booked', 'rescheduled', 'cancelled', 'start', 'end']
11
14
  attr_accessor :anchor
12
15
  # @return [Boolean]
13
16
  attr_accessor :attachIcs
@@ -66,6 +69,7 @@ module YouCanBookMe
66
69
  # @return [String]
67
70
  attr_accessor :profileId
68
71
  # @return [String]
72
+ # ['PREDICTION', 'TEMPLATE', 'OVERRIDEN', 'SKIPPED', 'SUCCEEDED', 'FAILED']
69
73
  attr_accessor :status
70
74
  # @return [String]
71
75
  attr_accessor :stylingTemplate
@@ -80,6 +84,7 @@ module YouCanBookMe
80
84
  # @return [String]
81
85
  attr_accessor :to
82
86
  # @return [String]
87
+ # ['ZAP', 'WEBHOOK', 'EMAIL', 'SMS', 'SALESFORCE_TASK', 'SALESFORCE_UPSERT']
83
88
  attr_accessor :type
84
89
  # @return [String]
85
90
  attr_accessor :updated
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Answer model.
5
4
  class Answer
6
5
  include ModelUtils
7
6
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Booking model.
5
4
  class Booking
6
5
  include ModelUtils
7
6
 
@@ -9,8 +8,8 @@ module YouCanBookMe
9
8
  actions: Action,
10
9
  answers: Answer,
11
10
  appointmentTypes: ProfileAppointmentType,
12
- caligraphEvent: CaligraphEvent,
13
11
  databaseVersion: Booking,
12
+ event: Event,
14
13
  lobby: BookingLobby,
15
14
  profile: Profile,
16
15
  services: ProfileAppointmentType,
@@ -33,8 +32,6 @@ module YouCanBookMe
33
32
  attr_accessor :appointmentTypesIds
34
33
  # @return [String]
35
34
  attr_accessor :bookerSecret
36
- # @return [YouCanBookMe::CaligraphEvent]
37
- attr_accessor :caligraphEvent
38
35
  # @return [Boolean]
39
36
  attr_accessor :cancelReasonRequired
40
37
  # @return [Boolean]
@@ -48,6 +45,7 @@ module YouCanBookMe
48
45
  # @return [String]
49
46
  attr_accessor :cancelledAt
50
47
  # @return [String]
48
+ # ['BOOKER', 'OWNER']
51
49
  attr_accessor :cancelledBy
52
50
  # @return [String]
53
51
  attr_accessor :createdAt
@@ -87,6 +85,8 @@ module YouCanBookMe
87
85
  attr_accessor :endsAt
88
86
  # @return [String]
89
87
  attr_accessor :endsAtUTC
88
+ # @return [YouCanBookMe::Event]
89
+ attr_accessor :event
90
90
  # @return [Integer]
91
91
  attr_accessor :expectedPrice
92
92
  # @return [String]
@@ -132,6 +132,7 @@ module YouCanBookMe
132
132
  # @return [String]
133
133
  attr_accessor :rescheduledAt
134
134
  # @return [String]
135
+ # ['BOOKER', 'OWNER']
135
136
  attr_accessor :rescheduledBy
136
137
  # @return [String]
137
138
  attr_accessor :reviewAt
@@ -154,6 +155,7 @@ module YouCanBookMe
154
155
  # @return [String]
155
156
  attr_accessor :teamMemberId
156
157
  # @return [String]
158
+ # ['NOT_USED', 'UNDECIDED', 'REJECTED', 'ACCEPTED']
157
159
  attr_accessor :tentative
158
160
  # @return [String]
159
161
  attr_accessor :timeZone
@@ -163,5 +165,7 @@ module YouCanBookMe
163
165
  attr_accessor :title
164
166
  # @return [Integer]
165
167
  attr_accessor :units
168
+ # @return [String]
169
+ attr_accessor :updatedAt
166
170
  end
167
171
  end
@@ -1,13 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's BookingLobby model.
5
4
  class BookingLobby
6
5
  include ModelUtils
7
6
 
8
7
  # @return [String]
9
8
  attr_accessor :outboundUrl
10
9
  # @return [String]
10
+ # ['UNKNOWN', 'PROBLEM_SUBSCRIPTION', 'PROBLEM_CANCELLED', 'PROBLEM_UNDECIDED', 'PROBLEM_TEMPORARY',
11
+ # 'PROBLEM_NO_INTEGRATION', 'WAITING', 'FORWARDING', 'CLOSED']
11
12
  attr_accessor :status
12
13
  end
13
14
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Calendar model.
5
4
  class Calendar
6
5
  include ModelUtils
7
6
 
@@ -38,6 +37,7 @@ module YouCanBookMe
38
37
  # @return [Array<YouCanBookMe::Link>]
39
38
  attr_accessor :links
40
39
  # @return [Integer]
40
+ # [0, 10, 20, 30]
41
41
  attr_accessor :permissionLevel
42
42
  # @return [Boolean]
43
43
  attr_accessor :primary
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Card model.
5
4
  class Card
6
5
  include ModelUtils
7
6
 
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Event model.
5
4
  class Event
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
9
8
  calendar: Calendar,
10
9
  links: Link,
11
- participants: Participant,
12
- reminders: Reminder
10
+ participants: EventParticipant,
11
+ reminders: EventReminder
13
12
  }.freeze
14
13
 
15
14
  # @return [String]
@@ -25,6 +24,7 @@ module YouCanBookMe
25
24
  # @return [Boolean]
26
25
  attr_accessor :dateOnly
27
26
  # @return [Integer]
27
+ # [0, 10, 20, 25, 30]
28
28
  attr_accessor :defaultShareLevel
29
29
  # @return [String]
30
30
  attr_accessor :description
@@ -35,8 +35,6 @@ module YouCanBookMe
35
35
  # @return [String]
36
36
  attr_accessor :endDateTime
37
37
  # @return [String]
38
- attr_accessor :endInstant
39
- # @return [String]
40
38
  attr_accessor :endTimeZone
41
39
  # @return [String]
42
40
  attr_accessor :endZonedDateTime
@@ -46,8 +44,6 @@ module YouCanBookMe
46
44
  attr_accessor :failure
47
45
  # @return [String]
48
46
  attr_accessor :foregroundColor
49
- # @return [Boolean]
50
- attr_accessor :hasDescription
51
47
  # @return [String]
52
48
  attr_accessor :id
53
49
  # @return [Array<YouCanBookMe::Link>]
@@ -56,7 +52,7 @@ module YouCanBookMe
56
52
  attr_accessor :location
57
53
  # @return [String]
58
54
  attr_accessor :metadata
59
- # @return [Array<YouCanBookMe::Participant>]
55
+ # @return [Array<YouCanBookMe::EventParticipant>]
60
56
  attr_accessor :participants
61
57
  # @return [Boolean]
62
58
  attr_accessor :private
@@ -68,7 +64,7 @@ module YouCanBookMe
68
64
  attr_accessor :publicOnly
69
65
  # @return [Array<String>]
70
66
  attr_accessor :recurrences
71
- # @return [Array<YouCanBookMe::Reminder>]
67
+ # @return [Array<YouCanBookMe::EventReminder>]
72
68
  attr_accessor :reminders
73
69
  # @return [Boolean]
74
70
  attr_accessor :restricted
@@ -89,6 +85,7 @@ module YouCanBookMe
89
85
  # @return [String]
90
86
  attr_accessor :startZonedDateTime
91
87
  # @return [String]
88
+ # ['confirmed', 'cancelled', 'tentative']
92
89
  attr_accessor :status
93
90
  # @return [String]
94
91
  attr_accessor :title
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Participant model.
5
- class Participant
4
+ class EventParticipant
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
@@ -18,8 +17,10 @@ module YouCanBookMe
18
17
  # @return [Boolean]
19
18
  attr_accessor :required
20
19
  # @return [String]
20
+ # ['Attendee', 'Organizer', 'Performer', 'Speaker', 'Chair', 'None', 'Optional', 'Required']
21
21
  attr_accessor :role
22
22
  # @return [String]
23
+ # ['Accepted', 'Declined', 'Invited', 'Tentative']
23
24
  attr_accessor :status
24
25
  end
25
26
  end
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Reminder model.
5
- class Reminder
4
+ class EventReminder
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
@@ -10,7 +9,8 @@ module YouCanBookMe
10
9
  }.freeze
11
10
 
12
11
  # @return [String]
13
- attr_accessor :orm
12
+ # ['Email', 'PopUp', 'SMS']
13
+ attr_accessor :form
14
14
  # @return [String]
15
15
  attr_accessor :id
16
16
  # @return [Array<YouCanBookMe::Link>]
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Link model.
5
4
  class Link
6
5
  include ModelUtils
7
6
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's NameAndAddress model.
5
4
  class NameAndAddress
6
5
  include ModelUtils
7
6
 
@@ -1,14 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Permission model.
5
4
  class Permission
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
9
8
  databaseVersion: Permission,
10
- fromLocalAccount: LocalAccount,
11
- toLocalAccount: LocalAccount
9
+ fromAccount: Account,
10
+ fromLocalAccount: Account,
11
+ toAccount: Account,
12
+ toLocalAccount: Account
12
13
  }.freeze
13
14
 
14
15
  # @return [String]
@@ -17,23 +18,34 @@ module YouCanBookMe
17
18
  attr_accessor :databaseVersion
18
19
  # @return [String]
19
20
  attr_accessor :expiresAt
20
- # @return [YouCanBookMe::LocalAccount]
21
+ # @return [YouCanBookMe::Account]
22
+ attr_accessor :fromAccount
23
+ # @return [YouCanBookMe::Account]
21
24
  attr_accessor :fromLocalAccount
22
25
  # @return [String]
23
26
  attr_accessor :id
24
27
  # @return [String]
28
+ # ['pushRequest']
25
29
  attr_accessor :requestedAction
26
30
  # @return [String]
27
31
  attr_accessor :resource
28
32
  # @return [String]
33
+ # ['REQUESTED', 'CONFIRMED', 'REJECTED']
29
34
  attr_accessor :status
30
35
  # @return [Integer]
31
36
  attr_accessor :statusHibernate
32
- # @return [YouCanBookMe::LocalAccount]
37
+ # @return [YouCanBookMe::Account]
38
+ attr_accessor :toAccount
39
+ # @return [YouCanBookMe::Account]
33
40
  attr_accessor :toLocalAccount
34
41
  # @return [String]
42
+ # ['ACCOUNTANCY', 'ACCOUNT_ADMINISTRATE', 'ACCOUNT_READ', 'ACCOUNT_WRITE', 'CALENDAR_READ', 'CALENDAR_WRITE',
43
+ # 'GROUP_SUPPORT', 'PERMISSION_RECEIVE', 'PROFILE_CSS_WRITE', 'PROFILE_READ', 'PROFILE_WRITE', 'REFUND',
44
+ # 'REMOTE_ACCOUNT_READ', 'REMOTE_ACCOUNT_WRITE']
35
45
  attr_accessor :type
36
46
  # @return [String]
47
+ attr_accessor :typeHibernate
48
+ # @return [String]
37
49
  attr_accessor :updatedAt
38
50
  end
39
51
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Profile model.
5
4
  class Profile
6
5
  include ModelUtils
7
6
 
@@ -9,7 +8,7 @@ module YouCanBookMe
9
8
  actions: Action,
10
9
  afterwards: ProfileAfterwards,
11
10
  appointmentTypes: ProfileAppointmentTypes,
12
- availableAccounts: ProfileLocalAccount,
11
+ availableAccounts: ProfileAccount,
13
12
  calendars: ProfileCalendars,
14
13
  cancelOrReschedule: ProfileCancelOrReschedule,
15
14
  databaseVersion: Profile,
@@ -44,7 +43,7 @@ module YouCanBookMe
44
43
  attr_accessor :afterwards
45
44
  # @return [YouCanBookMe::ProfileAppointmentTypes]
46
45
  attr_accessor :appointmentTypes
47
- # @return [Array<YouCanBookMe::ProfileLocalAccount>]
46
+ # @return [Array<YouCanBookMe::ProfileAccount>]
48
47
  attr_accessor :availableAccounts
49
48
  # @return [Array<YouCanBookMe::ProfileCalendars>]
50
49
  attr_accessor :calendars
@@ -85,10 +84,12 @@ module YouCanBookMe
85
84
  # @return [Array<YouCanBookMe::ProfileRemoteReminder>]
86
85
  attr_accessor :remoteReminders
87
86
  # @return [String]
87
+ # ['rescheduleBookingsForReview', 'migrateTo2049Theme']
88
88
  attr_accessor :requestedAction
89
89
  # @return [YouCanBookMe::ProfileAppointmentTypes]
90
90
  attr_accessor :services
91
91
  # @return [String]
92
+ # ['ONLINE', 'OFFLINE']
92
93
  attr_accessor :status
93
94
  # @return [String]
94
95
  attr_accessor :subdomain
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileLocalAccount model.
5
- class ProfileLocalAccount
4
+ class ProfileAccount
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileAfterwards model.
5
4
  class ProfileAfterwards
6
5
  include ModelUtils
7
6
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileAppointmentType model.
5
4
  class ProfileAppointmentType
6
5
  include ModelUtils
7
6
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileAppointmentTypes model.
5
4
  class ProfileAppointmentTypes
6
5
  include ModelUtils
7
6
 
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileCalendar model.
5
4
  class ProfileCalendar
6
5
  include ModelUtils
7
6
 
7
+ ASSOCIATION = {
8
+ calendar: Calendar
9
+ }.freeze
10
+
11
+ # @return [YouCanBookMe::Calendar]
12
+ attr_accessor :calendar
8
13
  # @return [String]
9
14
  attr_accessor :id
10
15
  # @return [String]