89 lines
2.8 KiB
Dart
89 lines
2.8 KiB
Dart
import 'package:pshared/models/recipient/recipient.dart';
|
|
import 'package:pshared/models/payment/methods/card.dart';
|
|
import 'package:pshared/models/payment/methods/iban.dart';
|
|
import 'package:pshared/models/payment/methods/russian_bank.dart';
|
|
import 'package:pshared/models/payment/methods/wallet.dart';
|
|
import 'package:pshared/models/recipient/status.dart';
|
|
import 'package:pshared/models/recipient/type.dart';
|
|
|
|
|
|
class RecipientService {
|
|
Future<List<Recipient>> fetchRecipients() async {
|
|
await Future.delayed(const Duration(milliseconds: 500));
|
|
return RecipientMockData.all;
|
|
}
|
|
}
|
|
|
|
class RecipientMockData {
|
|
static List<Recipient> get all => [
|
|
Recipient.mock(
|
|
name: 'Alice Johnson',
|
|
email: 'alice@example.com',
|
|
status: RecipientStatus.ready,
|
|
type: RecipientType.internal,
|
|
card: CardPaymentMethod(
|
|
pan: '1213',
|
|
firstName: 'Alice',
|
|
lastName: 'Johnson',
|
|
),
|
|
),
|
|
Recipient.mock(
|
|
name: 'Bob & Co Ltd.',
|
|
email: 'payout@bobco.com',
|
|
status: RecipientStatus.registered,
|
|
type: RecipientType.external,
|
|
card: CardPaymentMethod(
|
|
pan: '4343',
|
|
firstName: 'Bob',
|
|
lastName: 'Co',
|
|
),
|
|
iban: IbanPaymentMethod(
|
|
iban: 'FR7630***890189',
|
|
accountHolder: 'Bob & Co Ltd.',
|
|
bic: 'AGRIFRPP',
|
|
bankName: 'Credit Agricole',
|
|
),
|
|
wallet: WalletPaymentMethod(walletId: '8932231'),
|
|
),
|
|
Recipient.mock(
|
|
name: 'Carlos Kline',
|
|
email: 'carlos@acme.org',
|
|
status: RecipientStatus.notRegistered,
|
|
type: RecipientType.internal,
|
|
wallet: WalletPaymentMethod(walletId: '7723490'),
|
|
),
|
|
Recipient.mock(
|
|
name: 'Delta Outsourcing GmbH',
|
|
email: 'finance@delta-os.de',
|
|
status: RecipientStatus.registered,
|
|
type: RecipientType.external,
|
|
card: CardPaymentMethod(
|
|
pan: '9988',
|
|
firstName: 'Delta',
|
|
lastName: 'GmbH',
|
|
),
|
|
iban: IbanPaymentMethod(
|
|
iban: 'DE4450***324931',
|
|
accountHolder: 'Delta Outsourcing GmbH',
|
|
bic: 'INGDDEFFXXX',
|
|
bankName: 'ING',
|
|
),
|
|
),
|
|
Recipient.mock(
|
|
name: 'Erin Patel',
|
|
email: 'erin@labster.io',
|
|
status: RecipientStatus.ready,
|
|
type: RecipientType.internal,
|
|
bank: RussianBankAccountPaymentMethod(
|
|
accountNumber: '4081***7654',
|
|
recipientName: 'Erin Patel',
|
|
inn: '7812012345',
|
|
kpp: '781201001',
|
|
bankName: 'Alfa-Bank',
|
|
bik: '044525593',
|
|
correspondentAccount: '30101810200000000593',
|
|
),
|
|
),
|
|
];
|
|
}
|