import { Observable } from 'rxjs/Observable'; import { Subscription } from 'rxjs'; import { IPaymentHistory } from './payment-history'; import { IPaymentMethod } from './payment-method'; import { FirebaseAccountPaymentService } from './firebase-account-payment.service'; import { AuthHttp, IAuthStateDependentService, SimpleAuthService } from '@capellasolutions/zwp-modules/auth'; import { ICreditCardInfo } from '../models/credit-card-info/credit-card-info'; export declare const PAYMENT_SORT_FIELDS: { STATUS: string; PAYMENT_DATE: string; CONFIRMATION_NUMBER: string; METHOD: string; AMOUNT: string; }; export declare const PAYMENT_SORT_DIRECTION: { ASC: string; DESC: string; }; export interface IAccountPaymentService { paymentMethodsList: Observable; getPaymentMethod(paymentMethodId: string): Promise; editPaymentMethod(existPaymentMethod: IPaymentMethod, newPaymentInfo: ICreditCardInfo | IPaymentMethod, mdn: string): void; removePaymentMethod(paymentMethodId: string): void; setPaymentMethodAsDefault(paymentMethodId: string, userPlanId: string): void; } export declare class AccountPaymentService implements IAccountPaymentService, IAuthStateDependentService { private _endpointUrl; private _http; private _simpleAuthService; private _firebaseAccountPaymentService; static shortenAddress(text: string, maxLen?: number, separator?: string): string; paymentHistory: Observable; paymentMethodsList: Observable; private _paymentMethodsSubscription; private _paymentHistorySubscription; constructor(_endpointUrl: string, _http: AuthHttp, _simpleAuthService: SimpleAuthService, _firebaseAccountPaymentService: FirebaseAccountPaymentService); buildSubscriptions(fbUser: firebase.User): Array; onLoggedOut(): void; reloadPaymentHistory(mdn: string, orderId: string, limit: number, page: number, sortByField: string, sortDirection: string): void; getPaymentMethod(paymentMethodId: string): Promise; addPaymentMethod(paymentInfo: ICreditCardInfo): Promise; editPaymentMethod(existPaymentMethod: IPaymentMethod, newPaymentInfo: ICreditCardInfo, mdn: string): Promise; getExistPaymentMethod(paymentInfo: ICreditCardInfo): Promise; removePaymentMethod(paymentMethodId: string): void; setPaymentMethodAsDefault(paymentMethodId: string, userPlanId: string): Promise; private _getBackendPaymentHistory(mdn, orderId, limit, page, sortBy, sortMethod); private _addBackendPaymentMethod(paymentData); private _editBackendPaymentMethod(mdn, paymentData); private _getBackendPaymentMethod(id); }