portage-ucp-client 0.1.0 → 0.2.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 +10 -1
- data/lib/portage/ucp/client/session.rb +12 -4
- data/lib/portage/ucp/client/version.rb +1 -1
- metadata +5 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88904b38d834b4f1b1343d35f50db2149828dc76edd179a778c511cb17119880
|
|
4
|
+
data.tar.gz: 334b55de228968238f9737e079ee719119232c81c631dcda00be1bd68e7c44d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba6fbffe20114f8c1d328dd7399f792a4dbaa81d03fb589366e8ec312c8efd08299b349aa5c0eaa9fd16254c4af9c4e3d9881387ae61163fb0d40ecebb92a7dc
|
|
7
|
+
data.tar.gz: 5dbce7d84c0b54d8068be7d95713855b94e765a6c945ea4c9e13bc86c02bf19683b87b6db8431173eb27b46363df3838bc264147259a470c430cf3a0ee48c79d
|
data/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,16 @@ All notable changes to this project are documented here. Format loosely follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/); this project is
|
|
5
5
|
pre-1.0, so APIs may still shift between minor versions.
|
|
6
6
|
|
|
7
|
-
## [0.
|
|
7
|
+
## [0.2.0] - 2026-08-21
|
|
8
|
+
|
|
9
|
+
- `Session#create_checkout`/`#update_checkout` gain an optional `fulfillment:`
|
|
10
|
+
param, passed through only when given. Only exercised end-to-end over the
|
|
11
|
+
loopback transport (an in-process `Adapter`, taking a real
|
|
12
|
+
`Portage::Ucp::CheckoutFulfillment`); the stdio/HTTP wire shape for
|
|
13
|
+
`fulfillment` has no real UCP server to verify it against yet, so it's not
|
|
14
|
+
wired there.
|
|
15
|
+
|
|
16
|
+
## [0.1.0] - 2026-08-14
|
|
8
17
|
|
|
9
18
|
- Initial pre-release. Client-side SDK — loopback, stdio, and Streamable HTTP
|
|
10
19
|
transports behind one `Session` interface.
|
|
@@ -55,14 +55,22 @@ module Portage
|
|
|
55
55
|
call("cancel_cart", cart_id: cart_id, idempotency_key: idempotency_key)
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
# `fulfillment:` (dev.ucp.shopping.fulfillment) is only exercised over
|
|
59
|
+
# the loopback transport today (Portage::Cli::Buy's own-store adapter
|
|
60
|
+
# path) — passed straight through as whatever value the caller built
|
|
61
|
+
# (a Portage::Ucp::CheckoutFulfillment for loopback). Over stdio/HTTP
|
|
62
|
+
# it would need a JSON wire shape this gem doesn't build yet, so
|
|
63
|
+
# callers on those transports should leave it nil.
|
|
64
|
+
def create_checkout(line_items:, idempotency_key: nil, fulfillment: nil)
|
|
65
|
+
call("create_checkout", line_items: line_items, idempotency_key: idempotency_key,
|
|
66
|
+
**(fulfillment ? { fulfillment: fulfillment } : {}))
|
|
60
67
|
end
|
|
61
68
|
|
|
62
69
|
def get_checkout(checkout_id:) = call("get_checkout", checkout_id: checkout_id)
|
|
63
70
|
|
|
64
|
-
def update_checkout(checkout_id:, line_items:, idempotency_key: nil)
|
|
65
|
-
call("update_checkout", checkout_id: checkout_id, line_items: line_items, idempotency_key: idempotency_key
|
|
71
|
+
def update_checkout(checkout_id:, line_items:, idempotency_key: nil, fulfillment: nil)
|
|
72
|
+
call("update_checkout", checkout_id: checkout_id, line_items: line_items, idempotency_key: idempotency_key,
|
|
73
|
+
**(fulfillment ? { fulfillment: fulfillment } : {}))
|
|
66
74
|
end
|
|
67
75
|
|
|
68
76
|
def complete_checkout(checkout_id:, payment_token:, idempotency_key: nil)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: portage-ucp-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Whitbread
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: mcp
|
|
@@ -30,14 +29,14 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.
|
|
32
|
+
version: '0.2'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0.
|
|
39
|
+
version: '0.2'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: rspec
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,7 +99,6 @@ description: 'Every other portage-ucp gem lets a Ruby program expose a commerce
|
|
|
100
99
|
as the client. Three transports behind one interface (loopback over an in-process
|
|
101
100
|
Adapter, stdio, Streamable HTTP) — callers never know which they got. Depends only
|
|
102
101
|
on portage-ucp + the mcp gem''s client half; no adapter gem is a dependency.'
|
|
103
|
-
email:
|
|
104
102
|
executables: []
|
|
105
103
|
extensions: []
|
|
106
104
|
extra_rdoc_files: []
|
|
@@ -123,7 +121,6 @@ metadata:
|
|
|
123
121
|
source_code_uri: https://github.com/tomtom87/Portage/tree/main/portage-ucp-client
|
|
124
122
|
changelog_uri: https://github.com/tomtom87/Portage/blob/main/portage-ucp-client/CHANGELOG.md
|
|
125
123
|
rubygems_mfa_required: 'true'
|
|
126
|
-
post_install_message:
|
|
127
124
|
rdoc_options: []
|
|
128
125
|
require_paths:
|
|
129
126
|
- lib
|
|
@@ -138,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
138
135
|
- !ruby/object:Gem::Version
|
|
139
136
|
version: '0'
|
|
140
137
|
requirements: []
|
|
141
|
-
rubygems_version:
|
|
142
|
-
signing_key:
|
|
138
|
+
rubygems_version: 4.0.18
|
|
143
139
|
specification_version: 4
|
|
144
140
|
summary: Client-side SDK for portage-ucp — act as the shopper's agent against any
|
|
145
141
|
UCP/MCP server
|