import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';

import {environment} from "../../../../../environments/environment";


@Injectable({
  providedIn: 'root'
})
export class CatalogoImpuestoService {



    constructor(private http: HttpClient) {
    }

    url = `${environment.HOST}/`;
    endpoint: string = 'catalogoImp';


    saveObject(obj): Observable<any> {
        return this.http.post(this.url + this.endpoint + '/guardarCatalogoImp', obj);
    }

    getAll(): Observable<any> {
        return this.http.get(this.url + this.endpoint + '/listarCatalogoImp');
    }

    getById(key): Observable<any> {
        return this.http.get(this.url + this.endpoint + '/buscarPorIdCatalogoImp/' + key);
    }




    deleteObject(key): Observable<any> {
        return this.http.delete(this.url + this.endpoint + '/eliminarCatalogoImp/' + key);
    }



  }

