storj/web/satellite/tests/unit/mock/api/payments.ts
VitaliiShpital 47def02094 satellite: account balance divided into Free Credits and Coins
Change-Id: I2ae29701bab9f0b48f236ff94b366eb534b81c6b
2020-05-18 14:25:26 +00:00

53 lines
1.3 KiB
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import {
AccountBalance,
BillingHistoryItem,
CreditCard,
PaymentsApi,
ProjectUsageAndCharges,
TokenDeposit,
} from '@/types/payments';
/**
* Mock for PaymentsApi
*/
export class PaymentsMock implements PaymentsApi {
setupAccount(): Promise<void> {
throw new Error('Method not implemented');
}
getBalance(): Promise<AccountBalance> {
return Promise.resolve(new AccountBalance());
}
projectsUsageAndCharges(): Promise<ProjectUsageAndCharges[]> {
return Promise.resolve([]);
}
addCreditCard(token: string): Promise<void> {
throw new Error('Method not implemented');
}
removeCreditCard(cardId: string): Promise<void> {
throw new Error('Method not implemented');
}
listCreditCards(): Promise<CreditCard[]> {
return Promise.resolve([]);
}
makeCreditCardDefault(cardId: string): Promise<void> {
throw new Error('Method not implemented');
}
billingHistory(): Promise<BillingHistoryItem[]> {
return Promise.resolve([]);
}
makeTokenDeposit(amount: number): Promise<TokenDeposit> {
return Promise.resolve(new TokenDeposit(amount, 'testAddress', 'testLink'));
}
}