timelogic-api 1.0.3 → 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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +314 -133
  3. data/docs/BulkError.md +1 -1
  4. data/docs/CalendarResponse.md +2 -2
  5. data/docs/DstResponse.md +2 -2
  6. data/docs/ElapsedResponse.md +1 -1
  7. data/docs/ErrorResponse.md +1 -1
  8. data/docs/JwkKey.md +5 -1
  9. data/docs/TimeApi.md +157 -155
  10. data/docs/TimePayload.md +1 -1
  11. data/docs/TimezoneMatch.md +3 -23
  12. data/docs/TimezoneResponse.md +46 -0
  13. data/lib/timelogic-api/api/time_api.rb +175 -180
  14. data/lib/timelogic-api/api/utility_api.rb +1 -1
  15. data/lib/timelogic-api/api_client.rb +3 -1
  16. data/lib/timelogic-api/api_error.rb +1 -1
  17. data/lib/timelogic-api/configuration.rb +1 -1
  18. data/lib/timelogic-api/models/api_error.rb +1 -1
  19. data/lib/timelogic-api/models/bulk_error.rb +2 -2
  20. data/lib/timelogic-api/models/calendar_response.rb +3 -1
  21. data/lib/timelogic-api/models/diff_endpoint_ref.rb +1 -1
  22. data/lib/timelogic-api/models/diff_response.rb +1 -1
  23. data/lib/timelogic-api/models/dst_response.rb +3 -1
  24. data/lib/timelogic-api/models/elapsed_response.rb +2 -2
  25. data/lib/timelogic-api/models/error_response.rb +2 -2
  26. data/lib/timelogic-api/models/get_current_time200_response.rb +1 -1
  27. data/lib/timelogic-api/models/jwk_key.rb +27 -5
  28. data/lib/timelogic-api/models/jwks_response.rb +1 -1
  29. data/lib/timelogic-api/models/time_payload.rb +2 -1
  30. data/lib/timelogic-api/models/time_payload_bulk_item.rb +1 -1
  31. data/lib/timelogic-api/models/time_payload_bulk_response.rb +29 -183
  32. data/lib/timelogic-api/models/timezone_match.rb +6 -186
  33. data/lib/timelogic-api/models/{timezone_offset_response.rb → timezone_response.rb} +21 -14
  34. data/lib/timelogic-api/version.rb +1 -1
  35. data/lib/timelogic-api/world_time_api.rb +192 -0
  36. data/lib/timelogic-api.rb +3 -4
  37. metadata +5 -8
  38. data/docs/GetTimezone200Response.md +0 -49
  39. data/docs/TimezoneOffsetResponse.md +0 -44
  40. data/docs/TimezoneResolvedResponse.md +0 -42
  41. data/lib/timelogic-api/models/get_timezone200_response.rb +0 -105
  42. data/lib/timelogic-api/models/timezone_resolved_response.rb +0 -434
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -309,6 +309,8 @@ module TimeLogic::Api
309
309
  Array(auth_names).each do |auth_name|
310
310
  auth_setting = @config.auth_settings[auth_name]
311
311
  next unless auth_setting
312
+ value = auth_setting[:value].to_s.strip
313
+ next if value.empty? || value == 'Bearer'
312
314
  case auth_setting[:in]
313
315
  when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
314
316
  when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -20,7 +20,7 @@ module TimeLogic::Api
20
20
 
21
21
  attr_accessor :request_id
22
22
 
23
- # Intentionally omitted from public API error responses to avoid exposing request timing; use request_id for support correlation.
23
+ # Intentionally omitted from public API error responses, including per-item errors inside bulk arrays, to avoid exposing request timing; use request_id for support correlation.
24
24
  attr_accessor :timestamp
25
25
 
26
26
  attr_accessor :item
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -27,6 +27,7 @@ module TimeLogic::Api
27
27
 
28
28
  attr_accessor :human
29
29
 
30
+ # Day of the week counted from Sunday (1 = Sunday, 2 = Monday ... 7 = Saturday).
30
31
  attr_accessor :day_number
31
32
 
32
33
  attr_accessor :day_short
@@ -45,6 +46,7 @@ module TimeLogic::Api
45
46
 
46
47
  attr_accessor :day
47
48
 
49
+ # ISO 8601 week number (present with `week=true`). It belongs to the ISO week-year, which is not returned and can differ from `year` near January 1 (2027-01-01 is week 53 of 2026).
48
50
  attr_accessor :week_number
