import { HttpClient } from '../http'; import { BadRequest, Response } from '../interface'; import { CheckBalanceResponse, LedgerBalanceResponse, ResendTransferOTP, } from './interface'; export class Control { http: HttpClient; constructor(http: HttpClient) { this.http = http; } async balance(): Promise { return await this.http.get('/balance'); } async ledgerBalance(): Promise { return await this.http.get('/balance/ledger'); } async resendOTP(data: ResendTransferOTP): Promise { return await this.http.post('/transfer/resend_otp', JSON.stringify(data)); } async disableOTP(): Promise { return await this.http.post('/transfer/disable_otp'); } async finalizeDisableOTP(otp: string): Promise { return await this.http.post( '/transfer/disable_otp_finalize', JSON.stringify({ otp }), ); } async enableOTP(): Promise { return await this.http.post('/transfer/enable_otp'); } }