import { Injectable } from '@angular/core';
import { ConfigService } from '@shared/config/config.service';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { FleioApiService } from '@fleio-api/fleio-api.service';
import { EnduserBillingSummaryModel } from '@fleio-api/billing/model/enduser-billing-summary.model';

@Injectable({
  providedIn: 'root'
})
export class BillingApiService extends FleioApiService<any> {
  constructor(protected httpClient: HttpClient, protected config: ConfigService) {
    super();
    this.setEndpoint(config.getPanelApiUrl('billing'));
  }

  getSummary(): Observable<EnduserBillingSummaryModel> {
    return this.getAction( 'summary');
  }

}
