UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

42 lines (41 loc) 1.87 kB
import { Environment } from '../ngx-services.models'; import { HttpClient } from '@angular/common/http'; import { QueryParams } from './models/api.models'; import { OpenItemsOut, OtherInvoiceOut, PaymentOut } from './models/api-open-items.types'; import { Observable } from 'rxjs'; import { OtherInvoiceIn, PaymentOpenItemIn } from './models/api-open-items.interfaces'; import * as i0 from "@angular/core"; export declare class ApiOpenItemsService { private environments; private http; constructor(environments: Environment, http: HttpClient); /** * Retrieves the API URL for open-items from the environments' configuration. * * @return {string} The API URL for open-items. */ get url(): string; /** * Retrieves a list of open-items based on the provided query parameters. * * @param {QueryParams} params - The parameters to use for querying open-items. * @return {Observable<OpenItemsOut>} An observable that emits the open-item's data. */ getOpenItems(params: QueryParams): Observable<OpenItemsOut>; /** * Processes a payment for an open item. * * @param {PaymentOpenItemIn} body - The payment details for the open item. * @return {Observable<PaymentOut>} An observable that emits the result of the payment processing. */ postPayment(body: PaymentOpenItemIn): Observable<PaymentOut>; /** * Processes a payment for other invoice. * * @param {OtherInvoiceIn} body - The payment details for the other invoice. * @return {Observable<OtherInvoiceOut>} An observable that emits the result of the payment processing. */ postOtherInvoice(body: OtherInvoiceIn): Observable<OtherInvoiceOut>; static ɵfac: i0.ɵɵFactoryDeclaration<ApiOpenItemsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiOpenItemsService>; }