youcanbookme 0.0.1.alpha

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 (73) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/gem-push.yml +37 -0
  3. data/.github/workflows/test.yml +21 -0
  4. data/.gitignore +10 -0
  5. data/.rubocom.yml +69 -0
  6. data/CHANGELOG.md +7 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +6 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +119 -0
  11. data/Rakefile +12 -0
  12. data/bin/console +7 -0
  13. data/bin/setup +6 -0
  14. data/lib/youcanbookme.rb +22 -0
  15. data/lib/youcanbookme/client.rb +85 -0
  16. data/lib/youcanbookme/common_module.rb +32 -0
  17. data/lib/youcanbookme/configuration.rb +20 -0
  18. data/lib/youcanbookme/error.rb +15 -0
  19. data/lib/youcanbookme/http_command.rb +94 -0
  20. data/lib/youcanbookme/models/account.rb +125 -0
  21. data/lib/youcanbookme/models/action.rb +91 -0
  22. data/lib/youcanbookme/models/answer.rb +19 -0
  23. data/lib/youcanbookme/models/appointment_type.rb +7 -0
  24. data/lib/youcanbookme/models/booking.rb +167 -0
  25. data/lib/youcanbookme/models/booking_lobby.rb +13 -0
  26. data/lib/youcanbookme/models/calendar.rb +67 -0
  27. data/lib/youcanbookme/models/caligraph_calendar.rb +29 -0
  28. data/lib/youcanbookme/models/caligraph_event.rb +8 -0
  29. data/lib/youcanbookme/models/caligraph_link.rb +17 -0
  30. data/lib/youcanbookme/models/caligraph_local_account.rb +47 -0
  31. data/lib/youcanbookme/models/caligraph_permission.rb +32 -0
  32. data/lib/youcanbookme/models/caligraph_remote_account.rb +23 -0
  33. data/lib/youcanbookme/models/caligraph_safe_local_account.rb +13 -0
  34. data/lib/youcanbookme/models/card.rb +25 -0
  35. data/lib/youcanbookme/models/event.rb +98 -0
  36. data/lib/youcanbookme/models/instant.rb +9 -0
  37. data/lib/youcanbookme/models/link.rb +17 -0
  38. data/lib/youcanbookme/models/local_account.rb +180 -0
  39. data/lib/youcanbookme/models/model_utils.rb +88 -0
  40. data/lib/youcanbookme/models/name_and_address.rb +25 -0
  41. data/lib/youcanbookme/models/participant.rb +25 -0
  42. data/lib/youcanbookme/models/permission.rb +39 -0
  43. data/lib/youcanbookme/models/profile.rb +114 -0
  44. data/lib/youcanbookme/models/profile_afterwards.rb +34 -0
  45. data/lib/youcanbookme/models/profile_appointment_type.rb +23 -0
  46. data/lib/youcanbookme/models/profile_appointment_types.rb +27 -0
  47. data/lib/youcanbookme/models/profile_calendar.rb +21 -0
  48. data/lib/youcanbookme/models/profile_calendars.rb +19 -0
  49. data/lib/youcanbookme/models/profile_cancel_or_reschedule.rb +21 -0
  50. data/lib/youcanbookme/models/profile_display.rb +55 -0
  51. data/lib/youcanbookme/models/profile_local_account.rb +19 -0
  52. data/lib/youcanbookme/models/profile_payments.rb +23 -0
  53. data/lib/youcanbookme/models/profile_remote_account.rb +25 -0
  54. data/lib/youcanbookme/models/profile_remote_reminder.rb +15 -0
  55. data/lib/youcanbookme/models/profile_team_member.rb +33 -0
  56. data/lib/youcanbookme/models/profile_team_members.rb +29 -0
  57. data/lib/youcanbookme/models/profile_tentative.rb +16 -0
  58. data/lib/youcanbookme/models/profile_times.rb +79 -0
  59. data/lib/youcanbookme/models/profile_vouchers.rb +17 -0
  60. data/lib/youcanbookme/models/provider.rb +17 -0
  61. data/lib/youcanbookme/models/purchase.rb +126 -0
  62. data/lib/youcanbookme/models/purchases_sync_changes.rb +19 -0
  63. data/lib/youcanbookme/models/query.rb +8 -0
  64. data/lib/youcanbookme/models/question.rb +24 -0
  65. data/lib/youcanbookme/models/reminder.rb +21 -0
  66. data/lib/youcanbookme/models/remote_account.rb +63 -0
  67. data/lib/youcanbookme/models/team_member.rb +8 -0
  68. data/lib/youcanbookme/models/template_event.rb +17 -0
  69. data/lib/youcanbookme/models/transaction.rb +42 -0
  70. data/lib/youcanbookme/models/warning.rb +27 -0
  71. data/lib/youcanbookme/version.rb +5 -0
  72. data/youcanbookme.gemspec +41 -0
  73. metadata +244 -0
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileDisplay model.
5
+ class ProfileDisplay
6
+ include ModelUtils
7
+
8
+ # @return [Boolean]
9
+ attr_accessor :bustMobile
10
+ # @return [String]
11
+ attr_accessor :colorBusySlot
12
+ # @return [String]
13
+ attr_accessor :colorFreeSlot
14
+ # @return [String]
15
+ attr_accessor :colorHeader
16
+ # @return [String]
17
+ attr_accessor :css
18
+ # @return [String]
19
+ attr_accessor :fontHeader
20
+ # @return [String]
21
+ attr_accessor :fontHeaderColor
22
+ # @return [Integer]
23
+ attr_accessor :fontHeaderSize
24
+ # @return [String]
25
+ attr_accessor :fontParagraph
26
+ # @return [String]
27
+ attr_accessor :fontParagraphColor
28
+ # @return [Integer]
29
+ attr_accessor :fontParagraphSize
30
+ # @return [String]
31
+ attr_accessor :fontSub
32
+ # @return [String]
33
+ attr_accessor :fontSubColor
34
+ # @return [Integer]
35
+ attr_accessor :fontSubSize
36
+ # @return [String]
37
+ attr_accessor :footer
38
+ # @return [String]
39
+ attr_accessor :header
40
+ # @return [Integer]
41
+ attr_accessor :periodShownPerPageDays
42
+ # @return [Boolean]
43
+ attr_accessor :showJumpDate
44
+ # @return [Boolean]
45
+ attr_accessor :showPeriods
46
+ # @return [Boolean]
47
+ attr_accessor :showTimeZone
48
+ # @return [Boolean]
49
+ attr_accessor :showUncheckedDays
50
+ # @return [String]
51
+ attr_accessor :theme
52
+ # @return [Boolean]
53
+ attr_accessor :widthCss
54
+ end
55
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileLocalAccount model.
5
+ class ProfileLocalAccount
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ remoteAccounts: ProfileRemoteAccount
10
+ }.freeze
11
+
12
+ # @return [String]
13
+ attr_accessor :accountId
14
+ # @return [String]
15
+ attr_accessor :email
16
+ # @return [Array<YouCanBookMe::ProfileRemoteAccount>]
17
+ attr_accessor :remoteAccounts
18
+ end
19
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfilePayments model.
5
+ class ProfilePayments
6
+ include ModelUtils
7
+
8
+ # @return [Boolean]
9
+ attr_accessor :active
10
+ # @return [String]
11
+ attr_accessor :currency
12
+ # @return [Integer]
13
+ attr_accessor :currencyFactor
14
+ # @return [String]
15
+ attr_accessor :partner
16
+ # @return [String]
17
+ attr_accessor :partnerDescription
18
+ # @return [Integer]
19
+ attr_accessor :pricePerSlot
20
+ # @return [Integer]
21
+ attr_accessor :roundingPrecision
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileRemoteAccount model.
5
+ class ProfileRemoteAccount
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ calendars: ProfileCalendar
10
+ }
11
+
12
+ # @return [Array<YouCanBookMe::ProfileCalendar>]
13
+ attr_accessor :calendars
14
+ # @return [String]
15
+ attr_accessor :id
16
+ # @return [Boolean]
17
+ attr_accessor :lobbySupport
18
+ # @return [String]
19
+ attr_accessor :localAccountEmail
20
+ # @return [String]
21
+ attr_accessor :type
22
+ # @return [String]
23
+ attr_accessor :username
24
+ end
25
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileRemoteReminder model.
5
+ class ProfileRemoteReminder
6
+ include ModelUtils
7
+
8
+ # @return [String]
9
+ attr_accessor :id
10
+ # @return [Integer]
11
+ attr_accessor :offsetMinutes
12
+ # @return [String]
13
+ attr_accessor :type
14
+ end
15
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileTeamMember model.
5
+ class ProfileTeamMember
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ targetCalendar: ProfileCalendar
10
+ }.freeze
11
+
12
+ # @return [String]
13
+ attr_accessor :account
14
+ # @return [String]
15
+ attr_accessor :calendarId
16
+ # @return [String]
17
+ attr_accessor :description
18
+ # @return [String]
19
+ attr_accessor :email
20
+ # @return [String]
21
+ attr_accessor :id
22
+ # @return [String]
23
+ attr_accessor :name
24
+ # @return [String]
25
+ attr_accessor :pic
26
+ # @return [YouCanBookMe::ProfileCalendar]
27
+ attr_accessor :targetCalendar
28
+ # @return [String]
29
+ attr_accessor :targetCalendarTimeZone
30
+ # @return [Boolean]
31
+ attr_accessor :targetCalendarWriteable
32
+ end
33
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileTeamMembers model.
5
+ class ProfileTeamMembers
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ items: ProfileTeamMember
10
+ }.freeze
11
+
12
+ # @return [Boolean]
13
+ attr_accessor :active
14
+ # @return [String]
15
+ attr_accessor :allocationStrategy
16
+ # @return [Boolean]
17
+ attr_accessor :allowTeamMemberChangeOnReschedule
18
+ # @return [Boolean]
19
+ attr_accessor :assumeNoPreferenceOption
20
+ # @return [String]
21
+ attr_accessor :description
22
+ # @return [Boolean]
23
+ attr_accessor :includeNoPreferenceOption
24
+ # @return [Array<YouCanBookMe::ProfileTeamMember>]
25
+ attr_accessor :items
26
+ # @return [Boolean]
27
+ attr_accessor :randomOrder
28
+ end
29
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileTentative model.
5
+ class ProfileTentative
6
+ include ModelUtils
7
+
8
+ # @return [Boolean]
9
+ attr_accessor :active
10
+ # @return [Boolean]
11
+ attr_accessor :autoRejectActive
12
+ # @return [Integer]
13
+ attr_accessor :autoRejectAfterMinutes
14
+
15
+ end
16
+ end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileTimes model.
5
+ class ProfileTimes
6
+ include ModelUtils
7
+
8
+ # @return [Integer]
9
+ attr_accessor :bookingPaddingMinutes
10
+ # @return [String]
11
+ attr_accessor :breakEnd
12
+ # @return [String]
13
+ attr_accessor :breakStart
14
+ # @return [Integer]
15
+ attr_accessor :defaultNumberOfSlots
16
+ # @return [String]
17
+ attr_accessor :fixedEnd
18
+ # @return [String]
19
+ attr_accessor :fixedStart
20
+ # @return [Boolean]
21
+ attr_accessor :friActive
22
+ # @return [String]
23
+ attr_accessor :friEnd
24
+ # @return [String]
25
+ attr_accessor :friStart
26
+ # @return [Integer]
27
+ attr_accessor :maxNoticeDays
28
+ # @return [Integer]
29
+ attr_accessor :maxNumberOfSlots
30
+ # @return [Integer]
31
+ attr_accessor :minNoticeMinutes
32
+ # @return [Integer]
33
+ attr_accessor :minNumberOfSlots
34
+ # @return [Boolean]
35
+ attr_accessor :monActive
36
+ # @return [String]
37
+ attr_accessor :monEnd
38
+ # @return [String]
39
+ attr_accessor :monStart
40
+ # @return [String]
41
+ attr_accessor :onDutyToken
42
+ # @return [Boolean]
43
+ attr_accessor :satActive
44
+ # @return [String]
45
+ attr_accessor :satEnd
46
+ # @return [String]
47
+ attr_accessor :satStart
48
+ # @return [Integer]
49
+ attr_accessor :slotLengthMinutes
50
+ # @return [String]
51
+ attr_accessor :startingDayOfWeek
52
+ # @return [Boolean]
53
+ attr_accessor :sunActive
54
+ # @return [String]
55
+ attr_accessor :sunEnd
56
+ # @return [String]
57
+ attr_accessor :sunStart
58
+ # @return [Boolean]
59
+ attr_accessor :thuActive
60
+ # @return [String]
61
+ attr_accessor :thuEnd
62
+ # @return [String]
63
+ attr_accessor :thuStart
64
+ # @return [Boolean]
65
+ attr_accessor :tueActive
66
+ # @return [String]
67
+ attr_accessor :tueEnd
68
+ # @return [String]
69
+ attr_accessor :tueStart
70
+ # @return [Integer]
71
+ attr_accessor :unitsPerSlot
72
+ # @return [Boolean]
73
+ attr_accessor :wedActive
74
+ # @return [String]
75
+ attr_accessor :wedEnd
76
+ # @return [String]
77
+ attr_accessor :wedStart
78
+ end
79
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's ProfileVouchers model.
5
+ class ProfileVouchers
6
+ include ModelUtils
7
+
8
+ # @return [Boolean]
9
+ attr_accessor :active
10
+ # @return [String]
11
+ attr_accessor :codeAlreadyUsedMessage
12
+ # @return [String]
13
+ attr_accessor :voucherAlreadyUsedMessage
14
+ # @return [Array<String>]
15
+ attr_accessor :vouchers
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's Provider model.
5
+ class Provider
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ remoteAccount: RemoteAccount
10
+ }.freeze
11
+
12
+ # @return [Boolean]
13
+ attr_accessor :flushCache
14
+ # @return [YouCanBookMe::RemoteAccount]
15
+ attr_accessor :remoteAccount
16
+ end
17
+ end
@@ -0,0 +1,126 @@
1
+ # frozen_string_literal: true
2
+
3
+ module YouCanBookMe
4
+ # YouCanBookMe's Purchase model.
5
+ class Purchase
6
+ include ModelUtils
7
+
8
+ ASSOCIATION = {
9
+ localAccount: LocalAccount,
10
+ nameAndAddress: NameAndAddress,
11
+ transactions: Transaction,
12
+ transactionsSorted: Transaction
13
+ }.freeze
14
+
15
+ # @return [Integer]
16
+ attr_accessor :accountDiscount
17
+ # @return [Boolean]
18
+ attr_accessor :active
19
+ # @return [Integer]
20
+ attr_accessor :additionalDiscount
21
+ # @return [Integer]
22
+ attr_accessor :additionalDiscountPermyriadRequested
23
+ # @return [String]
24
+ attr_accessor :addressHibernate
25
+ # @return [Integer]
26
+ attr_accessor :afterDiscounts
27
+ # @return [Integer]
28
+ attr_accessor :balance
29
+ # @return [Integer]
30
+ attr_accessor :beforeDiscounts
31
+ # @return [String]
32
+ attr_accessor :cardId
33
+ # @return [String]
34
+ attr_accessor :cityHibernate
35
+ # @return [String]
36
+ attr_accessor :countryHibernate
37
+ # @return [String]
38
+ attr_accessor :createdAt
39
+ # @return [String]
40
+ attr_accessor :currency
41
+ # @return [Integer]
42
+ attr_accessor :currencyFactor
43
+ # @return [String]
44
+ attr_accessor :date
45
+ # @return [String]
46
+ attr_accessor :displayLocale
47
+ # @return [String]
48
+ attr_accessor :familyNameHibernate
49
+ # @return [String]
50
+ attr_accessor :givenNameHibernate
51
+ # @return [Integer]
52
+ attr_accessor :gross
53
+ # @return [Boolean]
54
+ attr_accessor :hasTax
55
+ # @return [String]
56
+ attr_accessor :id
57
+ # @return [Boolean]
58
+ attr_accessor :liableForVAT
59
+ # @return [YouCanBookMe::LocalAccount]
60
+ attr_accessor :localAccount
61
+ # @return [String]
62
+ attr_accessor :localAccountId
63
+ # @return [Integer]
64
+ attr_accessor :longPeriodDiscount
65
+ # @return [Integer]
66
+ attr_accessor :months
67
+ # @return [YouCanBookMe::NameAndAddress]
68
+ attr_accessor :nameAndAddress
69
+ # @return [Boolean]
70
+ attr_accessor :needsPayment
71
+ # @return [Integer]
72
+ attr_accessor :net
73
+ # @return [String]
74
+ attr_accessor :number
75
+ # @return [String]
76
+ attr_accessor :organizationNameHibernate
77
+ # @return [Integer]
78
+ attr_accessor :payment
79
+ # @return [String]
80
+ attr_accessor :paymentIntentId
81
+ # @return [String]
82
+ attr_accessor :postalCodeHibernate
83
+ # @return [Integer]
84
+ attr_accessor :proRataPermyriadUsed
85
+ # @return [String]
86
+ attr_accessor :product
87
+ # @return [String]
88
+ attr_accessor :provisionEnd
89
+ # @return [String]
90
+ attr_accessor :provisionStart
91
+ # @return [Integer]
92
+ attr_accessor :quantity
93
+ # @return [String]
94
+ attr_accessor :refundCode
95
+ # @return [String]
96
+ attr_accessor :regionHibernate
97
+ # @return [String]
98
+ attr_accessor :requestedAction
99
+ # @return [Boolean]
100
+ attr_accessor :retryPayment
101
+ # @return [String]
102
+ attr_accessor :setUpMode
103
+ # @return [Integer]
104
+ attr_accessor :shortPeriodDiscount
105
+ # @return [String]
106
+ attr_accessor :status
107
+ # @return [Integer]
108
+ attr_accessor :tax
109
+ # @return [String]
110
+ attr_accessor :taxNumber
111
+ # @return [Integer]
112
+ attr_accessor :totalDiscount
113
+ # @return [Array<YouCanBookMe::Transaction>]
114
+ attr_accessor :transactions
115
+ # @return [Array<YouCanBookMe::Transaction>]
116
+ attr_accessor :transactionsSorted
117
+ # @return [String]
118
+ attr_accessor :type
119
+ # @return [Integer]
120
+ attr_accessor :unitPrice
121
+ # @return [String]
122
+ attr_accessor :updatedAt
123
+ # @return [Integer]
124
+ attr_accessor :volumeDiscount
125
+ end
126
+ end