@agenzo/merchant-cli 0.8.7 → 0.8.8
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/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// ../../../agenzo-cli/packages/cli-core/dist/index.js
|
|
7
7
|
import { readFileSync } from "fs";
|
|
8
8
|
import { dirname, join } from "path";
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
@@ -1026,6 +1026,11 @@ var bookSchema = {
|
|
|
1026
1026
|
required: "conditional",
|
|
1027
1027
|
description: "Required when billing_mode=pay_per_call (a PAID payment order). Forbidden when billing_mode=monthly_settlement"
|
|
1028
1028
|
},
|
|
1029
|
+
"payment-method-id": {
|
|
1030
|
+
type: "string",
|
|
1031
|
+
required: false,
|
|
1032
|
+
description: "Bound payment method id to charge (pay_per_call only). Opaque id from `token payment-methods list`; ignored for monthly_settlement"
|
|
1033
|
+
},
|
|
1029
1034
|
"passenger-name": { type: "string", required: true, description: "Passenger full name" },
|
|
1030
1035
|
"passenger-phone": { type: "string", required: true, description: "Passenger phone in E.164 format (e.g. +14155551234)" },
|
|
1031
1036
|
"passenger-email": { type: "string", required: true, description: "Passenger email (required by eLife for booking)" },
|
|
@@ -2416,7 +2421,10 @@ function formatBook(data) {
|
|
|
2416
2421
|
return Formatter.keyValue(lines);
|
|
2417
2422
|
}
|
|
2418
2423
|
function registerBookCommand(parent, deps) {
|
|
2419
|
-
const cmd = parent.command("book").description("Book a ride using a quote_id returned by quote").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--quote-id <id>", "Quote id from `ride-elife quote`").option("--vehicle-class <class>", "Chosen vehicle class").option("--price-amount <amount>", "Fare in decimal currency units (not cents)").option("--price-currency <currency>", "Currency code (default USD)").option("--payment-order-id <id>", "Paid payment order id (pay_per_call mode only)").option(
|
|
2424
|
+
const cmd = parent.command("book").description("Book a ride using a quote_id returned by quote").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--quote-id <id>", "Quote id from `ride-elife quote`").option("--vehicle-class <class>", "Chosen vehicle class").option("--price-amount <amount>", "Fare in decimal currency units (not cents)").option("--price-currency <currency>", "Currency code (default USD)").option("--payment-order-id <id>", "Paid payment order id (pay_per_call mode only)").option(
|
|
2425
|
+
"--payment-method-id <id>",
|
|
2426
|
+
"Bound payment method id to charge (pay_per_call mode only)"
|
|
2427
|
+
).option("--passenger-name <name>", "Passenger full name").option("--passenger-phone <phone>", "Passenger phone").option("--passenger-email <email>", "Passenger email").option("--luggage-count <n>", "Luggage count").option("--special-requests <text>", "Free-text special requests").option("--pickup-lat <lat>", "Pickup latitude").option("--pickup-lng <lng>", "Pickup longitude").option("--pickup-name <name>", "Pickup location name").option("--dropoff-lat <lat>", "Dropoff latitude").option("--dropoff-lng <lng>", "Dropoff longitude").option("--dropoff-name <name>", "Dropoff location name").option("--pickup-time <time>", 'Pickup time: epoch seconds, or "now"').option("--meet-and-greet", "Enable meet & greet service").option("--meet-and-greet-price <amount>", "Meet & greet surcharge").option("--welcome-sign <text>", "Welcome sign text").option("--child-seat-count <n>", "Number of child seats needed (0-5)").option("--infant-seat-count <n>", "Number of infant seats needed (0-5)").option("--toddler-seat-count <n>", "Number of toddler seats needed (0-5)").option("--arrival-flight-no <no>", "Arrival flight number").option("--arrival-airline <airline>", "Arrival airline").option("--departure-flight-no <no>", "Departure flight number").option("--departure-airline <airline>", "Departure airline").option(
|
|
2420
2428
|
"--idempotency-key <key>",
|
|
2421
2429
|
"Idempotency key forwarded verbatim as the Idempotency-Key header"
|
|
2422
2430
|
);
|
|
@@ -2439,6 +2447,7 @@ function registerBookCommand(parent, deps) {
|
|
|
2439
2447
|
passenger_phone: phone(opts.passengerPhone, "passenger-phone")
|
|
2440
2448
|
};
|
|
2441
2449
|
if (opts.paymentOrderId) body.payment_order_id = opts.paymentOrderId;
|
|
2450
|
+
if (opts.paymentMethodId) body.payment_method_id = opts.paymentMethodId;
|
|
2442
2451
|
if (opts.passengerEmail) body.passenger_email = opts.passengerEmail;
|
|
2443
2452
|
if (opts.luggageCount !== void 0) {
|
|
2444
2453
|
body.luggage_count = num2(opts.luggageCount, "luggage-count");
|