parking_ticket 1.0.46 → 1.0.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -0
  3. data/.vscode/settings.json +3 -0
  4. data/Gemfile +0 -15
  5. data/Gemfile.lock +72 -4
  6. data/Rakefile +2 -2
  7. data/bin/console +3 -3
  8. data/bin/tapioca +29 -0
  9. data/lib/clients/models/payment_method.rb +15 -0
  10. data/lib/clients/models/quote.rb +16 -0
  11. data/lib/clients/models/rate_option.rb +19 -0
  12. data/lib/clients/models/structuraly_comparable.rb +14 -0
  13. data/lib/clients/models/ticket.rb +19 -0
  14. data/lib/clients/models/vehicle.rb +17 -0
  15. data/lib/clients/pay_by_phone/adapter.rb +107 -53
  16. data/lib/clients/pay_by_phone/client.rb +101 -38
  17. data/lib/parking_ticket/configuration.rb +3 -0
  18. data/lib/parking_ticket/version.rb +2 -1
  19. data/lib/parking_ticket.rb +79 -54
  20. data/sorbet/config +4 -0
  21. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  22. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  23. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  24. data/sorbet/rbi/gems/addressable@2.8.1.rbi +2000 -0
  25. data/sorbet/rbi/gems/amazing_print@1.4.0.rbi +872 -0
  26. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  27. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  28. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
  29. data/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi +146 -0
  30. data/sorbet/rbi/gems/faraday@2.7.2.rbi +2518 -0
  31. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +350 -0
  32. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  33. data/sorbet/rbi/gems/json_matchers@0.11.1.rbi +133 -0
  34. data/sorbet/rbi/gems/json_schema@0.21.0.rbi +1165 -0
  35. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  36. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  37. data/sorbet/rbi/gems/parser@3.2.2.0.rbi +7207 -0
  38. data/sorbet/rbi/gems/public_suffix@5.0.1.rbi +940 -0
  39. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  40. data/sorbet/rbi/gems/rake@13.0.6.rbi +2881 -0
  41. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  42. data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +3600 -0
  43. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4823 -0
  44. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10826 -0
  45. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8118 -0
  46. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5300 -0
  47. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1615 -0
  48. data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
  49. data/sorbet/rbi/gems/rubocop-ast@1.28.0.rbi +6985 -0
  50. data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +1043 -0
  51. data/sorbet/rbi/gems/rubocop@1.48.1.rbi +54934 -0
  52. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  53. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  54. data/sorbet/rbi/gems/spoom@1.2.1.rbi +2503 -0
  55. data/sorbet/rbi/gems/tapioca@0.11.4.rbi +3212 -0
  56. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  57. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  58. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
  59. data/sorbet/rbi/gems/vcr@6.1.0.rbi +3023 -0
  60. data/sorbet/rbi/gems/webmock@3.18.1.rbi +1728 -0
  61. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2584 -0
  62. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  63. data/sorbet/rbi/gems/yard@0.9.28.rbi +17802 -0
  64. data/sorbet/tapioca/config.yml +13 -0
  65. data/sorbet/tapioca/require.rb +4 -0
  66. metadata +241 -4
  67. data/lib/clients/adapter.rb +0 -75
