parseapi 1.9.2 → 1.9.3
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/README.md +1 -1
- data/lib/parseapi/client.rb +5 -1
- data/lib/parseapi/version.rb +1 -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: 645ae90d9f3d07bce20b3b674c484c125455c0eb59ffb9b53d60b2f91f534345
|
|
4
|
+
data.tar.gz: e0abb6505d9d74b82d65319d851e0c025776f71e45d7b8dbd8bc114f6e1f75df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50f152ec92980405a45c0885f4c77830f95eaf4c5785047992463dbc56a448c2adb8c720b378465136434d8672178c7081c69ce56446baca6631bf7b05a3ded1
|
|
7
|
+
data.tar.gz: 225a706fa638520715044d6eb31b0cb3dea107a525bfe1de5eaecb0f23f5ed310202d1996b3eff15981d318431e3021a22d65844fdbf31ecd3d80c768a1cb90e
|
data/README.md
CHANGED
|
@@ -257,7 +257,7 @@ parse.weather(40.7128, -74.006, deep: true, date: '2026-08-15')
|
|
|
257
257
|
|
|
258
258
|
Tariff starts with the general schedule line. Paid deep adds units and the special and other schedule columns. An optional origin then resolves country-specific measures. The three calls below show those successive choices. Without origin, schedule detail is still returned and origin-dependent fields are null. A null effective rate is not a zero rate.
|
|
259
259
|
|
|
260
|
-
Tariff lookup and search accept
|
|
260
|
+
Tariff lookup and search accept the `edition` ID returned by Tariff, such as `ted_3`, and an optional `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
|
|
261
261
|
|
|
262
262
|
Origin means where the goods originate, not where they ship from. The effective rate covers matched stored schedule measures only. It is not complete duty or landed cost.
|
|
263
263
|
|
data/lib/parseapi/client.rb
CHANGED
|
@@ -465,8 +465,12 @@ module ParseAPI
|
|
|
465
465
|
targets.join(',')
|
|
466
466
|
end
|
|
467
467
|
|
|
468
|
+
def tariff_edition_id?(value)
|
|
469
|
+
value.is_a?(String) && (/\A[a-f0-9]{64}\z/.match?(value) || (/\Ated_[1-9][0-9]{0,19}\z/.match?(value) && (value.bytesize < 24 || value[4..-1] <= '18446744073709551615')))
|
|
470
|
+
end
|
|
471
|
+
|
|
468
472
|
def tariff_selection(result, edition, date)
|
|
469
|
-
if (!edition.nil? || !date.nil?) && (!
|
|
473
|
+
if (!edition.nil? || !date.nil?) && (!tariff_edition_id?(result['edition']) || (!edition.nil? && result['edition'] != edition) || result['date'] != date)
|
|
470
474
|
raise Error.new(status: 0, code: 'tariff_selection_mismatch', message: 'Tariff response did not confirm the requested edition/date. The server may not support this selection.')
|
|
471
475
|
end
|
|
472
476
|
result
|
data/lib/parseapi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parseapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ParseAPI
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|