49
51
 
50
52
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -27,6 +27,7 @@ module TimeLogic::Api
27
27
 
28
28
  attr_accessor :human
29
29
 
30
+ # Day of the week counted from Sunday (1 = Sunday, 2 = Monday ... 7 = Saturday).
30
31
  attr_accessor :day_number
31
32
 
32
33
  attr_accessor :day_short
@@ -39,6 +40,7 @@ module TimeLogic::Api
39
40
 
40
41
  attr_accessor :dst_active
41
42
 
43
+ # Present only with `next=true`. The instant of the next UTC offset change, written in the offset in force before it (e.g. `2026-11-01T02:00:00-04:00`); the new offset is not returned. `null` when no change is scheduled, for offset targets and with no selector. Tracks offset changes only, so `dst_active` can change without one.
42
44
  attr_accessor :next_transition
43
45
 
44
46
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -25,7 +25,7 @@ module TimeLogic::Api
25
25
 
26
26
  attr_accessor :human
27
27
 
28
- # `left` means the target instant is still in the future. `passed` means the target instant is already in the past.
28
+ # `left` means the reference instant is after the compared instant (now, or `compare_*`). `passed` means it is before it, or equal to it.
29
29
  attr_accessor :direction
30
30
 
31
31
  attr_accessor :formatted
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -19,7 +19,7 @@ module TimeLogic::Api
19
19
 
20
20
  attr_accessor :request_id
21
21
 
22
- # Intentionally omitted from public API error responses to avoid exposing request timing; use request_id for support correlation.
22
+ # Intentionally omitted from public API error responses, including per-item errors inside bulk arrays, to avoid exposing request timing; use request_id for support correlation.
23
23
  attr_accessor :timestamp
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -27,6 +27,12 @@ module TimeLogic::Api
27
27
 
28
28
  attr_accessor :x
29
29
 
30
+ # Permitted key operations; published keys allow only `verify`.
31
+ attr_accessor :key_ops
32
+
33
+ # JWK extractable flag as exported by the signing worker; always `true`.
34
+ attr_accessor :ext
35
+
30
36
  class EnumAttributeValidator
31
37
  attr_reader :datatype
32
38
  attr_reader :allowable_values
@@ -57,7 +63,9 @@ module TimeLogic::Api
57
63
  :'alg' => :'alg',
58
64
  :'use' => :'use',
59
65
  :'kid' => :'kid',
60
- :'x' => :'x'
66
+ :'x' => :'x',
67
+ :'key_ops' => :'key_ops',
68
+ :'ext' => :'ext'
61
69
  }
62
70
  end
63
71
 
@@ -74,7 +82,9 @@ module TimeLogic::Api
74
82
  :'alg' => :'String',
75
83
  :'use' => :'String',
76
84
  :'kid' => :'String',
77
- :'x' => :'String'
85
+ :'x' => :'String',
86
+ :'key_ops' => :'Array<String>',
87
+ :'ext' => :'Boolean'
78
88
  }
79
89
  end
80
90
 
@@ -134,6 +144,16 @@ module TimeLogic::Api
134
144
  else
135
145
  self.x = nil
136
146
  end
147
+
148
+ if attributes.key?(:'key_ops')
149
+ if (value = attributes[:'key_ops']).is_a?(Array)
150
+ self.key_ops = value
151
+ end
152
+ end
153
+
154
+ if attributes.key?(:'ext')
155
+ self.ext = attributes[:'ext']
156
+ end
137
157
  end
138
158
 
139
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -239,7 +259,9 @@ module TimeLogic::Api
239
259
  alg == o.alg &&
240
260
  use == o.use &&
241
261
  kid == o.kid &&
242
- x == o.x
262
+ x == o.x &&
263
+ key_ops == o.key_ops &&
264
+ ext == o.ext
243
265
  end
244
266
 
245
267
  # @see the `==` method
@@ -251,7 +273,7 @@ module TimeLogic::Api
251
273
  # Calculates hash code according to all attributes.
252
274
  # @return [Integer] Hash code
253
275
  def hash
254
- [kty, crv, alg, use, kid, x].hash
276
+ [kty, crv, alg, use, kid, x, key_ops, ext].hash
255
277
  end
256
278
 
257
279
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -28,6 +28,7 @@ module TimeLogic::Api
28
28
 
