vitable-connect 0.2.1 → 0.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/README.md +1 -1
- data/lib/vitable_connect/internal/util.rb +21 -5
- data/lib/vitable_connect/models/employee.rb +10 -1
- data/lib/vitable_connect/version.rb +1 -1
- data/rbi/vitable_connect/internal/util.rbi +8 -0
- data/rbi/vitable_connect/models/employee.rbi +24 -0
- data/sig/vitable_connect/internal/util.rbs +4 -0
- data/sig/vitable_connect/models/employee.rbs +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d19150b41214f8f64eead96cac977500a2fec2b2af851569bae8878b6e313a57
|
|
4
|
+
data.tar.gz: bdccce83b4bb326a6c362e8640b70465c2cd5e28185757a47d200c6cefe943b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b546096529e4786fa985f0ce9843b8f7379f0d18968eb27b1f7b456719e216dff854037ae204f267515b305ebd89528f356f2cb2664377ea8140512cc3357d0a
|
|
7
|
+
data.tar.gz: b9fb5cabe64d38d8dc5fa19a93d3c5f2079b9dcbceff8aac61c0699ef6fce529cd1fcf373ce3bb58dc39bc1b724a8f1e31a4ab58bb42ec680d7b11847ff80275
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 (2026-04-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.2.2...v0.3.0](https://github.com/Vitable-Inc/vitable-connect-ruby/compare/v0.2.2...v0.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([f0f95aa](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/f0f95aad70b337a6bf9b73b671ffbeb3f082f8d2))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* multipart encoding for file arrays ([89441e1](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/89441e17106f9dcdb74cfb1a0ec5e59a8d2030f5))
|
|
15
|
+
|
|
16
|
+
## 0.2.2 (2026-04-03)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.2.1...v0.2.2](https://github.com/Vitable-Inc/vitable-connect-ruby/compare/v0.2.1...v0.2.2)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* align path encoding with RFC 3986 section 3.3 ([8dffaa7](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/8dffaa70c9a25f8c03eab999b3bcfb3eb0b151b8))
|
|
23
|
+
* variable name typo ([0c72698](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/0c7269861dfb77cc7b901b63229b420122751cbb))
|
|
24
|
+
|
|
25
|
+
## 0.2.2 (2026-04-01)
|
|
26
|
+
|
|
27
|
+
Full Changelog: [v0.2.1...v0.2.2](https://github.com/Vitable-Inc/vitable-connect-ruby/compare/v0.2.1...v0.2.2)
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* align path encoding with RFC 3986 section 3.3 ([8dffaa7](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/8dffaa70c9a25f8c03eab999b3bcfb3eb0b151b8))
|
|
32
|
+
* variable name typo ([0c72698](https://github.com/Vitable-Inc/vitable-connect-ruby/commit/0c7269861dfb77cc7b901b63229b420122751cbb))
|
|
33
|
+
|
|
3
34
|
## 0.2.1 (2026-03-28)
|
|
4
35
|
|
|
5
36
|
Full Changelog: [v0.2.0...v0.2.1](https://github.com/Vitable-Inc/vitable-connect-ruby/compare/v0.2.0...v0.2.1)
|
data/README.md
CHANGED
|
@@ -157,7 +157,7 @@ module VitableConnect
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{VitableConnect::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{VitableConnect::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module VitableConnect
|
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
# @type [Regexp]
|
|
241
|
+
#
|
|
242
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
243
|
+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
|
|
244
|
+
|
|
240
245
|
class << self
|
|
241
246
|
# @api private
|
|
242
247
|
#
|
|
@@ -247,6 +252,15 @@ module VitableConnect
|
|
|
247
252
|
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
248
253
|
end
|
|
249
254
|
|
|
255
|
+
# @api private
|
|
256
|
+
#
|
|
257
|
+
# @param path [String, Integer]
|
|
258
|
+
#
|
|
259
|
+
# @return [String]
|
|
260
|
+
def encode_path(path)
|
|
261
|
+
path.to_s.gsub(VitableConnect::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
|
|
262
|
+
end
|
|
263
|
+
|
|
250
264
|
# @api private
|
|
251
265
|
#
|
|
252
266
|
# @param path [String, Array<String>]
|
|
@@ -259,7 +273,7 @@ module VitableConnect
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -576,10 +590,10 @@ module VitableConnect
|
|
|
576
590
|
|
|
577
591
|
case val
|
|
578
592
|
in VitableConnect::FilePart unless val.filename.nil?
|
|
579
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
580
594
|
y << "; filename=\"#{filename}\""
|
|
581
595
|
in Pathname | IO
|
|
582
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
583
597
|
y << "; filename=\"#{filename}\""
|
|
584
598
|
else
|
|
585
599
|
end
|
|
@@ -596,6 +610,7 @@ module VitableConnect
|
|
|
596
610
|
#
|
|
597
611
|
# @return [Array(String, Enumerable<String>)]
|
|
598
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
599
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
600
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
601
616
|
|
|
@@ -605,7 +620,7 @@ module VitableConnect
|
|
|
605
620
|
in Hash
|
|
606
621
|
body.each do |key, val|
|
|
607
622
|
case val
|
|
608
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || VitableConnect::Internal::Type::FileInput === _1 }
|
|
609
624
|
val.each do |v|
|
|
610
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
611
626
|
end
|
|
@@ -621,6 +636,7 @@ module VitableConnect
|
|
|
621
636
|
|
|
622
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
623
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
624
640
|
end
|
|
625
641
|
|
|
626
642
|
# @api private
|
|
@@ -188,6 +188,9 @@ module VitableConnect
|
|
|
188
188
|
required :deduction_category, String, nil?: true
|
|
189
189
|
|
|
190
190
|
# @!attribute frequency
|
|
191
|
+
# - `weekly` - Weekly
|
|
192
|
+
# - `bi_weekly` - Bi Weekly
|
|
193
|
+
# - `semi_monthly` - Semi Monthly
|
|
191
194
|
# - `monthly` - Monthly
|
|
192
195
|
#
|
|
193
196
|
# @return [Symbol, VitableConnect::Models::Employee::Deduction::Frequency]
|
|
@@ -223,7 +226,7 @@ module VitableConnect
|
|
|
223
226
|
#
|
|
224
227
|
# @param deduction_category [String, nil] Deduction category (reserved for future use)
|
|
225
228
|
#
|
|
226
|
-
# @param frequency [Symbol, VitableConnect::Models::Employee::Deduction::Frequency] - `
|
|
229
|
+
# @param frequency [Symbol, VitableConnect::Models::Employee::Deduction::Frequency] - `weekly` - Weekly
|
|
227
230
|
#
|
|
228
231
|
# @param period_end_date [Date] Period end date (YYYY-MM-DD)
|
|
229
232
|
#
|
|
@@ -231,12 +234,18 @@ module VitableConnect
|
|
|
231
234
|
#
|
|
232
235
|
# @param tax_classification [Symbol, VitableConnect::Models::Employee::Deduction::TaxClassification] - `Unknown` - Unknown
|
|
233
236
|
|
|
237
|
+
# - `weekly` - Weekly
|
|
238
|
+
# - `bi_weekly` - Bi Weekly
|
|
239
|
+
# - `semi_monthly` - Semi Monthly
|
|
234
240
|
# - `monthly` - Monthly
|
|
235
241
|
#
|
|
236
242
|
# @see VitableConnect::Models::Employee::Deduction#frequency
|
|
237
243
|
module Frequency
|
|
238
244
|
extend VitableConnect::Internal::Type::Enum
|
|
239
245
|
|
|
246
|
+
WEEKLY = :weekly
|
|
247
|
+
BI_WEEKLY = :bi_weekly
|
|
248
|
+
SEMI_MONTHLY = :semi_monthly
|
|
240
249
|
MONTHLY = :monthly
|
|
241
250
|
|
|
242
251
|
# @!method self.values
|
|
@@ -148,12 +148,20 @@ module VitableConnect
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -218,6 +218,9 @@ module VitableConnect
|
|
|
218
218
|
sig { returns(T.nilable(String)) }
|
|
219
219
|
attr_accessor :deduction_category
|
|
220
220
|
|
|
221
|
+
# - `weekly` - Weekly
|
|
222
|
+
# - `bi_weekly` - Bi Weekly
|
|
223
|
+
# - `semi_monthly` - Semi Monthly
|
|
221
224
|
# - `monthly` - Monthly
|
|
222
225
|
sig do
|
|
223
226
|
returns(VitableConnect::Employee::Deduction::Frequency::TaggedSymbol)
|
|
@@ -261,6 +264,9 @@ module VitableConnect
|
|
|
261
264
|
deduction_amount_in_cents:,
|
|
262
265
|
# Deduction category (reserved for future use)
|
|
263
266
|
deduction_category:,
|
|
267
|
+
# - `weekly` - Weekly
|
|
268
|
+
# - `bi_weekly` - Bi Weekly
|
|
269
|
+
# - `semi_monthly` - Semi Monthly
|
|
264
270
|
# - `monthly` - Monthly
|
|
265
271
|
frequency:,
|
|
266
272
|
# Period end date (YYYY-MM-DD)
|
|
@@ -292,6 +298,9 @@ module VitableConnect
|
|
|
292
298
|
def to_hash
|
|
293
299
|
end
|
|
294
300
|
|
|
301
|
+
# - `weekly` - Weekly
|
|
302
|
+
# - `bi_weekly` - Bi Weekly
|
|
303
|
+
# - `semi_monthly` - Semi Monthly
|
|
295
304
|
# - `monthly` - Monthly
|
|
296
305
|
module Frequency
|
|
297
306
|
extend VitableConnect::Internal::Type::Enum
|
|
@@ -302,6 +311,21 @@ module VitableConnect
|
|
|
302
311
|
end
|
|
303
312
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
304
313
|
|
|
314
|
+
WEEKLY =
|
|
315
|
+
T.let(
|
|
316
|
+
:weekly,
|
|
317
|
+
VitableConnect::Employee::Deduction::Frequency::TaggedSymbol
|
|
318
|
+
)
|
|
319
|
+
BI_WEEKLY =
|
|
320
|
+
T.let(
|
|
321
|
+
:bi_weekly,
|
|
322
|
+
VitableConnect::Employee::Deduction::Frequency::TaggedSymbol
|
|
323
|
+
)
|
|
324
|
+
SEMI_MONTHLY =
|
|
325
|
+
T.let(
|
|
326
|
+
:semi_monthly,
|
|
327
|
+
VitableConnect::Employee::Deduction::Frequency::TaggedSymbol
|
|
328
|
+
)
|
|
305
329
|
MONTHLY =
|
|
306
330
|
T.let(
|
|
307
331
|
:monthly,
|
|
@@ -45,8 +45,12 @@ module VitableConnect
|
|
|
45
45
|
-> top?
|
|
46
46
|
} -> top?
|
|
47
47
|
|
|
48
|
+
RFC_3986_NOT_PCHARS: Regexp
|
|
49
|
+
|
|
48
50
|
def self?.uri_origin: (URI::Generic uri) -> String
|
|
49
51
|
|
|
52
|
+
def self?.encode_path: (String | Integer path) -> String
|
|
53
|
+
|
|
50
54
|
def self?.interpolate_path: (String | ::Array[String] path) -> String
|
|
51
55
|
|
|
52
56
|
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
|
|
@@ -152,11 +152,14 @@ module VitableConnect
|
|
|
152
152
|
tax_classification: VitableConnect::Models::Employee::Deduction::tax_classification
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
type frequency = :monthly
|
|
155
|
+
type frequency = :weekly | :bi_weekly | :semi_monthly | :monthly
|
|
156
156
|
|
|
157
157
|
module Frequency
|
|
158
158
|
extend VitableConnect::Internal::Type::Enum
|
|
159
159
|
|
|
160
|
+
WEEKLY: :weekly
|
|
161
|
+
BI_WEEKLY: :bi_weekly
|
|
162
|
+
SEMI_MONTHLY: :semi_monthly
|
|
160
163
|
MONTHLY: :monthly
|
|
161
164
|
|
|
162
165
|
def self?.values: -> ::Array[VitableConnect::Models::Employee::Deduction::frequency]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vitable-connect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vitable Connect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|