@agenzo/merchant-cli 0.5.1 → 0.6.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.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  - **`services`** (capability discovery): list what's currently available and how to call it — run this first to learn the current capability set.
17
17
  - **`ride-elife`** (ride-hailing): the full loop of quote → book → query/poll → cancel → list-orders.
18
- - **`hotel-redaug`** (hotel booking): search, find-destination, hotel-filters, list-cities, hotel-detail, quote, create-order (locks the room AND settles payment inline), get (status/poll), cancel, checkout, get-checkout, list-orders. Supports both **monthly_settlement** (settlement-account deduction) and **pay_per_call** (the platform's own server-side EVO integration; optionally target a specific bound card via `--payment-method-id`) — the funds path is decided server-side by `billing_mode`, the CLI call is identical either way.
18
+ - **`hotel-redaug`** (hotel booking): search, find-destination, hotel-filters, list-cities, hotel-detail, quote, create-order, pay-order, get (status/poll), cancel, checkout, get-checkout, list-orders. Supports both **monthly_settlement** (on-account deduction) and **pay_per_call** (user pays via EVO using the order_id as the merchantTransID).
19
19
 
20
20
  More fulfillment capabilities are added as new nouns over time; `services list` always reflects the current set.
21
21
 
@@ -24,7 +24,7 @@ More fulfillment capabilities are added as new nouns over time; `services list`
24
24
  | Noun | Verb | Type | HTTP | Description |
25
25
  |---|---|---|---|---|
26
26
  | `services` | `list` | Read | — (local) | List available merchant-fulfillment capabilities |
27
- | `services` | `get <service-id>` | Read | — (local) | Service-layer view: `selection_hints` / `schema_ref` / `conventions` / `workflow` / `verbs_summary` (miss → `SERVICE_NOT_FOUND`); full per-verb flags/response schema is fetched separately via `schema_ref` |
27
+ | `services` | `get <service-id>` | Read | — (local) | View the full metadata of a single capability (miss → `SERVICE_NOT_FOUND`) |
28
28
  | `ride-elife` | `quote` | Read | `POST /ride/quote` | Point-to-point quote (`vehicle_classes[]` + meet-and-greet) |
29
29
  | `ride-elife` | `book` | Write/Y | `POST /ride/book` | Book against a quote (monthly_settlement-aware, see below) |
30
30
  | `ride-elife` | `get` | Read | `GET /ride/<id>/status` | Query order status; `--watch` emits an NDJSON polling stream |
@@ -36,8 +36,8 @@ More fulfillment capabilities are added as new nouns over time; `services list`
36
36
  | `hotel-redaug` | `list-cities` | Read | `POST /hotel/cities` | List cities for a country (destination_id + coordinates) |
37
37
  | `hotel-redaug` | `hotel-detail` | Read | `POST /hotel/detail` | Hotel detail with facilities/images AND `rooms[]` (area/floor/beds/photos) — call before quote |
38
38
  | `hotel-redaug` | `quote` | Read | `POST /hotel/quote` | Real-time rooms/rates for one hotel (`product_token` + `price_items`) |
39
- | `hotel-redaug` | `create-order` | Write/Y | `POST /hotel/create-order` | Create AND pay for a hotel order (locks the rate + settles payment inline; billing path chosen server-side by `billing_mode`); returns `order_id`, already `PAID` |
40
- | `hotel-redaug` | `pay-order` | Write/Y | `POST /hotel/{order_id}/pay` | Trigger supplier confirmation (upstream payOrder) for a paid order; takes only `--order-id` — no payment params needed |
39
+ | `hotel-redaug` | `create-order` | Write/Y | `POST /hotel/create-order` | Create a hotel order without charging (locks rate + returns `order_id` + payable amount) |
40
+ | `hotel-redaug` | `pay-order` | Write/Y | `POST /hotel/{order_id}/pay` | Pay for a created order (takes only `--order-id`); billing path (`monthly_settlement` or `pay_per_call`) is chosen server-side |
41
41
  | `hotel-redaug` | `get` | Read | `GET /hotel/<id>/status` | Query order status; `--watch` emits an NDJSON polling stream |
42
42
  | `hotel-redaug` | `cancel` | Write/Y | `POST /hotel/<id>/cancel` | Cancel a whole order (acceptance ≠ proof; poll `get`) |
43
43
  | `hotel-redaug` | `checkout` | Write/Y | `POST /hotel/<id>/checkout` | Partial check-out / out-of-policy cancellation (async) |
@@ -76,8 +76,7 @@ A runtime-plane CLI that uses an **API Key** (`--api-key`, carried per command a
76
76
  ```bash
77
77
  # 1. Discover capabilities
78
78
  agenzo-merchant-cli services list
79
- agenzo-merchant-cli services get ride-elife # service-layer view: workflow + conventions + verbs_summary
80
- agenzo-merchant-cli ride-elife book --help --format json # capability layer: this verb's full flags/response schema
79
+ agenzo-merchant-cli services get ride-elife
81
80
 
82
81
  # 2. Quote (produces quote_id)
83
82
  agenzo-merchant-cli ride-elife quote --api-key "$API_KEY" \
@@ -104,12 +103,11 @@ agenzo-merchant-cli ride-elife cancel --api-key "$API_KEY" --yes \
104
103
 
105
104
  ### Hotel booking end-to-end example
106
105
 
107
- The core Agent loop is `search → quote → create-order → get`. `create-order` is a single write step
108
- that BOTH locks the room AND settles payment inline — there is no separate settlement call. Amounts
109
- are decimal currency units (e.g. `320.00` = 320.00 yuan). The billing path is chosen server-side by
110
- the developer's `billing_mode`, but the CLI call is identical either way:
111
- - **monthly_settlement**: `total_amount` is deducted from the developer's settlement-account balance inline.
112
- - **pay_per_call**: `total_amount` is authorized + captured on the developer's bound card via the platform's own server-side EVO integration — no EVO parameters are ever passed through this CLI. Optionally pass `--payment-method-id` to charge a specific bound card instead of the auto-selected one.
106
+ The core Agent loop is `search → quote → create-order → pay-order → get`. Amounts are decimal currency
107
+ units (e.g. `320.00` = 320.00 yuan). `pay-order` takes only `--order-id`; the billing path is chosen
108
+ server-side by the developer's `billing_mode`:
109
+ - **monthly_settlement**: deducted from the monthly-settlement account.
110
+ - **pay_per_call**: the user pays via shared EVO parameters using the `order_id` as the EVO merchantTransID; the platform verifies that payment for the same `order_id` before confirming.
113
111
 
114
112
  ```bash
115
113
  # 1. Search hotels by coordinates + stay dates (or use --destination-id from find-destination).