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
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileCalendars model.
5
4
  class ProfileCalendars
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 ProfileCancelOrReschedule model.
5
4
  class ProfileCancelOrReschedule
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 ProfileDisplay model.
5
4
  class ProfileDisplay
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 ProfilePayments model.
5
4
  class ProfilePayments
6
5
  include ModelUtils
7
6
 
@@ -12,6 +11,7 @@ module YouCanBookMe
12
11
  # @return [Integer]
13
12
  attr_accessor :currencyFactor
14
13
  # @return [String]
14
+ # ['STRIPE', 'PAYMILL']
15
15
  attr_accessor :partner
16
16
  # @return [String]
17
17
  attr_accessor :partnerDescription
@@ -1,14 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileRemoteAccount model.
5
4
  class ProfileRemoteAccount
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
9
8
  calendars: ProfileCalendar
10
- }
9
+ }.freeze
11
10
 
11
+ # @return [String]
12
+ attr_accessor :accountEmail
12
13
  # @return [Array<YouCanBookMe::ProfileCalendar>]
13
14
  attr_accessor :calendars
14
15
  # @return [String]
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileRemoteReminder model.
5
4
  class ProfileRemoteReminder
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 ProfileTeamMember model.
5
4
  class ProfileTeamMember
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 ProfileTeamMembers model.
5
4
  class ProfileTeamMembers
6
5
  include ModelUtils
7
6
 
@@ -12,6 +11,7 @@ module YouCanBookMe
12
11
  # @return [Boolean]
13
12
  attr_accessor :active
14
13
  # @return [String]
14
+ # ['ORDERED_FIRST_FREE', 'RANDOM_FIRST_FREE']
15
15
  attr_accessor :allocationStrategy
16
16
  # @return [Boolean]
17
17
  attr_accessor :allowTeamMemberChangeOnReschedule
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileTentative model.
5
4
  class ProfileTentative
6
5
  include ModelUtils
7
6
 
@@ -11,6 +10,5 @@ module YouCanBookMe
11
10
  attr_accessor :autoRejectActive
12
11
  # @return [Integer]
13
12
  attr_accessor :autoRejectAfterMinutes
14
-
15
13
  end
16
14
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileTimes model.
5
4
  class ProfileTimes
6
5
  include ModelUtils
7
6
 
@@ -48,6 +47,7 @@ module YouCanBookMe
48
47
  # @return [Integer]
49
48
  attr_accessor :slotLengthMinutes
50
49
  # @return [String]
50
+ # ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY']
51
51
  attr_accessor :startingDayOfWeek
52
52
  # @return [Boolean]
53
53
  attr_accessor :sunActive
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's ProfileVouchers model.
5
4
  class ProfileVouchers
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 Provider model.
5
4
  class Provider
6
5
  include ModelUtils
7
6
 
@@ -1,19 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Purchase model.
5
4
  class Purchase
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
9
- localAccount: LocalAccount,
8
+ account: Account,
10
9
  nameAndAddress: NameAndAddress,
11
10
  transactions: Transaction,
12
11
  transactionsSorted: Transaction
13
12
  }.freeze
14
13
 
14
+ # @return [YouCanBookMe::Account]
15
+ attr_accessor :account
15
16
  # @return [Integer]
16
17
  attr_accessor :accountDiscount
18
+ # @return [String]
19
+ attr_accessor :accountId
17
20
  # @return [Boolean]
18
21
  attr_accessor :active
19
22
  # @return [Integer]
@@ -56,8 +59,6 @@ module YouCanBookMe
56
59
  attr_accessor :id
57
60
  # @return [Boolean]
58
61
  attr_accessor :liableForVAT
59
- # @return [YouCanBookMe::LocalAccount]
60
- attr_accessor :localAccount
61
62
  # @return [String]
62
63
  attr_accessor :localAccountId
63
64
  # @return [Integer]
@@ -95,10 +96,12 @@ module YouCanBookMe
95
96
  # @return [String]
96
97
  attr_accessor :regionHibernate
97
98
  # @return [String]
99
+ # ['setUpDispute', 'writeOff', 'retryPayment', 'refund']
98
100
  attr_accessor :requestedAction
99
101
  # @return [Boolean]
100
102
  attr_accessor :retryPayment
101
103
  # @return [String]
104
+ # ['ONGOING', 'PREVIEW', 'PERSIST', 'DAEMON', 'CHECKOUT', 'REAL', 'ONGOING_PREVIEW', 'RAW']
102
105
  attr_accessor :setUpMode
103
106
  # @return [Integer]
104
107
  attr_accessor :shortPeriodDiscount
@@ -115,6 +118,7 @@ module YouCanBookMe
115
118
  # @return [Array<YouCanBookMe::Transaction>]
116
119
  attr_accessor :transactionsSorted
117
120
  # @return [String]
