import * as gracely from "gracely"; import * as isoly from "isoly"; import { Capture as AuthorizationCapture } from "../../Capture"; import { Error } from "../../Error"; export declare type Capture = Fail | Success; interface Base { merchant: string; number: string; date: isoly.DateTime; type: "capture"; amount: number; status: "success" | "fail"; currency: isoly.Currency; processor?: Record; } interface Fail extends Base { status: "fail"; reason: Error.Code; declinedBy?: "issuer" | "intergiro"; error: gracely.Error; } interface Success extends Base { status: "success"; reference: string; } export declare namespace Capture { function isFail(value: any | Fail): value is Fail; function isSuccess(value: any | Success): value is Success; function is(value: any | Capture): value is Capture; function create(merchant: string, authorization: { number: string; currency: isoly.Currency; processor?: Record; }, amount: number, input: gracely.Error | AuthorizationCapture): Capture; } export {};