29
29
  attr_accessor :human
30
30
 
31
+ # Day of the week counted from Sunday (1 = Sunday, 2 = Monday ... 7 = Saturday).
31
32
  attr_accessor :day_number
32
33
 
33
34
  attr_accessor :day_short
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #TimeLogic API | A World Time API
3
3
 
4
- # Official public API contract for TimeLogic API.
4
+ #Direct API contract for client integrations. It documents authentication, endpoint parameters, response shapes, public signing keys, and signed JSON controls. Authentication: - the API supports `Authorization: Bearer <token>`, `X-API-Key`, and `api_key` query credentials - RapidAPI access uses `X-RapidAPI-Key` and `X-RapidAPI-Host`; the SDKs expose this as a `rapidApi` transport option that accepts only the RapidAPI key Behavioral notes: - all documented operations are `GET` - only one selector family may be used at a time - current and convert support bulk only through one comma-separated `tz`, `ip`, or `offset` selector - bulk selectors accept at most 10 values, and every request URL is limited to 8192 characters - add, diff, calendar, dst, elapsed, timezone, and clock are single-target routes - credentials are extracted in Authorization, X-API-Key, then api_key query order; conflicting values are rejected - the first server is the default API host. The second server is the RapidAPI gateway and can be selected or overridden by SDK configuration - `sign` is available on supported JSON routes and is not supported on `/v1/time/clock`
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
 
@@ -10,201 +10,47 @@ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
- require 'date'
14
- require 'time'
15
-
16
13
  module TimeLogic::Api
17
- # Bulk response array returned when `/v1/time/current` or `/v1/time/convert` receives one comma-separated `tz`, `ip`, or `offset` selector.
14
+ # Bulk response array returned when `/v1/time/current` or `/v1/time/convert`
15
+ # receives one comma-separated `tz`, `ip`, or `offset` selector. Each item is
16
+ # a TimePayload or, for a selector that failed, a BulkError, in request order.
18
17
  class TimePayloadBulkResponse < Array
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- }
23
- end
24
-
25
- # Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
26
- def self.acceptable_attributes
27
- attribute_map.values.concat(superclass.acceptable_attributes)
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.openapi_types
32
- {
33
- }
34
- end
35
-
36
- # List of attributes with nullable: true
37
- def self.openapi_nullable
38
- Set.new([
39
- ])
40
- end
41
-
42
- # Initializes the object
43
- # @param [Hash] attributes Model attributes in the form of hash
44
- def initialize(attributes = {})
45
- if (!attributes.is_a?(Hash))
46
- fail ArgumentError, "The input argument (attributes) must be a hash in `TimeLogic::Api::TimePayloadBulkResponse` initialize method"
18
+ # The oneOf caster calls build for models that answer openapi_one_of.
19
+ # This model is not a oneOf itself; it answers so its items are cast.
20
+ def self.openapi_one_of
21
+ [:TimePayloadBulkItem]
22
+ end
23
+
24
+ # Builds the bulk array from parsed JSON, or returns nil for anything else.
25
+ # @param [Array] data Parsed JSON array
26
+ # @return [TimePayloadBulkResponse, nil]
27
+ def self.build(data)
28
+ return nil unless data.is_a?(Array)
29
+ items = data.map do |item|
30
+ TimePayloadBulkItem.build(item) || fail(ArgumentError, "#{item} is neither a TimePayload nor a BulkError")
47
31
  end
48
-
49
- # check to see if the attribute exists and convert string to symbol for hash key
50
- attributes = attributes.each_with_object({}) { |(k, v), h|
51
- if (!self.class.attribute_map.key?(k.to_sym))
52
- fail ArgumentError, "`#{k}` is not a valid attribute in `TimeLogic::Api::TimePayloadBulkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
- end
54
- h[k.to_sym] = v
55
- }
56
-
57
- # call parent's initialize
58
- super(attributes)
59
- end
60
-
61
- # Show invalid properties with the reasons. Usually used together with valid?
62
- # @return Array for valid properties with the reasons
63
- def list_invalid_properties
64
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
65
- invalid_properties = super
66
- invalid_properties
67
- end
68
-
69
- # Check to see if the all the properties in the model are valid
70
- # @return true if the model is valid
71
- def valid?
72
- warn '[DEPRECATED] the `valid?` method is obsolete'
73
- true && super
74
- end
75
-
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class && super(o)
32
+ new(items)
81
33
  end
