digiwin_dsp 0.2.2 → 0.2.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/CHANGELOG.md +28 -1
- data/README.md +11 -0
- data/lib/digiwin_dsp/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: 9ea65e0563bda4079eccde2814f33d7f1ef2e7510658c2d1d41998379d2445f2
|
|
4
|
+
data.tar.gz: 14e2d2f5122d335fdfcf4c765a5524f7e5ed95f059d9a319d96bbf12100b6847
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3eb4491ae83a4de2b864182d50c56c1d00e06a909aee6fd7ce67b3336f89232c87bcf1cd391130bf87fe19a99087bd4da7d0d6c5b939beeda02ed6a37dd9e81f
|
|
7
|
+
data.tar.gz: e89bd33fa54644c26fb1b32019ff2e36e42779e50bc4e05d568abfc0fa5504a1e1a11098c2bc026fee2f398763f6723713ff25e804eaa283f71c8dfa8c9c1fd4
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,32 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.3] - 2026-05-22
|
|
10
|
+
|
|
11
|
+
### Docs
|
|
12
|
+
|
|
13
|
+
- Document the `order_status` enum (`"2"` cancel / `"3"` new / `"5"` invoice / `"7"` return) in README and `docs/dsp-api-spec.md`. DSP rejects others with `WrongStatus:order_status錯誤,請固定給N(...)`. All four live-verified against UAT. The OpenAPI examples don't surface this constraint, so live smoke had to discover each value.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- `scripts/smoke.rb` accepts `ORDER_STATUS=…` env override so operators can probe DSP's WrongStatus path without editing the script.
|
|
18
|
+
|
|
19
|
+
## [0.2.2] - 2026-05-21
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **`Message:"DSP 序號驗證失敗"` now classifies as
|
|
24
|
+
`DigiwinDsp::AuthenticationError`.** Discovered via live UAT smoke
|
|
25
|
+
test: when the `DSP-api-key` header is missing or invalid, DSP
|
|
26
|
+
returns HTTP 200 (not 401/403) with `Status:Failure` and that
|
|
27
|
+
message. Previously fell through to generic `Error`, defeating
|
|
28
|
+
typed-rescue logic.
|
|
29
|
+
|
|
30
|
+
### Docs
|
|
31
|
+
|
|
32
|
+
- `docs/dsp-api-spec.md` documents the auth-failure envelope shape +
|
|
33
|
+
the form_no-prefix behavior on `Message`.
|
|
34
|
+
|
|
9
35
|
## [0.2.1] - 2026-05-21
|
|
10
36
|
|
|
11
37
|
### Fixed
|
|
@@ -140,7 +166,8 @@ Initial release. Covers the four Self-hosted Website Module (自有官網模組)
|
|
|
140
166
|
- The gem is **synchronous on purpose**. Callers wrap requests in their own background job runner (e.g. ActiveJob) when needed.
|
|
141
167
|
- Idempotency: clients can send `X-Idempotency-Key` via the `idempotency_key:` kwarg. DSP also dedupes server-side by `form_no + platform_id`.
|
|
142
168
|
|
|
143
|
-
[Unreleased]: https://github.com/7a6163/digiwin_dsp/compare/v0.2.
|
|
169
|
+
[Unreleased]: https://github.com/7a6163/digiwin_dsp/compare/v0.2.3...HEAD
|
|
170
|
+
[0.2.3]: https://github.com/7a6163/digiwin_dsp/compare/v0.2.2...v0.2.3
|
|
144
171
|
[0.2.2]: https://github.com/7a6163/digiwin_dsp/compare/v0.2.1...v0.2.2
|
|
145
172
|
[0.2.1]: https://github.com/7a6163/digiwin_dsp/compare/v0.2.0...v0.2.1
|
|
146
173
|
[0.2.0]: https://github.com/7a6163/digiwin_dsp/compare/v0.1.1...v0.2.0
|
data/README.md
CHANGED
|
@@ -141,6 +141,17 @@ Each has its own required-field set (8 / 11 / 19 fields respectively). Inspect `
|
|
|
141
141
|
DigiwinDsp::Serializers::CancellationSerializer::REQUIRED_FIELDS
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
+
### `order_status` enum
|
|
145
|
+
|
|
146
|
+
Each endpoint requires a specific `order_status` value inside `request_detail`. DSP rejects others with `WrongStatus:order_status錯誤,請固定給N(...)`. The OpenAPI examples don't document this — verified live against UAT 2026-05-21:
|
|
147
|
+
|
|
148
|
+
| Resource | `order_status` | Meaning |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| `Resources::Order` | `"3"` | 新增訂單 (new order) |
|
|
151
|
+
| `Resources::Cancellation` | `"2"` | 取消訂單 (cancel order) |
|
|
152
|
+
| `Resources::Invoice` | `"5"` | 發票更新 (invoice update) |
|
|
153
|
+
| `Resources::Return` | `"7"` | 退貨訂單 (return order) |
|
|
154
|
+
|
|
144
155
|
### Idempotency
|
|
145
156
|
|
|
146
157
|
Pass `idempotency_key:` to attach an `X-Idempotency-Key` request header. DSP also dedupes server-side by `form_no + platform_id` and returns `Duplicated:訂單不可重複` on a re-send (mapped to `DuplicateRequestError`).
|
data/lib/digiwin_dsp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: digiwin_dsp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zac
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|