diff --git a/cli/README.md b/cli/README.md index b8a8d23fb..237c21053 100644 --- a/cli/README.md +++ b/cli/README.md @@ -310,14 +310,14 @@ grid receiver lookup-account ```bash # List cards -grid cards list [--cardholder-id ] [--status ACTIVE] +grid cards list [--customer-id ] [--status ACTIVE] # Get a card grid cards get # Issue a virtual card grid cards create \ - --cardholder-id \ + --customer-id \ --funding-source "InternalAccount:1" \ --max-spend-per-transaction 5000 diff --git a/cli/src/commands/cards.ts b/cli/src/commands/cards.ts index a531f0572..1cd02409f 100644 --- a/cli/src/commands/cards.ts +++ b/cli/src/commands/cards.ts @@ -6,7 +6,7 @@ import { addSignedOptions, signedHeaders, validateSignedOptions } from "../signe interface Card { id: string; - cardholderId: string; + customerId: string; platformCardId?: string; status: "PENDING_KYC" | "PROCESSING" | "ACTIVE" | "FROZEN" | "CLOSED"; form: "VIRTUAL"; @@ -57,7 +57,7 @@ export function registerCardsCommand( cardsCmd .command("list") .description("List cards") - .option("--cardholder-id ", "Filter by cardholder (customer) ID") + .option("--customer-id ", "Filter by customer ID") .option("--account-id ", "Filter by a bound funding-source account ID") .option("--platform-card-id ", "Filter by platform card ID") .option("--status ", "Filter by status (PENDING_KYC, PROCESSING, ACTIVE, FROZEN, CLOSED)") @@ -77,7 +77,7 @@ export function registerCardsCommand( } const params: Record = { - cardholderId: options.cardholderId, + customerId: options.customerId, accountId: options.accountId, platformCardId: options.platformCardId, status: options.status, @@ -105,7 +105,7 @@ export function registerCardsCommand( cardsCmd .command("create") .description("Issue a card") - .requiredOption("--cardholder-id ", "Cardholder (customer) ID") + .requiredOption("--customer-id ", "Customer ID") .requiredOption( "--funding-source ", "Internal account ID that funds the card", @@ -124,7 +124,7 @@ export function registerCardsCommand( if (!client) return; const body: Record = { - cardholderId: options.cardholderId, + customerId: options.customerId, form: options.form, fundingSource: options.fundingSource, }; diff --git a/cli/test/cards.test.ts b/cli/test/cards.test.ts index 97c32e1c2..34c3b1434 100644 --- a/cli/test/cards.test.ts +++ b/cli/test/cards.test.ts @@ -6,7 +6,7 @@ describe("cards list", () => { const { request } = await runCli([ "cards", "list", - "--cardholder-id", + "--customer-id", "Customer:abc", "--status", "ACTIVE", @@ -14,7 +14,7 @@ describe("cards list", () => { expect(request?.path).toBe("/grid/v1/cards"); expect(request?.query).toMatchObject({ - cardholderId: "Customer:abc", + customerId: "Customer:abc", status: "ACTIVE", }); }); @@ -25,7 +25,7 @@ describe("cards create", () => { const { request } = await runCli([ "cards", "create", - "--cardholder-id", + "--customer-id", "Customer:abc", "--funding-source", "InternalAccount:1", @@ -34,7 +34,7 @@ describe("cards create", () => { expect(request?.method).toBe("POST"); expect(request?.path).toBe("/grid/v1/cards"); expect(request?.body).toMatchObject({ - cardholderId: "Customer:abc", + customerId: "Customer:abc", form: "VIRTUAL", fundingSource: "InternalAccount:1", }); @@ -44,7 +44,7 @@ describe("cards create", () => { const { request } = await runCli([ "cards", "create", - "--cardholder-id", + "--customer-id", "Customer:abc", "--funding-source", "InternalAccount:1", @@ -60,7 +60,7 @@ describe("cards create", () => { runCli([ "cards", "create", - "--cardholder-id", + "--customer-id", "Customer:abc", "--funding-source", "", @@ -72,7 +72,7 @@ describe("cards create", () => { const { request } = await runCli([ "cards", "create", - "--cardholder-id", + "--customer-id", "Customer:abc", "--funding-source", " InternalAccount:1 ", @@ -88,7 +88,7 @@ describe("cards create", () => { runCli([ "cards", "create", - "--cardholder-id", + "--customer-id", "Customer:abc", "--funding-source", "InternalAccount:1",