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

    Hierarchy

    • WireDrawdownWithdrawalQuoteQueryService
      • WireDrawdownWithdrawalQuoteService
    Index
    db: B2bDatabase
    instance: (...args: []) => WireDrawdownWithdrawalQuoteService = ...

    The process service, starting workflows on the temporal namespace's queue.

    • Parameters

      • args: {
            bankId?: string;
            customerId: string;
            drawdownId: string;
            idempotencyKey?: string;
            sourceAccountId: string;
            targetAmount: BigNumber;
            wirePaymentInstrumentId: string;
        }
        • OptionalbankId?: string
        • customerId: string
        • drawdownId: string
        • OptionalidempotencyKey?: string

          Caller-supplied idempotency key (from the API Idempotency-Key header). Threaded into productQuoteService.quote() (dedupes the pinned engine quote) and withdrawalQuoteService.create() (dedupes the withdrawal quote). Optional — internal callers don't supply one.

        • sourceAccountId: string
        • targetAmount: BigNumber
        • wirePaymentInstrumentId: string

      Returns Promise<
          | { ok: true; value: WireDrawdownWithdrawalQuote }
          | {
              error:
                  | ServiceError<
                      | "INSUFFICIENT_FUNDS"
                      | "PRODUCT_INACTIVE"
                      | "NO_ELIGIBLE_ROUTE"
                      | "CUSTOMER_NOT_ACTIVE"
                      | "PAYMENT_INSTRUMENT_BLOCKED"
                      | "PAYMENT_INSTRUMENT_ACTION_REQUIRED",
                  >
                  | ServiceError<"ENTITY_NOT_FOUND" | "ENTITY_CANNOT_TRANSACT">
                  | ServiceError<"LIMIT_EXCEEDED", ProductLimitViolation>
                  | ServiceError<QuoteInvariantViolation>
                  | ServiceError<"INVALID_ENTITY">;
              ok: false;
          },
      >

    • Get a withdrawal by ID without customer restriction

      Parameters

      • __namedParameters: {
            customerId: string;
            id: string;
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<{ ok: true; value: WireDrawdownWithdrawalQuote | null }>