@portone/server-sdk
Version:
PortOne JavaScript SDK for server-side usage
53 lines (52 loc) • 2.75 kB
TypeScript
import { AccountError } from "./AccountError.js";
import type { Unrecognized } from "./../../../utils/unrecognized.js";
import { type PortOneClientInit } from "../../../client.js";
import type { Bank } from "../../../generated/common/Bank.js";
import type { ForbiddenError } from "../../../generated/common/ForbiddenError.js";
import type { InvalidRequestError } from "../../../generated/common/InvalidRequestError.js";
import type { PlatformAccountHolder } from "../../../generated/platform/account/PlatformAccountHolder.js";
import type { PlatformExternalApiFailedError } from "../../../generated/platform/PlatformExternalApiFailedError.js";
import type { PlatformExternalApiTemporarilyFailedError } from "../../../generated/platform/account/PlatformExternalApiTemporarilyFailedError.js";
import type { PlatformNotEnabledError } from "../../../generated/platform/PlatformNotEnabledError.js";
import type { PlatformNotSupportedBankError } from "../../../generated/platform/account/PlatformNotSupportedBankError.js";
import type { UnauthorizedError } from "../../../generated/common/UnauthorizedError.js";
/**
* 포트원 API 클라이언트를 생성합니다.
*/
export declare function AccountClient(init: PortOneClientInit): AccountClient;
export type AccountClient = {
/**
* 예금주 조회
*
* 계좌의 예금주를 조회합니다.
*
* @throws {@link GetPlatformAccountHolderError}
*/
getPlatformAccountHolder: (options: {
/** 은행 */
bank: Bank;
/** '-'를 제외한 계좌 번호 */
accountNumber: string;
/**
* 생년월일
*
* 실명 조회를 위해 추가로 보낼 수 있습니다. birthdate과 businessRegistrationNumber 중 하나만 사용해야 합니다.
*/
birthdate?: string;
/**
* 사업자등록번호
*
* 실명 조회를 위해 추가로 보낼 수 있습니다. birthdate과 businessRegistrationNumber 중 하나만 사용해야 합니다.
*/
businessRegistrationNumber?: string;
}) => Promise<PlatformAccountHolder>;
};
export declare class GetPlatformAccountHolderError extends AccountError {
readonly data: ForbiddenError | InvalidRequestError | PlatformExternalApiFailedError | PlatformExternalApiTemporarilyFailedError | PlatformNotEnabledError | PlatformNotSupportedBankError | UnauthorizedError | {
readonly type: Unrecognized;
};
/** @ignore */
constructor(data: ForbiddenError | InvalidRequestError | PlatformExternalApiFailedError | PlatformExternalApiTemporarilyFailedError | PlatformNotEnabledError | PlatformNotSupportedBankError | UnauthorizedError | {
readonly type: Unrecognized;
});
}