82
34
 
83
- # @see the `==` method
84
- # @param [Object] Object to be compared
85
- def eql?(o)
86
- self == o
35
+ # @see build
36
+ def self.build_from_hash(data)
37
+ build(data)
87
38
  end
88
39
 
89
- # Calculates hash code according to all attributes.
90
- # @return [Integer] Hash code
91
- def hash
92
- [].hash
40
+ # True when the item is a per-item error.
41
+ def self.bulk_error?(item)
42
+ item.is_a?(BulkError)
93
43
  end
94
44
 
95
- # Builds the object from hash
96
- # @param [Hash] attributes Model attributes in the form of hash
97
- # @return [Object] Returns the model itself
98
- def self.build_from_hash(attributes)
99
- return nil unless attributes.is_a?(Hash)
100
- super(attributes)
101
- attributes = attributes.transform_keys(&:to_sym)
102
- transformed_hash = {}
103
- openapi_types.each_pair do |key, type|
104
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
105
- transformed_hash["#{key}"] = nil
106
- elsif type =~ /\AArray<(.*)>/i
107
- # check to ensure the input is an array given that the attribute
108
- # is documented as an array but the input is not
109
- if attributes[attribute_map[key]].is_a?(Array)
110
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
111
- end
112
- elsif !attributes[attribute_map[key]].nil?
113
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
114
- end
115
- end
116
- new(transformed_hash)
117
- end
118
-
119
- # Deserializes the data based on type
120
- # @param string type Data type
121
- # @param string value Value to be deserialized
122
- # @return [Object] Deserialized data
123
- def self._deserialize(type, value)
124
- case type.to_sym
125
- when :Time
126
- Time.parse(value)
127
- when :Date
128
- Date.parse(value)
129
- when :String
130
- value.to_s
131
- when :Integer
132
- value.to_i
133
- when :Float
134
- value.to_f
135
- when :Boolean
136
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
- true
138
- else
139
- false
140
- end
141
- when :Object
142
- # generic object (usually a Hash), return directly
143
- value
144
- when /\AArray<(?<inner_type>.+)>\z/
145
- inner_type = Regexp.last_match[:inner_type]
146
- value.map { |v| _deserialize(inner_type, v) }
147
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
- k_type = Regexp.last_match[:k_type]
149
- v_type = Regexp.last_match[:v_type]
150
- {}.tap do |hash|
151
- value.each do |k, v|
152
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
- end
154
- end
155
- else # model
156
- # models (e.g. Pet) or oneOf
157
- klass = TimeLogic::Api.const_get(type)
158
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
159
- end
45
+ # Returns the items as plain hashes, in the API's JSON shape.
46
+ # @return [Array<Hash>]
47
+ def to_hash
48
+ map { |item| item.respond_to?(:to_hash) ? item.to_hash : item }
160
49
  end
50
+ alias to_body to_hash
161
51
 
162
- # Returns the string representation of the object
163
- # @return [String] String presentation of the object
164
52
  def to_s
165
53
  to_hash.to_s
166
54
  end
167
-
168
- # to_body is an alias to to_hash (backward compatibility)
169
- # @return [Hash] Returns the object in the form of hash
170
- def to_body
171
- to_hash
172
- end
173
-
174
- # Returns the object in the form of hash
175
- # @return [Hash] Returns the object in the form of hash
176
- def to_hash
177
- hash = super
178
- self.class.attribute_map.each_pair do |attr, param|
179
- value = self.send(attr)
180
- if value.nil?
181
- is_nullable = self.class.openapi_nullable.include?(attr)
182
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
- end
184
-
185
- hash[param] = _to_hash(value)
186
- end
187
- hash
188
- end
189
-
190
- # Outputs non-array value in the form of hash
191
- # For object, use to_hash. Otherwise, just return the value
192
- # @param [Object] value Any valid value
193
- # @return [Hash] Returns the value in the form of hash
194
- def _to_hash(value)
195
- if value.is_a?(Array)
196
- value.compact.map { |v| _to_hash(v) }
197
- elsif value.is_a?(Hash)
198
- {}.tap do |hash|
199
- value.each { |k, v| hash[k] = _to_hash(v) }
200
- end
201
- elsif value.respond_to? :to_hash
202
- value.to_hash
203
- else
204
- value
205
- end
206
- end
207
-
208
55
  end
209
-
210
56
  end