import { Transaction } from './transaction'; import { SnapTransaction } from 'types/transaction'; import { Parameter } from 'types/parameter'; import { MidtransError } from './midtransError'; /** * Snap object used to do request to Midtrans Snap API */ export declare class Snap { private apiConfig; private httpClient; private transaction; constructor(options?: { isProduction?: boolean; serverKey: string; clientKey: string; }); /** * Do `/transactions` API request to Snap API * @param {Object} parameter - object of Core API JSON body as parameter, will be converted to JSON * @return {Promise} - Promise contains Object from JSON decoded response */ createTransaction(parameter: Parameter): Promise; /** * Wrapper function that call `createTransaction` then: * @return {Promise} - Promise of String token */ createTransactionToken(parameter: Parameter): Promise; /** * Wrapper function that call `createTransaction` then: * @return {Promise} - Promise of String redirect_url */ createTransactionRedirectUrl(parameter: Parameter): Promise; getTransaction(): Transaction; }