@@ -0,0 +1,350 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `hashdiff` gem.
5
+ # Please instead update this file by running `bin/tapioca gem hashdiff`.
6
+
7
+ # This module provides methods to diff two hash, patch and unpatch hash
8
+ #
9
+ # source://hashdiff//lib/hashdiff/util.rb#3
10
+ module Hashdiff
11
+ class << self
12
+ # Best diff two objects, which tries to generate the smallest change set using different similarity values.
13
+ #
14
+ # Hashdiff.best_diff is useful in case of comparing two objects which include similar hashes in arrays.
15
+ #
16
+ # @example
17
+ # a = {'x' => [{'a' => 1, 'c' => 3, 'e' => 5}, {'y' => 3}]}
18
+ # b = {'x' => [{'a' => 1, 'b' => 2, 'e' => 5}] }
19
+ # diff = Hashdiff.best_diff(a, b)
20
+ # diff.should == [['-', 'x[0].c', 3], ['+', 'x[0].b', 2], ['-', 'x[1].y', 3], ['-', 'x[1]', {}]]
21
+ # @param obj1 [Array, Hash]
22
+ # @param obj2 [Array, Hash]
23
+ # @param options [Hash] the options to use when comparing
24
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
25
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
26
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
27
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
28
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
29
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
30
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
31
+ # @return [Array] an array of changes.
32
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
33
+ # @since 0.0.1
34
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
35
+ #
36
+ # source://hashdiff//lib/hashdiff/diff.rb#31
37
+ def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end
38
+
39
+ # check if objects are comparable
40
+ #
41
+ # @private
42
+ # @return [Boolean]
43
+ #
44
+ # source://hashdiff//lib/hashdiff/util.rb#108
45
+ def comparable?(obj1, obj2, strict = T.unsafe(nil)); end
46
+
47
+ # check for equality or "closeness" within given tolerance
48
+ #
49
+ # @private
50
+ #
51
+ # source://hashdiff//lib/hashdiff/util.rb#86
52
+ def compare_values(obj1, obj2, options = T.unsafe(nil)); end
53
+
54
+ # count node differences
55
+ #
56
+ # @private
57
+ #
58
+ # source://hashdiff//lib/hashdiff/util.rb#25
59
+ def count_diff(diffs); end
60
+
61
+ # count total nodes for an object
62
+ #
63
+ # @private
64
+ #
65
+ # source://hashdiff//lib/hashdiff/util.rb#36
66
+ def count_nodes(obj); end
67
+
68
+ # try custom comparison
69
+ #
70
+ # @private
71
+ #
72
+ # source://hashdiff//lib/hashdiff/util.rb#119
73
+ def custom_compare(method, key, obj1, obj2); end
74
+
75
+ # decode property path into an array
76
+ # e.g. "a.b[3].c" => ['a', 'b', 3, 'c']
77
+ #
78
+ # @param path [String] Property-string
79
+ # @param delimiter [String] Property-string delimiter
80
+ # @private
81
+ #
82
+ # source://hashdiff//lib/hashdiff/util.rb#58
83
+ def decode_property_path(path, delimiter = T.unsafe(nil)); end
84
+
85
+ # Compute the diff of two hashes or arrays
86
+ #
87
+ # @example
88
+ # a = {"a" => 1, "b" => {"b1" => 1, "b2" =>2}}
89
+ # b = {"a" => 1, "b" => {}}
90
+ #
91
+ # diff = Hashdiff.diff(a, b)
92
+ # diff.should == [['-', 'b.b1', 1], ['-', 'b.b2', 2]]
93
+ # @param obj1 [Array, Hash]
94
+ # @param obj2 [Array, Hash]
95
+ # @param options [Hash] the options to use when comparing
96
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
97
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
98
+ # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
99
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
100
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
101
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
102
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
103
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
104
+ # @return [Array] an array of changes.
105
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
106
+ # @since 0.0.1
107
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
108
+ #
109
+ # source://hashdiff//lib/hashdiff/diff.rb#78
110
+ def diff(obj1, obj2, options = T.unsafe(nil), &block); end
111
+
112
+ # diff array using LCS algorithm
113
+ #
114
+ # @private
115
+ # @yield [links]
116
+ #
117
+ # source://hashdiff//lib/hashdiff/diff.rb#119
118
+ def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end
119
+
120
+ # caculate array difference using LCS algorithm
121
+ # http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
122
+ #
123
+ # @private
124
+ #
125
+ # source://hashdiff//lib/hashdiff/lcs.rb#8
126
+ def lcs(arraya, arrayb, options = T.unsafe(nil)); end
127
+
128
+ # get the node of hash by given path parts
129
+ #
130
+ # @private
131
+ #
132
+ # source://hashdiff//lib/hashdiff/util.rb#75
133
+ def node(hash, parts); end
134
+
135
+ # Apply patch to object
136
+ #
137
+ # @param obj [Hash, Array] the object to be patched, can be an Array or a Hash
138
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
139
+ # @param options [Hash] supports following keys:
140
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
141
+ # @return the object after patch
142
+ # @since 0.0.1
143
+ #
144
+ # source://hashdiff//lib/hashdiff/patch.rb#17
145
+ def patch!(obj, changes, options = T.unsafe(nil)); end
146
+
147
+ # source://hashdiff//lib/hashdiff/util.rb#137
148
+ def prefix_append_array_index(prefix, array_index, opts); end
149
+
150
+ # source://hashdiff//lib/hashdiff/util.rb#129
151
+ def prefix_append_key(prefix, key, opts); end
152
+
153
+ # judge whether two objects are similar
154
+ #
155
+ # @private
156
+ # @return [Boolean]
157
+ #
158
+ # source://hashdiff//lib/hashdiff/util.rb#7
159
+ def similar?(obja, objb, options = T.unsafe(nil)); end
160
+
161
+ # Unpatch an object
162
+ #
163
+ # @param obj [Hash, Array] the object to be unpatched, can be an Array or a Hash
164
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
165
+ # @param options [Hash] supports following keys:
166
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
167
+ # @return the object after unpatch
168
+ # @since 0.0.1
169
+ #
170
+ # source://hashdiff//lib/hashdiff/patch.rb#58
171
+ def unpatch!(obj, changes, options = T.unsafe(nil)); end
172
+
173
+ private
174
+
175
+ # checks if both objects are Arrays or Hashes
176
+ #
177
+ # @private
178
+ # @return [Boolean]
179
+ #
180
+ # source://hashdiff//lib/hashdiff/util.rb#151
181
+ def any_hash_or_array?(obja, objb); end
182
+ end
183
+ end
184
+
185
+ # Used to compare hashes
186
+ #
187
+ # @private
188
+ #
189
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#6
190
+ class Hashdiff::CompareHashes
191
+ class << self
192
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#8
193
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
194
+ end
195
+ end
196
+
197
+ # Used to compare arrays using the lcs algorithm
198
+ #
199
+ # @private
200
+ #
201
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#6
202
+ class Hashdiff::LcsCompareArrays
203
+ class << self
204
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#8
205
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
206
+ end
207
+ end
208
+
209
+ # Used to compare arrays in a linear complexity, which produces longer diffs
210
+ # than using the lcs algorithm but is considerably faster
211
+ #
212
+ # @private
213
+ #
214
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#8
215
+ class Hashdiff::LinearCompareArray
216
+ # @return [LinearCompareArray] a new instance of LinearCompareArray
217
+ #
218
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#45
219
+ def initialize(old_array, new_array, options); end
220
+
221
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#14
222
+ def call; end
223
+
224
+ private
225
+
226
+ # Returns the value of attribute additions.
227
+ #
228
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
229
+ def additions; end
230
+
231
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#139
232
+ def append_addition(item, index); end
233
+
234
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#123
235
+ def append_addititions_before_match(match_index); end
236
+
237
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#144
238
+ def append_deletion(item, index); end
239
+
240
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#131
241
+ def append_deletions_before_match(match_index); end
242
+
243
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#149
244
+ def append_differences(difference); end
245
+
246
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#153
247
+ def changes; end
248
+
249
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#67
250
+ def compare_at_index; end
251
+
252
+ # Returns the value of attribute deletions.
253
+ #
254
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
255
+ def deletions; end
256
+
257
+ # Returns the value of attribute differences.
258
+ #
259
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
260
+ def differences; end
261
+
262
+ # Returns the value of attribute expected_additions.
263
+ #
264
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
265
+ def expected_additions; end
266
+
267
+ # Sets the attribute expected_additions
268
+ #
269
+ # @param value the value to set the attribute expected_additions to.
270
+ #
271
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
272
+ def expected_additions=(_arg0); end
273
+
274
+ # @return [Boolean]
275
+ #
276
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#59
277
+ def extra_items_in_new_array?; end
278
+
279
+ # @return [Boolean]
280
+ #
281
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#55
282
+ def extra_items_in_old_array?; end
283
+
284
+ # look ahead in the new array to see if the current item appears later
285
+ # thereby having new items added
286
+ #
287
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#89
288
+ def index_of_match_after_additions; end
289
+
290
+ # look ahead in the old array to see if the current item appears later
291
+ # thereby having items removed
292
+ #
293
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#107
294
+ def index_of_match_after_deletions; end
295
+
296
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#82
297
+ def item_difference(old_item, new_item, item_index); end
298
+
299
+ # @return [Boolean]
300
+ #
301
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#63
302
+ def iterated_through_both_arrays?; end
303
+
304
+ # Returns the value of attribute new_array.
305
+ #
306
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
307
+ def new_array; end
308
+
309
+ # Returns the value of attribute new_index.
310
+ #
311
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
312
+ def new_index; end
313
+
314
+ # Sets the attribute new_index
315
+ #
316
+ # @param value the value to set the attribute new_index to.
317
+ #
318
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
319
+ def new_index=(_arg0); end
320
+
321
+ # Returns the value of attribute old_array.
322
+ #
323
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
324
+ def old_array; end
325
+
326
+ # Returns the value of attribute old_index.
327
+ #
328
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
329
+ def old_index; end
330
+
331
+ # Sets the attribute old_index
332
+ #
333
+ # @param value the value to set the attribute old_index to.
334
+ #
335
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
336
+ def old_index=(_arg0); end
337
+
338
+ # Returns the value of attribute options.
339
+ #
340
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
341
+ def options; end
342
+
343
+ class << self
344
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#9
345
+ def call(old_array, new_array, options = T.unsafe(nil)); end
346
+ end
347
+ end
348
+
349
+ # source://hashdiff//lib/hashdiff/version.rb#4
350
+ Hashdiff::VERSION = T.let(T.unsafe(nil), String)