121
+ # ['PURCHASE', 'RETURN', 'CASH_OUT', 'REVERSED_CHARGE', 'UNKNOWN']
118
122
  attr_accessor :type
119
123
  # @return [Integer]
120
124
  attr_accessor :unitPrice
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's PurchasesSyncChanges model.
5
4
  class PurchasesSyncChanges
6
5
  include ModelUtils
7
6
 
@@ -15,6 +15,7 @@ module YouCanBookMe
15
15
  # @return [Boolean]
16
16
  attr_accessor :required
17
17
  # @return [String]
18
+ # ['CHECKBOX', 'HIDDEN', 'MULTI_CHECKBOXES', 'MULTI_DROPDOWN', 'MULTI_RADIO', 'PARAGRAPH', 'PASSTHROUGH', 'SIMPLE', 'TEXT']
18
19
  attr_accessor :type
19
20
  # @return [String]
20
21
  attr_accessor :validation
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's RemoteAccount model.
5
4
  class RemoteAccount
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
8
+ account: Account,
9
9
  calendars: Calendar,
10
10
  databaseVersion: RemoteAccount,
11
11
  links: Link,
12
- localAccount: LocalAccount,
13
12
  provider: Provider
14
13
  }.freeze
15
14
 
@@ -17,6 +16,12 @@ module YouCanBookMe
17
16
  attr_accessor :accessToken
18
17
  # @return [String]
19
18
  attr_accessor :accessTokenExpiresAt
19
+ # @return [YouCanBookMe::Account]
20
+ attr_accessor :account
21
+ # @return [String]
22
+ attr_accessor :accountEmail
23
+ # @return [String]
24
+ attr_accessor :accountId
20
25
  # @return [String]
21
26
  attr_accessor :calendarHome
22
27
  # @return [Array<YouCanBookMe::Calendar>]
@@ -33,8 +38,6 @@ module YouCanBookMe
33
38
  attr_accessor :id
34
39
  # @return [Array<YouCanBookMe::Link>]
35
40
  attr_accessor :links
36
- # @return [YouCanBookMe::LocalAccount>]
37
- attr_accessor :localAccount
38
41
  # @return [String]
39
42
  attr_accessor :localAccountEmail
40
43
  # @return [String]
@@ -48,6 +51,7 @@ module YouCanBookMe
48
51
  # @return [String]
49
52
  attr_accessor :refreshToken
50
53
  # @return [String]
54
+ # ['invalidateCache']
51
55
  attr_accessor :requestedAction
52
56
  # @return [String]
53
57
  attr_accessor :revision
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's TemplateEvent model.
5
4
  class TemplateEvent
6
5
  include ModelUtils
7
6
 
@@ -1,18 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Transaction model.
5
4
  class Transaction
6
5
  include ModelUtils
7
6
 
8
7
  ASSOCIATION = {
8
+ account: Account,
9
9
  linked: Transaction,
10
- purchase: Purchase,
10
+ purchase: Purchase
11
11
  }.freeze
12
12
 
13
- # @return [String]
13
+ # @return [YouCanBookMe::Account]
14
14
  attr_accessor :account
15
15
  # @return [String]
16
+ attr_accessor :accountId
17
+ # @return [String]
16
18
  attr_accessor :createdAt
17
19
  # @return [String]
18
20
  attr_accessor :description
@@ -35,6 +37,7 @@ module YouCanBookMe
35
37
  # @return [Integer]
36
38
  attr_accessor :tax
37
39
  # @return [String]
40
+ # ['INVOICE', 'CREDIT_NOTE', 'FAILED_PAYMENT', 'PAYMENT', 'REFUND', 'CREDIT', 'USE_OF_CREDIT']
38
41
  attr_accessor :type
39
42
  # @return [String]
40
43
  attr_accessor :updatedAt
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- # YouCanBookMe's Warning model.
5
4
  class Warning
6
5
  include ModelUtils
7
6
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YouCanBookMe
4
- VERSION = '0.0.3.alpha'
4
+ VERSION = '0.0.4.alpha'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youcanbookme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.alpha
4
+ version: 0.0.4.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-03 00:00:00.000000000 Z
11
+ date: 2020-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -146,7 +146,7 @@ files:
146
146
  - ".github/workflows/gem-push.yml"
147
147
  - ".github/workflows/test.yml"
148
148
  - ".gitignore"
149
- - ".rubocom.yml"
149
+ - ".rubocop.yml"
150
150
  - CHANGELOG.md
151
151
  - CODE_OF_CONDUCT.md
152
152
  - Gemfile
@@ -162,29 +162,24 @@ files:
162
162
  - lib/youcanbookme/http_command.rb
163
163
  - lib/youcanbookme/loggable.rb
164
164
  - lib/youcanbookme/models/account.rb
165
+ - lib/youcanbookme/models/account_allocation.rb
166
+ - lib/youcanbookme/models/account_child.rb
167
+ - lib/youcanbookme/models/account_parent.rb
165
168
  - lib/youcanbookme/models/action.rb
