@cfxlabsinc/b2b-services
    Preparing search index...

    Maintain the account details for sending payments via Automated Clearing House.

    Hierarchy (View Summary)

    Index
    cache: ServiceCache<CachedSearchPage<PaymentInstrumentSearchItem>>
    instance: (...args: []) => UsAchPaymentInstrumentService = ...

    The process default: built from each dependency's own instance().

    • update for an operator, whoever owns the row: skips only the capability check.

      Parameters

      • input: { data: UsAchUpdateData; id: string }

      Returns Promise<
          | {
              ok: true;
              value: {
                  accountHolderName: string;
                  accountName: string;
                  accountNumber: string;
                  accountType: "CHECKING"
                  | "SAVING";
                  bankName?: string;
                  beneficiaryAddress?: {
                      city: string;
                      countryCode: string;
                      line1: string;
                      line2?: string;
                      postalCode: string;
                      region?: string;
                  };
                  beneficiaryName: string
                  | null;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: string;
                  provider: "QUILTT" | "CFX";
                  providerId: string;
                  quilttData?: QuilttAccountData & { quilttConnectionId: string };
                  referenceId?: string;
                  routeFusionBeneficiaryId?: string;
                  routingNumber: string;
                  sendEnabled: boolean;
                  status:
                      | "DELETED"
                      | "PENDING_VERIFICATION"
                      | "ACTION_REQUIRED"
                      | "APPROVED"
                      | "BLOCKED";
                  statusDescription: string;
                  type: "US_ACH";
                  typeDescription: string;
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          }
          | { error: UsAchUpdateError; ok: false },
      >

    • Parameters

      • input: Input

      Returns Promise<
          | {
              ok: true;
              value: {
                  accountHolderName: string;
                  accountName: string;
                  accountNumber: string;
                  accountType: "CHECKING"
                  | "SAVING";
                  bankName?: string;
                  beneficiaryAddress?: {
                      city: string;
                      countryCode: string;
                      line1: string;
                      line2?: string;
                      postalCode: string;
                      region?: string;
                  };
                  beneficiaryName: string
                  | null;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: string;
                  provider: "QUILTT" | "CFX";
                  providerId: string;
                  quilttData?: QuilttAccountData & { quilttConnectionId: string };
                  referenceId?: string;
                  routeFusionBeneficiaryId?: string;
                  routingNumber: string;
                  sendEnabled: boolean;
                  status:
                      | "DELETED"
                      | "PENDING_VERIFICATION"
                      | "ACTION_REQUIRED"
                      | "APPROVED"
                      | "BLOCKED";
                  statusDescription: string;
                  type: "US_ACH";
                  typeDescription: string;
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          }
          | {
              error: | ServiceError<"PAYMENT_INSTRUMENT_DUPLICATE">
              | ServiceError<"ACCOUNT_HOLDER_NAME_REQUIRED">
              | UsAchPaymentInstrumentValidateError;
              ok: false;
          },
      >

    • Also clears payment-instrument.text. Every writer busts by customer alone, which reaches no field tag, yet each write may change the text a cached transaction q page matched on.

      Parameters

      • args: {
            customerIds: readonly string[];
            keys?: readonly CacheKey[];
            records?: readonly string[];
        }

      Returns Promise<void>

    • Tags for a page: the scope its query searched (each customer's membership tag, else the collection tag), so an empty page is bustable too, plus the records it projects and the fields that chose or ordered its rows.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[] | undefined;
            fields?: readonly string[];
            records?: readonly string[];
        }

      Returns string[]

    • Merge data into an existing instrument. Every field is optional — an absent key is left untouched, so a caller wanting to change only the account holder's name sends only that.

      The owning entity is read off the row, not supplied: it is what the capability check and the derived providerId are built from, and an instrument cannot move between entities.

      Parameters

      • input: { customerId: string; data: UsAchUpdateData; id: string }

      Returns Promise<
          | {
              ok: true;
              value: {
                  accountHolderName: string;
                  accountName: string;
                  accountNumber: string;
                  accountType: "CHECKING"
                  | "SAVING";
                  bankName?: string;
                  beneficiaryAddress?: {
                      city: string;
                      countryCode: string;
                      line1: string;
                      line2?: string;
                      postalCode: string;
                      region?: string;
                  };
                  beneficiaryName: string
                  | null;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: string;
                  provider: "QUILTT" | "CFX";
                  providerId: string;
                  quilttData?: QuilttAccountData & { quilttConnectionId: string };
                  referenceId?: string;
                  routeFusionBeneficiaryId?: string;
                  routingNumber: string;
                  sendEnabled: boolean;
                  status:
                      | "DELETED"
                      | "PENDING_VERIFICATION"
                      | "ACTION_REQUIRED"
                      | "APPROVED"
                      | "BLOCKED";
                  statusDescription: string;
                  type: "US_ACH";
                  typeDescription: string;
                  updatedAt: Date;
                  verificationProfileId?: string;
                  victorCounterpartyId?: string;
              };
          }
          | { error: UsAchUpdateError; ok: false },
      >