import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BaseService } from '../../base/base-service';

@Injectable({
    providedIn: 'root'
})
export class StudentPaymentService extends BaseService {

    constructor(
        public http: HttpClient
    ) {
        super('/v1/student_payment/bill_receivable_item',http)
     }

     getByDate(date){
         return this.http.get(`${this.fullUrl}_by_date/${date}`)
     }

     confirmPayment(data){
         return this.http.put(`${this.prefix}/v1/student_payment/confirm_list_payment`,data)
     }

     deletePayment(data){
        const httpOptions = {
            headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
            body: data
        }
        return this.http.delete(`${this.prefix}/v1/student_payment/delete_list_payment`,httpOptions)
     }
}