166
169
  - lib/youcanbookme/models/answer.rb
167
- - lib/youcanbookme/models/appointment_type.rb
168
170
  - lib/youcanbookme/models/booking.rb
169
171
  - lib/youcanbookme/models/booking_lobby.rb
170
172
  - lib/youcanbookme/models/calendar.rb
171
- - lib/youcanbookme/models/caligraph_calendar.rb
172
- - lib/youcanbookme/models/caligraph_event.rb
173
- - lib/youcanbookme/models/caligraph_link.rb
174
- - lib/youcanbookme/models/caligraph_local_account.rb
175
- - lib/youcanbookme/models/caligraph_permission.rb
176
- - lib/youcanbookme/models/caligraph_remote_account.rb
177
- - lib/youcanbookme/models/caligraph_safe_local_account.rb
178
173
  - lib/youcanbookme/models/card.rb
179
174
  - lib/youcanbookme/models/event.rb
180
- - lib/youcanbookme/models/instant.rb
175
+ - lib/youcanbookme/models/event_participant.rb
176
+ - lib/youcanbookme/models/event_reminder.rb
181
177
  - lib/youcanbookme/models/link.rb
182
- - lib/youcanbookme/models/local_account.rb
183
178
  - lib/youcanbookme/models/model_utils.rb
184
179
  - lib/youcanbookme/models/name_and_address.rb
185
- - lib/youcanbookme/models/participant.rb
186
180
  - lib/youcanbookme/models/permission.rb
187
181
  - lib/youcanbookme/models/profile.rb
182
+ - lib/youcanbookme/models/profile_account.rb
188
183
  - lib/youcanbookme/models/profile_afterwards.rb
189
184
  - lib/youcanbookme/models/profile_appointment_type.rb
190
185
  - lib/youcanbookme/models/profile_appointment_types.rb
@@ -192,7 +187,6 @@ files:
192
187
  - lib/youcanbookme/models/profile_calendars.rb
193
188
  - lib/youcanbookme/models/profile_cancel_or_reschedule.rb
194
189
  - lib/youcanbookme/models/profile_display.rb
195
- - lib/youcanbookme/models/profile_local_account.rb
196
190
  - lib/youcanbookme/models/profile_payments.rb
197
191
  - lib/youcanbookme/models/profile_remote_account.rb
198
192
  - lib/youcanbookme/models/profile_remote_reminder.rb
@@ -204,11 +198,8 @@ files:
204
198
  - lib/youcanbookme/models/provider.rb
205
199
  - lib/youcanbookme/models/purchase.rb
206
200
  - lib/youcanbookme/models/purchases_sync_changes.rb
207
- - lib/youcanbookme/models/query.rb
208
201
  - lib/youcanbookme/models/question.rb
209
- - lib/youcanbookme/models/reminder.rb
210
202
  - lib/youcanbookme/models/remote_account.rb
211
- - lib/youcanbookme/models/team_member.rb
212
203
  - lib/youcanbookme/models/template_event.rb
213
204
  - lib/youcanbookme/models/transaction.rb
214
205
  - lib/youcanbookme/models/warning.rb
@@ -221,7 +212,7 @@ metadata:
221
212
  homepage_uri: https://github.com/koshilife/youcanbookme-api-ruby-client
222
213
  source_code_uri: https://github.com/koshilife/youcanbookme-api-ruby-client
223
214
  changelog_uri: https://github.com/koshilife/youcanbookme-api-ruby-client/blob/master/CHANGELOG.md
224
- documentation_uri: https://www.rubydoc.info/gems/youcanbookme/0.0.3.alpha
215
+ documentation_uri: https://www.rubydoc.info/gems/youcanbookme/0.0.4.alpha
225
216
  post_install_message:
226
217
  rdoc_options: []
227
218
  require_paths:
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module YouCanBookMe
4
- class AppointmentType
5
- include ModelUtils
6
- end
7
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module YouCanBookMe
4
- # YouCanBookMe's CaligraphCalendar model.
5
- class CaligraphCalendar
6
- include ModelUtils
7
-
8
- ASSOCIATION = { links: CaligraphLink }.freeze
9
-
10
- # @return [Boolean]
11
- attr_accessor :deleted
12
- # @return [String]
13
- attr_accessor :id
14
- # @return [Array<YouCanBookMe::CaligraphLink>]
15
- attr_accessor :links
16
- # @return [Integer]
17
- attr_accessor :permissionLevel
18
- # @return [Boolean]
19
- attr_accessor :primary
20
- # @return [String]
21
- attr_accessor :remoteAccountId
22
- # @return [String]
23
- attr_accessor :timeZone
24
- # @return [String]
25
- attr_accessor :title
26
- # @return [String]
27
- attr_accessor :userName
28
- end
29
- end