temp build

This commit is contained in:
Stephan D
2025-12-05 01:32:41 +01:00
parent 082d782a80
commit f71cc76f64
50 changed files with 853 additions and 707 deletions

View File

@@ -0,0 +1,48 @@
// import 'package:pshared/models/payment/methods/type.dart';
// import 'package:pshared/models/payment/type.dart';
// abstract class PaymentMethodsService {
// Future<List<PaymentMethod>> fetchMethods();
// }
// class MockPaymentMethodsService implements PaymentMethodsService {
// @override
// Future<List<PaymentMethod>> fetchMethods() async {
// await Future.delayed(const Duration(milliseconds: 200));
// return [
// PaymentMethod(
// id: '1',
// label: 'My account',
// details: '•••4567',
// type: PaymentType.bankAccount,
// isMain: true,
// ),
// PaymentMethod(
// id: '2',
// label: 'Euro IBAN',
// details: 'DE•• •••8901',
// type: PaymentType.iban,
// ),
// PaymentMethod(
// id: '3',
// label: 'Wallet',
// details: 'WA12345667',
// type: PaymentType.wallet,
// ),
// PaymentMethod(
// id: '4',
// label: 'Wallet',
// details: 'WA-76654321',
// type: PaymentType.wallet,
// ),
// PaymentMethod(
// id: '5',
// label: 'Credit Card',
// details: '21•• •••• •••• 8901',
// type: PaymentType.card,
// ),
// ];
// }
// }

View File

@@ -1,48 +0,0 @@
import 'package:pshared/models/payment/methods/type.dart';
import 'package:pshared/models/payment/type.dart';
abstract class PaymentMethodsService {
Future<List<PaymentMethod>> fetchMethods();
}
class MockPaymentMethodsService implements PaymentMethodsService {
@override
Future<List<PaymentMethod>> fetchMethods() async {
await Future.delayed(const Duration(milliseconds: 200));
return [
PaymentMethod(
id: '1',
label: 'My account',
details: '•••4567',
type: PaymentType.bankAccount,
isMain: true,
),
PaymentMethod(
id: '2',
label: 'Euro IBAN',
details: 'DE•• •••8901',
type: PaymentType.iban,
),
PaymentMethod(
id: '3',
label: 'Wallet',
details: 'WA12345667',
type: PaymentType.wallet,
),
PaymentMethod(
id: '4',
label: 'Wallet',
details: 'WA-76654321',
type: PaymentType.wallet,
),
PaymentMethod(
id: '5',
label: 'Credit Card',
details: '21•• •••• •••• 8901',
type: PaymentType.card,
),
];
}
}

View File

@@ -1,88 +1,88 @@
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';
// 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 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',
),
),
];
}
// 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',
// ),
// ),
// ];
// }