b265b7f555
Add a config so that some percent of users require credit cards / account balances in order to create a project or have a promotional coupon applied UI was updated to match needed paywall status At this point we decided not to use a field to store if a user is in an A/B test, and instead just use math to see if they're in a test. We decided to use MD5 (because its in Postgres too) and User UUID for that math. Change-Id: I0fcd80707dc29afc668632d078e1b5a7a24f3bb3
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import {
|
|
AccountBalance,
|
|
CreditCard,
|
|
PaymentsApi,
|
|
PaymentsHistoryItem,
|
|
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');
|
|
}
|
|
|
|
paymentsHistory(): Promise<PaymentsHistoryItem[]> {
|
|
return Promise.resolve([]);
|
|
}
|
|
|
|
makeTokenDeposit(amount: number): Promise<TokenDeposit> {
|
|
return Promise.resolve(new TokenDeposit(amount, 'testAddress', 'testLink'));
|
|
}
|
|
|
|
getPaywallEnabledStatus(userId: string): Promise<boolean> {
|
|
throw new Error('Method not implemented');
|
|
}
|
|
}
|