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

    Hierarchy

    • SwiftWireWithdrawalQuoteQueryService
      • SwiftWireWithdrawalQuoteService
    Index
    db: B2bDatabase
    instance: (...args: []) => SwiftWireWithdrawalQuoteService = ...

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

    • Parameters

      • args: Pick<
            SwiftWireWithdrawalQuote,
            "deviceIpAddress"
            | "deviceLocation"
            | "entityId"
            | "purpose",
        > & (
            { customerId: string; targetWirePaymentInstrument: string; sourceAccountId: string; targetCurrency: "USD" | "AUD" | "HKD" | "JPY" | "MXN" | "NZD" | "SGD" | "SEK" | "CHF" | "CAD" | "GBP" | "CZK" | "DKK" | "EUR"; senderMessage?: string | undefined; beneficiaryReference?: string | undefined; idempotencyKey?: string | undefined; } & ({ sourceAmount: BigNumber; } | { targetAmount: BigNumber; })
        )

      Returns Promise<
          | { ok: true; value: SwiftWireWithdrawalQuote }
          | {
              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<"UNSUPPORTED_CURRENCY">;
              ok: false;
          },
      >

    • Parameters

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

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