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 { ICreditAndInvoicingInfoModel } from '@fleio-api/openstack/billing/model/credit-and-invoicing-info.model';

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

  getCreditAndInvoicingInfo(): Observable<ICreditAndInvoicingInfoModel> {
    return this.getAction( 'credit_and_invoicing_info');
  }

}
