// Copyright (C) 2019 Storj Labs, Inc. // See LICENSE for copying information. import { AccountBalance, Coupon, CreditCard, PaymentsApi, PaymentsHistoryItem, ProjectUsageAndCharges, ProjectUsagePriceModel, TokenDeposit, NativePaymentHistoryItem, Wallet, } from '@/types/payments'; /** * Mock for PaymentsApi */ export class PaymentsMock implements PaymentsApi { private mockCoupon: Coupon | null = null; public setMockCoupon(coupon: Coupon | null): void { this.mockCoupon = coupon; } setupAccount(): Promise { throw new Error('Method not implemented'); } getBalance(): Promise { return Promise.resolve(new AccountBalance()); } projectsUsageAndCharges(): Promise { return Promise.resolve([]); } projectUsagePriceModel(): Promise { return Promise.resolve(new ProjectUsagePriceModel('1', '1', '1')); } addCreditCard(_token: string): Promise { throw new Error('Method not implemented'); } removeCreditCard(_cardId: string): Promise { throw new Error('Method not implemented'); } listCreditCards(): Promise { return Promise.resolve([]); } makeCreditCardDefault(_cardId: string): Promise { throw new Error('Method not implemented'); } paymentsHistory(): Promise { return Promise.resolve([]); } nativePaymentsHistory(): Promise { return Promise.resolve([]); } makeTokenDeposit(amount: number): Promise { return Promise.resolve(new TokenDeposit(amount, 'testAddress', 'testLink')); } applyCouponCode(_: string): Promise { throw new Error('Method not implemented'); } getCoupon(): Promise { return Promise.resolve(this.mockCoupon); } getWallet(): Promise { return Promise.resolve(new Wallet()); } claimWallet(): Promise { return Promise.resolve(new Wallet()); } purchasePricingPackage(_: string): Promise { throw new Error('Method not implemented'); } }