supersaas-api-client 1.1.0 → 2.0.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/actions.yaml +21 -0
  3. data/.gitignore +3 -0
  4. data/.rubocop.yml +1 -0
  5. data/.rubocop_todo.yml +296 -0
  6. data/Gemfile +5 -3
  7. data/Gemfile.lock +34 -7
  8. data/README.md +109 -58
  9. data/Rakefile +8 -6
  10. data/bin/console +4 -3
  11. data/examples/appointments.rb +70 -42
  12. data/examples/forms.rb +20 -22
  13. data/examples/groups.rb +20 -0
  14. data/examples/promotions.rb +32 -0
  15. data/examples/schedules.rb +23 -11
  16. data/examples/users.rb +31 -23
  17. data/lib/supersaas-api-client/api/appointments.rb +37 -25
  18. data/lib/supersaas-api-client/api/base_api.rb +69 -23
  19. data/lib/supersaas-api-client/api/forms.rb +16 -9
  20. data/lib/supersaas-api-client/api/groups.rb +12 -0
  21. data/lib/supersaas-api-client/api/promotions.rb +29 -0
  22. data/lib/supersaas-api-client/api/schedules.rb +14 -4
  23. data/lib/supersaas-api-client/api/users.rb +28 -15
  24. data/lib/supersaas-api-client/client.rb +106 -36
  25. data/lib/supersaas-api-client/exception.rb +3 -1
  26. data/lib/supersaas-api-client/models/appointment.rb +9 -12
  27. data/lib/supersaas-api-client/models/base_model.rb +4 -1
  28. data/lib/supersaas-api-client/models/field_list.rb +12 -0
  29. data/lib/supersaas-api-client/models/form.rb +5 -2
  30. data/lib/supersaas-api-client/models/group.rb +7 -0
  31. data/lib/supersaas-api-client/models/promotion.rb +7 -0
  32. data/lib/supersaas-api-client/models/resource.rb +3 -1
  33. data/lib/supersaas-api-client/models/schedule.rb +3 -1
  34. data/lib/supersaas-api-client/models/slot.rb +4 -6
  35. data/lib/supersaas-api-client/models/super_form.rb +7 -0
  36. data/lib/supersaas-api-client/models/user.rb +5 -8
  37. data/lib/supersaas-api-client/version.rb +4 -2
  38. data/lib/supersaas-api-client.rb +3 -1
  39. data/lib/supersaas.rb +23 -15
  40. data/supersaas-api-client.gemspec +19 -18
  41. metadata +52 -38
  42. data/test/appointments_test.rb +0 -99
  43. data/test/client_test.rb +0 -46
  44. data/test/forms_test.rb +0 -22
  45. data/test/schedules_test.rb +0 -19
  46. data/test/test_helper.rb +0 -23
  47. data/test/users_test.rb +0 -68
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0594cc1556a00fbce6efb522bc71f4aa359367a5523a6350661e127b2e4938b
4
- data.tar.gz: 3c9f1d8520d2c631e560769d4d83e45f0b845a9f1e16d367baf69c8ae718d687
3
+ metadata.gz: 69136c9082483368bec705b15876862604aee77120860b916716fd24933dbb39
4
+ data.tar.gz: 4949acd898c133b10239f9b11e3c37ab3c535d00446d13c6f6fcc6e085e90bd4
5
5
  SHA512:
6
- metadata.gz: e687af87475439d8759f7833723ff14d6d04e418b80c7857bc14dbbc1be6140ef6855e5fe4874abada6512fa9b71a95d755c2871613854610b14a03c7d44bdfe
7
- data.tar.gz: 7042e08b1629897c493ce6edb88715cd5340c0f4325822540050eef8adc701416a94e2cd670a8d19332c7708416ef6480a150b0e80cc525001e26b766be0a236
6
+ metadata.gz: b6940527d2f3ef447d2ef2bf34fad20df99ef88dccb5aedbc185f328047341c8f3c96293b3e5f3eea56952d004d83bbeac56c89762a32e71f5c99bdd05a6006b
7
+ data.tar.gz: 46dfe6591f66cc505bf5bb6915db31e0a6842335a225149931d111493a191eaa4df756734dcff1269423185379688436b210938fa0eda436e24a54dfd9adb7ba
@@ -0,0 +1,21 @@
1
+ name: SuperSaaS Ruby API Client CI
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+ pull_request:
6
+ branches: [ main ]
7
+ jobs:
8
+ test:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ os: [ubuntu-latest, macos-latest]
13
+ ruby: ['3.0', '3.1', '3.2', '3.3', 'head', 'jruby', 'jruby-head']
14
+ runs-on: ${{ matrix.os }}
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true
21
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -6,5 +6,8 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /supersaas-api-client/
9
10
  .DS_Store
10
11
  .idea/*
12
+ *.gem
13
+ *.swp
data/.rubocop.yml ADDED
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,296 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2024-01-17 11:07:18 UTC using RuboCop version 1.60.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Configuration parameters: Severity, Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'supersaas-api-client.gemspec'
15
+ - 'supersaas-api-client/supersaas-api-client.gemspec'
16
+
17
+ # Offense count: 8
18
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
19
+ Metrics/AbcSize:
20
+ Max: 72
21
+
22
+ # Offense count: 2
23
+ # Configuration parameters: CountComments, CountAsOne.
24
+ Metrics/ClassLength:
25
+ Max: 200
26
+
27
+ # Offense count: 3
28
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
29
+ Metrics/CyclomaticComplexity:
30
+ Max: 20
31
+
32
+ # Offense count: 9
33
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
34
+ Metrics/MethodLength:
35
+ Max: 71
36
+
37
+ # Offense count: 7
38
+ # Configuration parameters: CountKeywordArgs.
39
+ Metrics/ParameterLists:
40
+ MaxOptionalParameters: 9
41
+ Max: 10
42
+
43
+ # Offense count: 3
44
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
45
+ Metrics/PerceivedComplexity:
46
+ Max: 17
47
+
48
+ # Offense count: 1
49
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
50
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
51
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
52
+ Naming/FileName:
53
+ Exclude:
54
+ - 'lib/supersaas-api-client.rb'
55
+
56
+ # Offense count: 22
57
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
58
+ # SupportedStyles: snake_case, normalcase, non_integer
59
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
60
+ Naming/VariableNumber:
61
+ Exclude:
62
+ - 'lib/supersaas-api-client/api/appointments.rb'
63
+ - 'lib/supersaas-api-client/api/users.rb'
64
+ - 'lib/supersaas-api-client/models/appointment.rb'
65
+ - 'test/appointments_test.rb'
66
+ - 'test/users_test.rb'
67
+
68
+ # Offense count: 18
69
+ # Configuration parameters: AllowedConstants.
70
+ Style/Documentation:
71
+ Enabled: false
72
+
73
+ # Offense count: 6
74
+ # This cop supports safe autocorrection (--autocorrect).
75
+ Style/IfUnlessModifier:
76
+ Exclude:
77
+ - 'lib/supersaas-api-client/api/base_api.rb'
78
+ - 'lib/supersaas-api-client/client.rb'
79
+
80
+ # Offense count: 5
81
+ # Configuration parameters: AllowedMethods.
82
+ # AllowedMethods: respond_to_missing?
83
+ Style/OptionalBooleanParameter:
84
+ Exclude:
85
+ - 'lib/supersaas-api-client/api/appointments.rb'
86
+
87
+ # Offense count: 6
88
+ # This cop supports safe autocorrection (--autocorrect).
89
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
90
+ # URISchemes: http, https
91
+ Layout/LineLength:
92
+ Max: 191
93
+
94
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
95
+ Enabled: true
96
+ Gemspec/DevelopmentDependencies: # new in 1.44
97
+ Enabled: false
98
+ Gemspec/RequireMFA: # new in 1.23
99
+ Enabled: true
100
+ Layout/LineContinuationLeadingSpace: # new in 1.31
101
+ Enabled: true
102
+ Layout/LineContinuationSpacing: # new in 1.31
103
+ Enabled: true
104
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
105
+ Enabled: true
106
+ Layout/SpaceBeforeBrackets: # new in 1.7
107
+ Enabled: true
108
+ Lint/AmbiguousAssignment: # new in 1.7
109
+ Enabled: true
110
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
111
+ Enabled: true
112
+ Lint/AmbiguousRange: # new in 1.19
113
+ Enabled: true
114
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
115
+ Enabled: true
116
+ Lint/DeprecatedConstants: # new in 1.8
117
+ Enabled: true
118
+ Lint/DuplicateBranch: # new in 1.3
119
+ Enabled: true
120
+ Lint/DuplicateMagicComment: # new in 1.37
121
+ Enabled: true
122
+ Lint/DuplicateMatchPattern: # new in 1.50
123
+ Enabled: true
124
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
125
+ Enabled: true
126
+ Lint/EmptyBlock: # new in 1.1
127
+ Enabled: true
128
+ Lint/EmptyClass: # new in 1.3
129
+ Enabled: true
130
+ Lint/EmptyInPattern: # new in 1.16
131
+ Enabled: true
132
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
133
+ Enabled: true
134
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
135
+ Enabled: true
136
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
137
+ Enabled: true
138
+ Lint/LiteralAssignmentInCondition: # new in 1.58
139
+ Enabled: true
140
+ Lint/MixedCaseRange: # new in 1.53
141
+ Enabled: true
142
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
143
+ Enabled: true
144
+ Lint/NonAtomicFileOperation: # new in 1.31
145
+ Enabled: true
146
+ Lint/NumberedParameterAssignment: # new in 1.9
147
+ Enabled: true
148
+ Lint/OrAssignmentToConstant: # new in 1.9
149
+ Enabled: true
150
+ Lint/RedundantDirGlobSort: # new in 1.8
151
+ Enabled: true
152
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
153
+ Enabled: true
154
+ Lint/RefinementImportMethods: # new in 1.27
155
+ Enabled: true
156
+ Lint/RequireRangeParentheses: # new in 1.32
157
+ Enabled: true
158
+ Lint/RequireRelativeSelfPath: # new in 1.22
159
+ Enabled: true
160
+ Lint/SymbolConversion: # new in 1.9
161
+ Enabled: true
162
+ Lint/ToEnumArguments: # new in 1.1
163
+ Enabled: true
164
+ Lint/TripleQuotes: # new in 1.9
165
+ Enabled: true
166
+ Lint/UnexpectedBlockArity: # new in 1.5
167
+ Enabled: true
168
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
169
+ Enabled: true
170
+ Lint/UselessRescue: # new in 1.43
171
+ Enabled: true
172
+ Lint/UselessRuby2Keywords: # new in 1.23
173
+ Enabled: true
174
+ Metrics/CollectionLiteralLength: # new in 1.47
175
+ Enabled: true
176
+ Naming/BlockForwarding: # new in 1.24
177
+ Enabled: true
178
+ Security/CompoundHash: # new in 1.28
179
+ Enabled: true
180
+ Security/IoMethods: # new in 1.22
181
+ Enabled: true
182
+ Style/ArgumentsForwarding: # new in 1.1
183
+ Enabled: true
184
+ Style/ArrayIntersect: # new in 1.40
185
+ Enabled: true
186
+ Style/CollectionCompact: # new in 1.2
187
+ Enabled: true
188
+ Style/ComparableClamp: # new in 1.44
189
+ Enabled: true
190
+ Style/ConcatArrayLiterals: # new in 1.41
191
+ Enabled: true
192
+ Style/DataInheritance: # new in 1.49
193
+ Enabled: true
194
+ Style/DirEmpty: # new in 1.48
195
+ Enabled: true
196
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
197
+ Enabled: true
198
+ Style/EmptyHeredoc: # new in 1.32
199
+ Enabled: true
200
+ Style/EndlessMethod: # new in 1.8
201
+ Enabled: true
202
+ Style/EnvHome: # new in 1.29
203
+ Enabled: true
204
+ Style/ExactRegexpMatch: # new in 1.51
205
+ Enabled: true
206
+ Style/FetchEnvVar: # new in 1.28
207
+ Enabled: true
208
+ Style/FileEmpty: # new in 1.48
209
+ Enabled: true
210
+ Style/FileRead: # new in 1.24
211
+ Enabled: true
212
+ Style/FileWrite: # new in 1.24
213
+ Enabled: true
214
+ Style/HashConversion: # new in 1.10
215
+ Enabled: true
216
+ Style/HashExcept: # new in 1.7
217
+ Enabled: true
218
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
219
+ Enabled: true
220
+ Style/InPatternThen: # new in 1.16
221
+ Enabled: true
222
+ Style/MagicCommentFormat: # new in 1.35
223
+ Enabled: true
224
+ Style/MapCompactWithConditionalBlock: # new in 1.30
225
+ Enabled: true
226
+ Style/MapToHash: # new in 1.24
227
+ Enabled: true
228
+ Style/MapToSet: # new in 1.42
229
+ Enabled: true
230
+ Style/MinMaxComparison: # new in 1.42
231
+ Enabled: true
232
+ Style/MultilineInPatternThen: # new in 1.16
233
+ Enabled: true
234
+ Style/NegatedIfElseCondition: # new in 1.2
235
+ Enabled: true
236
+ Style/NestedFileDirname: # new in 1.26
237
+ Enabled: true
238
+ Style/NilLambda: # new in 1.3
239
+ Enabled: true
240
+ Style/NumberedParameters: # new in 1.22
241
+ Enabled: true
242
+ Style/NumberedParametersLimit: # new in 1.22
243
+ Enabled: true
244
+ Style/ObjectThen: # new in 1.28
245
+ Enabled: true
246
+ Style/OpenStructUse: # new in 1.23
247
+ Enabled: true
248
+ Style/OperatorMethodCall: # new in 1.37
249
+ Enabled: true
250
+ Style/QuotedSymbols: # new in 1.16
251
+ Enabled: true
252
+ Style/RedundantArgument: # new in 1.4
253
+ Enabled: true
254
+ Style/RedundantArrayConstructor: # new in 1.52
255
+ Enabled: true
256
+ Style/RedundantConstantBase: # new in 1.40
257
+ Enabled: true
258
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
259
+ Enabled: true
260
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
261
+ Enabled: true
262
+ Style/RedundantEach: # new in 1.38
263
+ Enabled: true
264
+ Style/RedundantFilterChain: # new in 1.52
265
+ Enabled: true
266
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
267
+ Enabled: true
268
+ Style/RedundantInitialize: # new in 1.27
269
+ Enabled: true
270
+ Style/RedundantLineContinuation: # new in 1.49
271
+ Enabled: true
272
+ Style/RedundantRegexpArgument: # new in 1.53
273
+ Enabled: true
274
+ Style/RedundantRegexpConstructor: # new in 1.52
275
+ Enabled: true
276
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
277
+ Enabled: true
278
+ Style/RedundantStringEscape: # new in 1.37
279
+ Enabled: true
280
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
281
+ Enabled: true
282
+ Style/SelectByRegexp: # new in 1.22
283
+ Enabled: true
284
+ Style/SingleLineDoEndBlock: # new in 1.57
285
+ Enabled: true
286
+ Style/StringChars: # new in 1.12
287
+ Enabled: true
288
+ Style/SuperWithArgsParentheses: # new in 1.58
289
+ Enabled: true
290
+ Style/SwapValues: # new in 1.1
291
+ Enabled: true
292
+ Style/YAMLFileRead: # new in 1.53
293
+ Enabled: true
294
+
295
+ AllCops:
296
+ SuggestExtensions: false
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
- source "https://rubygems.org"
2
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
- gemspec
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
5
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,22 +1,49 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- supersaas-api-client (1.1.0)
4
+ supersaas-api-client (2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- minitest (5.11.3)
10
- rake (10.5.0)
9
+ ast (2.4.2)
10
+ json (2.7.1)
11
+ language_server-protocol (3.17.0.3)
12
+ minitest (5.20.0)
13
+ parallel (1.24.0)
14
+ parser (3.3.0.4)
15
+ ast (~> 2.4.1)
16
+ racc
17
+ racc (1.7.3)
18
+ rainbow (3.1.1)
19
+ rake (13.1.0)
20
+ regexp_parser (2.9.0)
21
+ rexml (3.2.6)
22
+ rubocop (1.60.0)
23
+ json (~> 2.3)
24
+ language_server-protocol (>= 3.17.0)
25
+ parallel (~> 1.10)
26
+ parser (>= 3.3.0.2)
27
+ rainbow (>= 2.2.2, < 4.0)
28
+ regexp_parser (>= 1.8, < 3.0)
29
+ rexml (>= 3.2.5, < 4.0)
30
+ rubocop-ast (>= 1.30.0, < 2.0)
31
+ ruby-progressbar (~> 1.7)
32
+ unicode-display_width (>= 2.4.0, < 3.0)
33
+ rubocop-ast (1.30.0)
34
+ parser (>= 3.2.1.0)
35
+ ruby-progressbar (1.13.0)
36
+ unicode-display_width (2.5.0)
11
37
 
12
38
  PLATFORMS
13
39
  ruby
14
40
 
15
41
  DEPENDENCIES
16
- bundler (~> 1.17.3)
17
- minitest (~> 5.0)
18
- rake (~> 10.0)
42
+ bundler
43
+ minitest
44
+ rake
45
+ rubocop
19
46
  supersaas-api-client!
20
47
 
21
48
  BUNDLED WITH
22
- 1.17.3
49
+ 2.3.12