add edit profile screens (child/parent) with SCA, paginated transactions, and reactive state refresh
This commit is contained in:
@@ -7,6 +7,6 @@
|
||||
<versions>
|
||||
<version>2.6.4</version>
|
||||
</versions>
|
||||
<lastUpdated>20260309000000</lastUpdated>
|
||||
<lastUpdated>20260312000000</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
|
||||
@@ -1 +1 @@
|
||||
efba28f7c4340264bc1e42e5d11102a8
|
||||
a9c8c5ab69327988cd562b4a81d75996
|
||||
@@ -1 +1 @@
|
||||
33fe0a028f582b89ab719f8dafc0490e05af4ff5
|
||||
c9283cd399a3a0f0957dd630a31b744fd45b9fd6
|
||||
@@ -29,11 +29,15 @@ class AppRoutes {
|
||||
'${childWallet(childWalletId)}/goals';
|
||||
static String extract(String childWalletId) =>
|
||||
'${childWallet(childWalletId)}/extract';
|
||||
static String editChildProfile(String childWalletId) =>
|
||||
'${childWallet(childWalletId)}/edit';
|
||||
static const dashboardActivity = '$dashboard/activity';
|
||||
static const dashboardNotifications = '$dashboard/notifications';
|
||||
static const dashboardProfile = '$dashboard/profile';
|
||||
static const dashboardProfileSettings = '$dashboardProfile/settings';
|
||||
static const dashboardProfilePayout = '$dashboardProfile/payout';
|
||||
static const dashboardProfileEditPersonalData =
|
||||
'$dashboardProfileSettings/edit-personal-data';
|
||||
static const dashboardProfilePaymentMethods =
|
||||
'$dashboardProfileSettings/payment-methods';
|
||||
|
||||
|
||||
@@ -21,18 +21,17 @@ class TreezorTokenInterceptor extends Interceptor {
|
||||
_handling = true;
|
||||
_onTokenExpired();
|
||||
Future.delayed(const Duration(seconds: 2), () => _handling = false);
|
||||
} else if (err.response?.statusCode == 500) {
|
||||
_handling = true;
|
||||
_onTokenExpired();
|
||||
Future.delayed(const Duration(seconds: 2), () => _handling = false);
|
||||
} else if (err.response?.statusCode == 401) {
|
||||
_handling = true;
|
||||
_onUnauthorized();
|
||||
Future.delayed(const Duration(seconds: 2), () => _handling = false);
|
||||
}
|
||||
// else if (err.response?.statusCode == 401) {
|
||||
// _handling = true;
|
||||
// _onUnauthorized();
|
||||
// Future.delayed(const Duration(seconds: 2), () => _handling = false);
|
||||
// }
|
||||
// } else if (err.response?.statusCode == 500) {
|
||||
// _handling = true;
|
||||
// _onTokenExpired();
|
||||
// Future.delayed(const Duration(seconds: 2), () => _handling = false);
|
||||
// }
|
||||
}
|
||||
|
||||
handler.next(err);
|
||||
}
|
||||
|
||||
|
||||
@@ -273,8 +273,17 @@
|
||||
"transactionCheckRefund": "Scheckerstattung",
|
||||
"transactionSctr": "Banküberweisung",
|
||||
"transactionCreditInternationalTransfer": "Auslandsüberweisung",
|
||||
"transactionBankDirectDebit": "Lastschrift",
|
||||
"transactionBankTransfer": "Banküberweisung",
|
||||
"transactionCardTopup": "Kartenaufladung",
|
||||
"transactionCheck": "Scheck",
|
||||
"transactionCreditNote": "Gutschrift",
|
||||
"transactionFees": "Gebühren",
|
||||
"transactionInstantBankTransfer": "Sofortüberweisung",
|
||||
"transactionWalletTransfer": "Kontotransfer",
|
||||
"transactionUnknown": "Bewegung",
|
||||
"loadMore": "Mehr laden",
|
||||
"transactionsShown": "Bewegungen",
|
||||
|
||||
"profileAccountSettings": "Kontoeinstellungen",
|
||||
"profileWithdrawMoney": "Geld vom Wallet abheben",
|
||||
@@ -382,6 +391,9 @@
|
||||
"deleteDeviceConfirmTitle": "Gerät löschen?",
|
||||
"deleteDeviceConfirmMessage": "Diese Aktion kann nicht rückgängig gemacht werden. Bist du sicher, dass du dieses Gerät löschen möchtest?",
|
||||
"deleteDeviceSuccess": "Gerät erfolgreich gelöscht",
|
||||
"deleteDeviceNotAllowedTitle": "Löschen nicht möglich",
|
||||
"deleteDeviceChecking": "Überprüfung...",
|
||||
"deleteDeviceWalletNonZeroBalance": "Das Profil kann nicht gelöscht werden, da das Wallet ein verfügbares Guthaben hat",
|
||||
|
||||
"limitsSave": "Limits speichern",
|
||||
"limitsSpendingTitle": "Ausgabenlimits setzen",
|
||||
@@ -473,6 +485,13 @@
|
||||
"profileSettingsLogoutConfirm": "Sind Sie sicher, dass Sie sich abmelden möchten?",
|
||||
"profileSettingsLogoutError": "Fehler beim Abmelden",
|
||||
"profileSettingsSave": "Änderungen speichern",
|
||||
"profileSettingsSaveSuccess": "Änderungen erfolgreich gespeichert",
|
||||
"profileSettingsLastName": "Nachname",
|
||||
"profileSettingsStreet": "Straße",
|
||||
"profileSettingsCity": "Stadt",
|
||||
"profileSettingsProvince": "Provinz",
|
||||
"profileSettingsState": "Bundesland",
|
||||
"profileSettingsPostCode": "Postleitzahl",
|
||||
|
||||
"dashboardTabHome": "Startseite",
|
||||
"dashboardTabActivity": "Aktivität",
|
||||
@@ -488,5 +507,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Größe (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Aktivierungsschlüssel"
|
||||
"activationKeyLabel": "Aktivierungsschlüssel",
|
||||
"editChildProfile": "Profil bearbeiten",
|
||||
"editChildProfileTitle": "Kinderprofil bearbeiten",
|
||||
"editChildProfileSaveSuccess": "Kinderprofil erfolgreich aktualisiert"
|
||||
}
|
||||
@@ -266,8 +266,17 @@
|
||||
"transactionCheckRefund": "Check refund",
|
||||
"transactionSctr": "Credit transfer",
|
||||
"transactionCreditInternationalTransfer": "International transfer",
|
||||
"transactionBankDirectDebit": "Direct debit",
|
||||
"transactionBankTransfer": "Bank transfer",
|
||||
"transactionCardTopup": "Card top-up",
|
||||
"transactionCheck": "Check",
|
||||
"transactionCreditNote": "Credit note",
|
||||
"transactionFees": "Fees",
|
||||
"transactionInstantBankTransfer": "Instant transfer",
|
||||
"transactionWalletTransfer": "Wallet transfer",
|
||||
"transactionUnknown": "Transaction",
|
||||
"loadMore": "Load more",
|
||||
"transactionsShown": "transactions",
|
||||
"profileAccountSettings": "Account settings",
|
||||
"profileWithdrawMoney": "Withdraw money from wallet",
|
||||
"profileNoRecentTransactions": "No recent transactions",
|
||||
@@ -364,6 +373,9 @@
|
||||
"deleteDeviceConfirmTitle": "Delete device?",
|
||||
"deleteDeviceConfirmMessage": "This action cannot be undone. Are you sure you want to delete this device?",
|
||||
"deleteDeviceSuccess": "Device deleted successfully",
|
||||
"deleteDeviceNotAllowedTitle": "Cannot delete",
|
||||
"deleteDeviceChecking": "Checking...",
|
||||
"deleteDeviceWalletNonZeroBalance": "Cannot delete the profile because the wallet has a non-zero balance",
|
||||
"limitsSave": "Save limits",
|
||||
"limitsSpendingTitle": "Set spending limits",
|
||||
"limitsSpendingSubtitle": "Freedom for them, peace of mind for you",
|
||||
@@ -452,6 +464,13 @@
|
||||
"profileSettingsLogoutConfirm": "Are you sure you want to log out?",
|
||||
"profileSettingsLogoutError": "Error logging out",
|
||||
"profileSettingsSave": "Save changes",
|
||||
"profileSettingsSaveSuccess": "Changes saved successfully",
|
||||
"profileSettingsLastName": "Last name",
|
||||
"profileSettingsStreet": "Street",
|
||||
"profileSettingsCity": "City",
|
||||
"profileSettingsProvince": "Province",
|
||||
"profileSettingsState": "State",
|
||||
"profileSettingsPostCode": "Post code",
|
||||
"dashboardTabHome": "Home",
|
||||
"dashboardTabActivity": "Activity",
|
||||
"dashboardTabNotifications": "Notifications",
|
||||
@@ -544,5 +563,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Height (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Activation key"
|
||||
"activationKeyLabel": "Activation key",
|
||||
"editChildProfile": "Edit profile",
|
||||
"editChildProfileTitle": "Edit child profile",
|
||||
"editChildProfileSaveSuccess": "Child profile updated successfully"
|
||||
}
|
||||
@@ -266,8 +266,17 @@
|
||||
"transactionCheckRefund": "Reembolso de cheque",
|
||||
"transactionSctr": "Transferencia bancaria",
|
||||
"transactionCreditInternationalTransfer": "Transferencia internacional",
|
||||
"transactionBankDirectDebit": "Domiciliación bancaria",
|
||||
"transactionBankTransfer": "Transferencia bancaria",
|
||||
"transactionCardTopup": "Recarga con tarjeta",
|
||||
"transactionCheck": "Cheque",
|
||||
"transactionCreditNote": "Nota de crédito",
|
||||
"transactionFees": "Comisiones",
|
||||
"transactionInstantBankTransfer": "Transferencia instantánea",
|
||||
"transactionWalletTransfer": "Transferencia entre cuentas",
|
||||
"transactionUnknown": "Movimiento",
|
||||
"loadMore": "Cargar más",
|
||||
"transactionsShown": "movimientos",
|
||||
"profileAccountSettings": "Ajustes de la cuenta",
|
||||
"profileWithdrawMoney": "Retirar dinero del wallet",
|
||||
"profileNoRecentTransactions": "No hay movimientos recientes",
|
||||
@@ -363,6 +372,9 @@
|
||||
"deleteDeviceConfirmTitle": "¿Eliminar dispositivo?",
|
||||
"deleteDeviceConfirmMessage": "Esta acción no se puede deshacer. ¿Estás seguro de que quieres eliminar este dispositivo?",
|
||||
"deleteDeviceSuccess": "Dispositivo eliminado correctamente",
|
||||
"deleteDeviceNotAllowedTitle": "No se puede eliminar",
|
||||
"deleteDeviceChecking": "Comprobando...",
|
||||
"deleteDeviceWalletNonZeroBalance": "No se puede eliminar el perfil porque la cartera tiene saldo disponible",
|
||||
"limitsSave": "Guardar límites",
|
||||
"limitsSpendingTitle": "Pon límite de gastos",
|
||||
"limitsSpendingSubtitle": "Libertad para ellos, tranquilidad para ti",
|
||||
@@ -451,6 +463,13 @@
|
||||
"profileSettingsLogoutConfirm": "¿Estás seguro de que deseas cerrar sesión?",
|
||||
"profileSettingsLogoutError": "Error al cerrar sesión",
|
||||
"profileSettingsSave": "Guardar cambios",
|
||||
"profileSettingsSaveSuccess": "Cambios guardados correctamente",
|
||||
"profileSettingsLastName": "Apellido",
|
||||
"profileSettingsStreet": "Calle",
|
||||
"profileSettingsCity": "Ciudad",
|
||||
"profileSettingsProvince": "Provincia",
|
||||
"profileSettingsState": "Estado",
|
||||
"profileSettingsPostCode": "Código postal",
|
||||
"dashboardTabHome": "Inicio",
|
||||
"dashboardTabActivity": "Actividad",
|
||||
"dashboardTabNotifications": "Notificaciones",
|
||||
@@ -540,5 +559,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Altura (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Clave de activación"
|
||||
"activationKeyLabel": "Clave de activación",
|
||||
"editChildProfile": "Editar perfil",
|
||||
"editChildProfileTitle": "Editar perfil del niño",
|
||||
"editChildProfileSaveSuccess": "Perfil del niño actualizado correctamente"
|
||||
}
|
||||
@@ -273,8 +273,17 @@
|
||||
"transactionCheckRefund": "Remboursement de chèque",
|
||||
"transactionSctr": "Virement bancaire",
|
||||
"transactionCreditInternationalTransfer": "Virement international",
|
||||
"transactionBankDirectDebit": "Prélèvement bancaire",
|
||||
"transactionBankTransfer": "Virement bancaire",
|
||||
"transactionCardTopup": "Rechargement par carte",
|
||||
"transactionCheck": "Chèque",
|
||||
"transactionCreditNote": "Avoir",
|
||||
"transactionFees": "Frais",
|
||||
"transactionInstantBankTransfer": "Virement instantané",
|
||||
"transactionWalletTransfer": "Transfert entre comptes",
|
||||
"transactionUnknown": "Mouvement",
|
||||
"loadMore": "Charger plus",
|
||||
"transactionsShown": "mouvements",
|
||||
|
||||
"profileAccountSettings": "Paramètres du compte",
|
||||
"profileWithdrawMoney": "Retirer de l'argent du portefeuille",
|
||||
@@ -382,6 +391,9 @@
|
||||
"deleteDeviceConfirmTitle": "Supprimer l'appareil ?",
|
||||
"deleteDeviceConfirmMessage": "Cette action est irréversible. Êtes-vous sûr de vouloir supprimer cet appareil ?",
|
||||
"deleteDeviceSuccess": "Appareil supprimé avec succès",
|
||||
"deleteDeviceNotAllowedTitle": "Suppression impossible",
|
||||
"deleteDeviceChecking": "Vérification...",
|
||||
"deleteDeviceWalletNonZeroBalance": "Impossible de supprimer le profil car le portefeuille a un solde disponible",
|
||||
|
||||
"limitsSave": "Enregistrer les limites",
|
||||
"limitsSpendingTitle": "Fixe des limites de dépenses",
|
||||
@@ -473,6 +485,13 @@
|
||||
"profileSettingsLogoutConfirm": "Êtes-vous sûr de vouloir vous déconnecter ?",
|
||||
"profileSettingsLogoutError": "Erreur lors de la déconnexion",
|
||||
"profileSettingsSave": "Enregistrer les modifications",
|
||||
"profileSettingsSaveSuccess": "Modifications enregistrées avec succès",
|
||||
"profileSettingsLastName": "Nom de famille",
|
||||
"profileSettingsStreet": "Rue",
|
||||
"profileSettingsCity": "Ville",
|
||||
"profileSettingsProvince": "Province",
|
||||
"profileSettingsState": "État",
|
||||
"profileSettingsPostCode": "Code postal",
|
||||
|
||||
"dashboardTabHome": "Accueil",
|
||||
"dashboardTabActivity": "Activité",
|
||||
@@ -488,5 +507,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Taille (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Clé d'activation"
|
||||
"activationKeyLabel": "Clé d'activation",
|
||||
"editChildProfile": "Modifier le profil",
|
||||
"editChildProfileTitle": "Modifier le profil de l'enfant",
|
||||
"editChildProfileSaveSuccess": "Profil de l'enfant mis à jour avec succès"
|
||||
}
|
||||
@@ -273,8 +273,17 @@
|
||||
"transactionCheckRefund": "Rimborso assegno",
|
||||
"transactionSctr": "Bonifico bancario",
|
||||
"transactionCreditInternationalTransfer": "Bonifico internazionale",
|
||||
"transactionBankDirectDebit": "Addebito diretto",
|
||||
"transactionBankTransfer": "Bonifico bancario",
|
||||
"transactionCardTopup": "Ricarica con carta",
|
||||
"transactionCheck": "Assegno",
|
||||
"transactionCreditNote": "Nota di credito",
|
||||
"transactionFees": "Commissioni",
|
||||
"transactionInstantBankTransfer": "Bonifico istantaneo",
|
||||
"transactionWalletTransfer": "Trasferimento tra conti",
|
||||
"transactionUnknown": "Movimento",
|
||||
"loadMore": "Carica altro",
|
||||
"transactionsShown": "movimenti",
|
||||
|
||||
"profileAccountSettings": "Impostazioni account",
|
||||
"profileWithdrawMoney": "Preleva denaro dal portafoglio",
|
||||
@@ -382,6 +391,9 @@
|
||||
"deleteDeviceConfirmTitle": "Eliminare il dispositivo?",
|
||||
"deleteDeviceConfirmMessage": "Questa azione non può essere annullata. Sei sicuro di voler eliminare questo dispositivo?",
|
||||
"deleteDeviceSuccess": "Dispositivo eliminato con successo",
|
||||
"deleteDeviceNotAllowedTitle": "Impossibile eliminare",
|
||||
"deleteDeviceChecking": "Verifica in corso...",
|
||||
"deleteDeviceWalletNonZeroBalance": "Impossibile eliminare il profilo perché il portafoglio ha un saldo disponibile",
|
||||
|
||||
"limitsSave": "Salva limiti",
|
||||
"limitsSpendingTitle": "Imposta limiti di spesa",
|
||||
@@ -473,6 +485,13 @@
|
||||
"profileSettingsLogoutConfirm": "Sei sicuro di voler uscire?",
|
||||
"profileSettingsLogoutError": "Errore durante la disconnessione",
|
||||
"profileSettingsSave": "Salva modifiche",
|
||||
"profileSettingsSaveSuccess": "Modifiche salvate con successo",
|
||||
"profileSettingsLastName": "Cognome",
|
||||
"profileSettingsStreet": "Via",
|
||||
"profileSettingsCity": "Città",
|
||||
"profileSettingsProvince": "Provincia",
|
||||
"profileSettingsState": "Stato",
|
||||
"profileSettingsPostCode": "Codice postale",
|
||||
|
||||
"dashboardTabHome": "Home",
|
||||
"dashboardTabActivity": "Attività",
|
||||
@@ -488,5 +507,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Altezza (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Chiave di attivazione"
|
||||
"activationKeyLabel": "Chiave di attivazione",
|
||||
"editChildProfile": "Modifica profilo",
|
||||
"editChildProfileTitle": "Modifica profilo del bambino",
|
||||
"editChildProfileSaveSuccess": "Profilo del bambino aggiornato con successo"
|
||||
}
|
||||
@@ -273,8 +273,17 @@
|
||||
"transactionCheckRefund": "Reembolso de cheque",
|
||||
"transactionSctr": "Transferência bancária",
|
||||
"transactionCreditInternationalTransfer": "Transferência internacional",
|
||||
"transactionBankDirectDebit": "Débito direto",
|
||||
"transactionBankTransfer": "Transferência bancária",
|
||||
"transactionCardTopup": "Carregamento com cartão",
|
||||
"transactionCheck": "Cheque",
|
||||
"transactionCreditNote": "Nota de crédito",
|
||||
"transactionFees": "Taxas",
|
||||
"transactionInstantBankTransfer": "Transferência instantânea",
|
||||
"transactionWalletTransfer": "Transferência entre contas",
|
||||
"transactionUnknown": "Movimento",
|
||||
"loadMore": "Carregar mais",
|
||||
"transactionsShown": "movimentos",
|
||||
|
||||
"profileAccountSettings": "Definições da conta",
|
||||
"profileWithdrawMoney": "Levantar dinheiro da carteira",
|
||||
@@ -382,6 +391,9 @@
|
||||
"deleteDeviceConfirmTitle": "Eliminar dispositivo?",
|
||||
"deleteDeviceConfirmMessage": "Esta ação não pode ser desfeita. Tens a certeza de que queres eliminar este dispositivo?",
|
||||
"deleteDeviceSuccess": "Dispositivo eliminado com sucesso",
|
||||
"deleteDeviceNotAllowedTitle": "Não é possível eliminar",
|
||||
"deleteDeviceChecking": "A verificar...",
|
||||
"deleteDeviceWalletNonZeroBalance": "Não é possível eliminar o perfil porque a carteira tem saldo disponível",
|
||||
|
||||
"limitsSave": "Guardar limites",
|
||||
"limitsSpendingTitle": "Define limite de gastos",
|
||||
@@ -473,6 +485,13 @@
|
||||
"profileSettingsLogoutConfirm": "Tem a certeza de que deseja terminar sessão?",
|
||||
"profileSettingsLogoutError": "Erro ao terminar sessão",
|
||||
"profileSettingsSave": "Guardar alterações",
|
||||
"profileSettingsSaveSuccess": "Alterações guardadas com sucesso",
|
||||
"profileSettingsLastName": "Apelido",
|
||||
"profileSettingsStreet": "Rua",
|
||||
"profileSettingsCity": "Cidade",
|
||||
"profileSettingsProvince": "Província",
|
||||
"profileSettingsState": "Estado",
|
||||
"profileSettingsPostCode": "Código postal",
|
||||
|
||||
"dashboardTabHome": "Início",
|
||||
"dashboardTabActivity": "Atividade",
|
||||
@@ -488,5 +507,8 @@
|
||||
"deviceSetup_weightHint": "30",
|
||||
"deviceSetup_heightLabel": "Altura (cm)",
|
||||
"deviceSetup_heightHint": "120",
|
||||
"activationKeyLabel": "Chave de ativação"
|
||||
"activationKeyLabel": "Chave de ativação",
|
||||
"editChildProfile": "Editar perfil",
|
||||
"editChildProfileTitle": "Editar perfil da criança",
|
||||
"editChildProfileSaveSuccess": "Perfil da criança atualizado com sucesso"
|
||||
}
|
||||
@@ -327,8 +327,17 @@ class I18n {
|
||||
static const String transactionSctr = 'transactionSctr';
|
||||
static const String transactionCreditInternationalTransfer =
|
||||
'transactionCreditInternationalTransfer';
|
||||
static const String transactionBankDirectDebit = 'transactionBankDirectDebit';
|
||||
static const String transactionBankTransfer = 'transactionBankTransfer';
|
||||
static const String transactionCardTopup = 'transactionCardTopup';
|
||||
static const String transactionCheck = 'transactionCheck';
|
||||
static const String transactionCreditNote = 'transactionCreditNote';
|
||||
static const String transactionFees = 'transactionFees';
|
||||
static const String transactionInstantBankTransfer = 'transactionInstantBankTransfer';
|
||||
static const String transactionWalletTransfer = 'transactionWalletTransfer';
|
||||
static const String transactionUnknown = 'transactionUnknown';
|
||||
static const String loadMore = 'loadMore';
|
||||
static const String transactionsShown = 'transactionsShown';
|
||||
static const String profileAccountSettings = 'profileAccountSettings';
|
||||
static const String profileWithdrawMoney = 'profileWithdrawMoney';
|
||||
static const String profileNoRecentTransactions =
|
||||
@@ -451,6 +460,9 @@ class I18n {
|
||||
static const String deleteDeviceConfirmTitle = 'deleteDeviceConfirmTitle';
|
||||
static const String deleteDeviceConfirmMessage = 'deleteDeviceConfirmMessage';
|
||||
static const String deleteDeviceSuccess = 'deleteDeviceSuccess';
|
||||
static const String deleteDeviceNotAllowedTitle = 'deleteDeviceNotAllowedTitle';
|
||||
static const String deleteDeviceChecking = 'deleteDeviceChecking';
|
||||
static const String deleteDeviceWalletNonZeroBalance = 'deleteDeviceWalletNonZeroBalance';
|
||||
|
||||
// Limits
|
||||
static const String limitsSave = 'limitsSave';
|
||||
@@ -542,6 +554,13 @@ class I18n {
|
||||
'profileSettingsLogoutConfirm';
|
||||
static const String profileSettingsLogoutError = 'profileSettingsLogoutError';
|
||||
static const String profileSettingsSave = 'profileSettingsSave';
|
||||
static const String profileSettingsSaveSuccess = 'profileSettingsSaveSuccess';
|
||||
static const String profileSettingsLastName = 'profileSettingsLastName';
|
||||
static const String profileSettingsStreet = 'profileSettingsStreet';
|
||||
static const String profileSettingsCity = 'profileSettingsCity';
|
||||
static const String profileSettingsProvince = 'profileSettingsProvince';
|
||||
static const String profileSettingsState = 'profileSettingsState';
|
||||
static const String profileSettingsPostCode = 'profileSettingsPostCode';
|
||||
|
||||
// Account Documents
|
||||
static const String accountDetails = 'accountDetails';
|
||||
@@ -661,4 +680,7 @@ class I18n {
|
||||
static const String deviceSetup_heightLabel = 'deviceSetup_heightLabel';
|
||||
static const String deviceSetup_heightHint = 'deviceSetup_heightHint';
|
||||
static const String activationKeyLabel = 'activationKeyLabel';
|
||||
static const String editChildProfile = 'editChildProfile';
|
||||
static const String editChildProfileTitle = 'editChildProfileTitle';
|
||||
static const String editChildProfileSaveSuccess = 'editChildProfileSaveSuccess';
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export 'src/domain/entities/payment_profile_entity.dart';
|
||||
export 'src/domain/use_cases/get_payment_profile_use_case.dart';
|
||||
export 'src/providers/get_payment_profile_use_case_provider.dart';
|
||||
export 'src/domain/entities/child_profile_entity.dart';
|
||||
export 'src/domain/entities/child_profile_deletability_entity.dart';
|
||||
export 'src/domain/entities/wallet_balance_entity.dart';
|
||||
export 'src/domain/entities/wallet_transaction_entity.dart';
|
||||
export 'src/domain/entities/user_entity.dart';
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:sf_shared/src/data/models/transaction_beneficiary_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_balance_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_card_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_limits_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_transaction_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_operation_model.dart';
|
||||
|
||||
abstract class TreezorRemoteDatasource {
|
||||
Future<ScaWalletsResponseModel> scaWallets();
|
||||
@@ -20,7 +20,12 @@ abstract class TreezorRemoteDatasource {
|
||||
required String userId,
|
||||
});
|
||||
|
||||
Future<WalletTransactionsResponseModel> getWalletTransactions({
|
||||
Future<PaymentProfileResponseModel> updatePaymentProfile({
|
||||
required String paymentProfileId,
|
||||
required Map<String, dynamic> body,
|
||||
});
|
||||
|
||||
Future<WalletOperationsResponseModel> getWalletOperations({
|
||||
required String walletId,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
@@ -32,13 +37,13 @@ abstract class TreezorRemoteDatasource {
|
||||
Future<TransactionBeneficiaryModel> createTransactionBeneficiary({
|
||||
required String name,
|
||||
required String iban,
|
||||
String? bic,
|
||||
required String scaProof,
|
||||
});
|
||||
|
||||
Future<String> validateTransactionBeneficiary({required int beneficiaryId});
|
||||
|
||||
Future<void> walletTransfer({
|
||||
required String walletId,
|
||||
required int beneficiaryId,
|
||||
required String beneficiaryValidationId,
|
||||
required double amount,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
import 'package:sf_shared/src/data/models/child_wallet_model.dart';
|
||||
@@ -12,7 +11,7 @@ import 'package:sf_shared/src/data/models/transaction_beneficiary_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_balance_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_card_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_limits_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_transaction_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_operation_model.dart';
|
||||
|
||||
import 'treezor_remote_data_source.dart';
|
||||
|
||||
@@ -120,26 +119,53 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WalletTransactionsResponseModel> getWalletTransactions({
|
||||
Future<PaymentProfileResponseModel> updatePaymentProfile({
|
||||
required String paymentProfileId,
|
||||
required Map<String, dynamic> body,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.put<Map<String, dynamic>>(
|
||||
'/payment-profiles',
|
||||
body: body,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from PUT /payment-profiles/$paymentProfileId',
|
||||
);
|
||||
}
|
||||
|
||||
return PaymentProfileResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw _mapDioError(
|
||||
error,
|
||||
defaultMessage: 'Error in PUT /payment-profiles/$paymentProfileId',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WalletOperationsResponseModel> getWalletOperations({
|
||||
required String walletId,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/wallets/$walletId/transactions',
|
||||
'/wallets/$walletId/operations',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception('Empty response from /wallets/$walletId/transactions');
|
||||
throw Exception('Empty response from /wallets/$walletId/operations');
|
||||
}
|
||||
|
||||
return WalletTransactionsResponseModel.fromJson(data);
|
||||
return WalletOperationsResponseModel.fromJson(data);
|
||||
} on DioException catch (error) {
|
||||
throw _mapDioError(
|
||||
error,
|
||||
defaultMessage: 'Error in /wallets/$walletId/transactions',
|
||||
defaultMessage: 'Error in /wallets/$walletId/operations',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -183,16 +209,19 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
|
||||
Future<TransactionBeneficiaryModel> createTransactionBeneficiary({
|
||||
required String name,
|
||||
required String iban,
|
||||
String? bic,
|
||||
required String scaProof,
|
||||
}) async {
|
||||
try {
|
||||
final body = <String, dynamic>{
|
||||
'name': name,
|
||||
'iban': iban,
|
||||
if (bic != null && bic.isNotEmpty) 'bic': bic,
|
||||
'scaProof': scaProof,
|
||||
};
|
||||
final response = await _repository.post<Map<String, dynamic>>(
|
||||
'/transaction-beneficiaries',
|
||||
body: <String, dynamic>{
|
||||
'name': name,
|
||||
'iban': iban,
|
||||
'scaProof': scaProof,
|
||||
},
|
||||
body: body,
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
@@ -236,7 +265,6 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
|
||||
|
||||
@override
|
||||
Future<void> walletTransfer({
|
||||
required String walletId,
|
||||
required int beneficiaryId,
|
||||
required String beneficiaryValidationId,
|
||||
required double amount,
|
||||
@@ -244,13 +272,11 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
|
||||
}) async {
|
||||
try {
|
||||
final body = <String, dynamic>{
|
||||
'walletId': walletId,
|
||||
'target': beneficiaryId,
|
||||
'beneficiaryValidationId': beneficiaryValidationId,
|
||||
'amount': amount.toStringAsFixed(2),
|
||||
'scaProof': scaProof,
|
||||
};
|
||||
debugPrint('[Payout] POST /wallets/transfer body: $body');
|
||||
await _repository.post<void>('/wallets/transfer', body: body);
|
||||
} on DioException catch (error) {
|
||||
throw _mapDioError(error, defaultMessage: 'Error in /wallets/transfer');
|
||||
@@ -512,7 +538,6 @@ class TreezorRemoteDatasourceImpl implements TreezorRemoteDatasource {
|
||||
}) async {
|
||||
try {
|
||||
final body = limits.toJson()..removeWhere((_, v) => v == null);
|
||||
debugPrint('setWalletLimits body: $body');
|
||||
await _repository.post<void>('/wallets/$walletId/limits', body: body);
|
||||
} on DioException catch (error) {
|
||||
throw _mapDioError(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:sf_shared/src/data/models/child_profile_deletability_model.dart';
|
||||
import 'package:sf_shared/src/data/models/child_profile_response_model.dart';
|
||||
import 'package:sf_shared/src/data/models/device_model.dart';
|
||||
import 'package:sf_shared/src/data/models/user_response_model.dart';
|
||||
@@ -5,6 +6,13 @@ import 'package:sf_shared/src/data/models/user_response_model.dart';
|
||||
abstract class UserRemoteDatasource {
|
||||
Future<UserModel> getUserInfo();
|
||||
Future<ChildProfileResponseModel> getChildProfiles();
|
||||
Future<ChildProfileDeletabilityModel> checkChildProfileDeletability({
|
||||
required String childProfileId,
|
||||
});
|
||||
Future<DeviceModel> getDeviceByIdentificator({required String identificator});
|
||||
Future<String> deleteDevice({required String deviceId});
|
||||
Future<void> updateChildProfile({
|
||||
required String childProfileId,
|
||||
required Map<String, dynamic> body,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
import 'package:sf_shared/src/data/models/child_profile_deletability_model.dart';
|
||||
import 'package:sf_shared/src/data/models/child_profile_response_model.dart';
|
||||
import 'package:sf_shared/src/data/models/device_model.dart';
|
||||
import 'package:sf_shared/src/data/models/user_response_model.dart';
|
||||
@@ -45,6 +45,31 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
|
||||
return ChildProfileResponseModel.fromJson(data);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ChildProfileDeletabilityModel> checkChildProfileDeletability({
|
||||
required String childProfileId,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/child-profiles/$childProfileId/deletability',
|
||||
);
|
||||
final data = response.data;
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /child-profiles/$childProfileId/deletability',
|
||||
);
|
||||
}
|
||||
final inner = data['item'] as Map<String, dynamic>? ?? data;
|
||||
return ChildProfileDeletabilityModel.fromJson(inner);
|
||||
} on DioException catch (error) {
|
||||
final apiMsg = error.response?.data;
|
||||
final msg = apiMsg is String
|
||||
? apiMsg
|
||||
: (error.message ?? 'Error checking child profile deletability');
|
||||
throw Exception(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DeviceModel> getDeviceByIdentificator({
|
||||
required String identificator,
|
||||
@@ -54,7 +79,6 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
|
||||
'/devices/identificator/$identificator',
|
||||
);
|
||||
final data = response.data;
|
||||
debugPrint('Response from /devices/identificator/$identificator: $data');
|
||||
if (data == null || data.isEmpty) {
|
||||
throw Exception(
|
||||
'Empty response from /devices/identificator/$identificator',
|
||||
@@ -73,6 +97,25 @@ class UserRemoteDatasourceImpl implements UserRemoteDatasource {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateChildProfile({
|
||||
required String childProfileId,
|
||||
required Map<String, dynamic> body,
|
||||
}) async {
|
||||
try {
|
||||
await _repository.put<Map<String, dynamic>>(
|
||||
'/child-profiles/$childProfileId',
|
||||
body: body,
|
||||
);
|
||||
} on DioException catch (error) {
|
||||
final apiMsg = error.response?.data;
|
||||
final msg = apiMsg is String
|
||||
? apiMsg
|
||||
: (error.message ?? 'Error updating child profile');
|
||||
throw Exception(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String> deleteDevice({required String deviceId}) async {
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:sf_shared/src/domain/entities/child_profile_deletability_entity.dart';
|
||||
|
||||
part 'child_profile_deletability_model.freezed.dart';
|
||||
part 'child_profile_deletability_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class ChildProfileDeletabilityModel
|
||||
with _$ChildProfileDeletabilityModel {
|
||||
const factory ChildProfileDeletabilityModel({
|
||||
required bool deletable,
|
||||
@Default('') String reason,
|
||||
}) = _ChildProfileDeletabilityModel;
|
||||
|
||||
factory ChildProfileDeletabilityModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChildProfileDeletabilityModelFromJson(json);
|
||||
}
|
||||
|
||||
extension ChildProfileDeletabilityModelMapper
|
||||
on ChildProfileDeletabilityModel {
|
||||
ChildProfileDeletabilityEntity toEntity() {
|
||||
return ChildProfileDeletabilityEntity(
|
||||
isDeletable: deletable,
|
||||
reason: reason,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'child_profile_deletability_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ChildProfileDeletabilityModel {
|
||||
|
||||
bool get deletable; String get reason;
|
||||
/// Create a copy of ChildProfileDeletabilityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChildProfileDeletabilityModelCopyWith<ChildProfileDeletabilityModel> get copyWith => _$ChildProfileDeletabilityModelCopyWithImpl<ChildProfileDeletabilityModel>(this as ChildProfileDeletabilityModel, _$identity);
|
||||
|
||||
/// Serializes this ChildProfileDeletabilityModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChildProfileDeletabilityModel&&(identical(other.deletable, deletable) || other.deletable == deletable)&&(identical(other.reason, reason) || other.reason == reason));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,deletable,reason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChildProfileDeletabilityModel(deletable: $deletable, reason: $reason)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ChildProfileDeletabilityModelCopyWith<$Res> {
|
||||
factory $ChildProfileDeletabilityModelCopyWith(ChildProfileDeletabilityModel value, $Res Function(ChildProfileDeletabilityModel) _then) = _$ChildProfileDeletabilityModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool deletable, String reason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ChildProfileDeletabilityModelCopyWithImpl<$Res>
|
||||
implements $ChildProfileDeletabilityModelCopyWith<$Res> {
|
||||
_$ChildProfileDeletabilityModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ChildProfileDeletabilityModel _self;
|
||||
final $Res Function(ChildProfileDeletabilityModel) _then;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? deletable = null,Object? reason = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
deletable: null == deletable ? _self.deletable : deletable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [ChildProfileDeletabilityModel].
|
||||
extension ChildProfileDeletabilityModelPatterns on ChildProfileDeletabilityModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ChildProfileDeletabilityModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ChildProfileDeletabilityModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ChildProfileDeletabilityModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool deletable, String reason)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel() when $default != null:
|
||||
return $default(_that.deletable,_that.reason);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool deletable, String reason) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel():
|
||||
return $default(_that.deletable,_that.reason);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool deletable, String reason)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityModel() when $default != null:
|
||||
return $default(_that.deletable,_that.reason);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ChildProfileDeletabilityModel implements ChildProfileDeletabilityModel {
|
||||
const _ChildProfileDeletabilityModel({required this.deletable, this.reason = ''});
|
||||
factory _ChildProfileDeletabilityModel.fromJson(Map<String, dynamic> json) => _$ChildProfileDeletabilityModelFromJson(json);
|
||||
|
||||
@override final bool deletable;
|
||||
@override@JsonKey() final String reason;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ChildProfileDeletabilityModelCopyWith<_ChildProfileDeletabilityModel> get copyWith => __$ChildProfileDeletabilityModelCopyWithImpl<_ChildProfileDeletabilityModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ChildProfileDeletabilityModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChildProfileDeletabilityModel&&(identical(other.deletable, deletable) || other.deletable == deletable)&&(identical(other.reason, reason) || other.reason == reason));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,deletable,reason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChildProfileDeletabilityModel(deletable: $deletable, reason: $reason)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ChildProfileDeletabilityModelCopyWith<$Res> implements $ChildProfileDeletabilityModelCopyWith<$Res> {
|
||||
factory _$ChildProfileDeletabilityModelCopyWith(_ChildProfileDeletabilityModel value, $Res Function(_ChildProfileDeletabilityModel) _then) = __$ChildProfileDeletabilityModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool deletable, String reason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ChildProfileDeletabilityModelCopyWithImpl<$Res>
|
||||
implements _$ChildProfileDeletabilityModelCopyWith<$Res> {
|
||||
__$ChildProfileDeletabilityModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ChildProfileDeletabilityModel _self;
|
||||
final $Res Function(_ChildProfileDeletabilityModel) _then;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? deletable = null,Object? reason = null,}) {
|
||||
return _then(_ChildProfileDeletabilityModel(
|
||||
deletable: null == deletable ? _self.deletable : deletable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'child_profile_deletability_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_ChildProfileDeletabilityModel _$ChildProfileDeletabilityModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ChildProfileDeletabilityModel(
|
||||
deletable: json['deletable'] as bool,
|
||||
reason: json['reason'] as String? ?? '',
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChildProfileDeletabilityModelToJson(
|
||||
_ChildProfileDeletabilityModel instance,
|
||||
) => <String, dynamic>{
|
||||
'deletable': instance.deletable,
|
||||
'reason': instance.reason,
|
||||
};
|
||||
@@ -0,0 +1,163 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:sf_shared/src/domain/entities/wallet_transaction_entity.dart';
|
||||
|
||||
part 'wallet_operation_model.freezed.dart';
|
||||
part 'wallet_operation_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class WalletOperationsResponseModel
|
||||
with _$WalletOperationsResponseModel {
|
||||
const factory WalletOperationsResponseModel({
|
||||
OperationCursorModel? cursor,
|
||||
@Default([]) List<WalletOperationModel> data,
|
||||
}) = _WalletOperationsResponseModel;
|
||||
|
||||
factory WalletOperationsResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WalletOperationsResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationCursorModel with _$OperationCursorModel {
|
||||
const factory OperationCursorModel({
|
||||
String? prev,
|
||||
String? current,
|
||||
String? next,
|
||||
}) = _OperationCursorModel;
|
||||
|
||||
factory OperationCursorModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationCursorModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WalletOperationModel with _$WalletOperationModel {
|
||||
const factory WalletOperationModel({
|
||||
@Default('') String operationType,
|
||||
@Default('') String initialFlow,
|
||||
OperationAmountModel? amount,
|
||||
@Default(0) int walletId,
|
||||
@Default('') String direction,
|
||||
@Default('') String objectId,
|
||||
@Default('') String label,
|
||||
@Default('') String status,
|
||||
OperationDateModel? date,
|
||||
OperationMetadataModel? metadata,
|
||||
}) = _WalletOperationModel;
|
||||
|
||||
factory WalletOperationModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WalletOperationModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationAmountModel with _$OperationAmountModel {
|
||||
const factory OperationAmountModel({
|
||||
@Default(0.0) double amount,
|
||||
@Default('EUR') String currency,
|
||||
}) = _OperationAmountModel;
|
||||
|
||||
factory OperationAmountModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationAmountModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationDateModel with _$OperationDateModel {
|
||||
const factory OperationDateModel({
|
||||
String? creation,
|
||||
String? settlement,
|
||||
}) = _OperationDateModel;
|
||||
|
||||
factory OperationDateModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationDateModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationMetadataModel with _$OperationMetadataModel {
|
||||
const factory OperationMetadataModel({
|
||||
String? maskedPan,
|
||||
String? cardId,
|
||||
OperationMccModel? mcc,
|
||||
OperationMidModel? mid,
|
||||
OperationAmountModel? localAmount,
|
||||
String? is3DS,
|
||||
String? optimizedMerchantName,
|
||||
String? merchantLogo,
|
||||
String? merchantCategory,
|
||||
String? merchantCategoryGroup,
|
||||
String? paymentCountry,
|
||||
String? authorizationNote,
|
||||
String? messageToUser,
|
||||
OperationAuthResponseModel? authorisationResponseCode,
|
||||
}) = _OperationMetadataModel;
|
||||
|
||||
factory OperationMetadataModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationMetadataModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationMccModel with _$OperationMccModel {
|
||||
const factory OperationMccModel({
|
||||
@Default(0) int code,
|
||||
}) = _OperationMccModel;
|
||||
|
||||
factory OperationMccModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationMccModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationMidModel with _$OperationMidModel {
|
||||
const factory OperationMidModel({
|
||||
String? value,
|
||||
String? name,
|
||||
String? city,
|
||||
String? country,
|
||||
String? address,
|
||||
}) = _OperationMidModel;
|
||||
|
||||
factory OperationMidModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationMidModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class OperationAuthResponseModel with _$OperationAuthResponseModel {
|
||||
const factory OperationAuthResponseModel({
|
||||
String? action,
|
||||
String? description,
|
||||
int? value,
|
||||
}) = _OperationAuthResponseModel;
|
||||
|
||||
factory OperationAuthResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$OperationAuthResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
extension WalletOperationsResponseModelMapper
|
||||
on WalletOperationsResponseModel {
|
||||
WalletTransactionsResponseEntity toEntity() {
|
||||
return WalletTransactionsResponseEntity(
|
||||
items: data.map((op) => op.toEntity()).toList(),
|
||||
nextCursor: cursor?.next,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletOperationModelMapper on WalletOperationModel {
|
||||
WalletTransactionEntity toEntity() {
|
||||
return WalletTransactionEntity(
|
||||
operationType: TransactionType.fromString(operationType),
|
||||
direction: direction,
|
||||
objectId: objectId,
|
||||
label: label,
|
||||
status: status,
|
||||
amount: (amount?.amount ?? 0.0) / 100,
|
||||
currency: amount?.currency ?? 'EUR',
|
||||
createdDate: date?.creation ?? '',
|
||||
settlementDate: date?.settlement,
|
||||
merchantName: metadata?.optimizedMerchantName ?? metadata?.mid?.name,
|
||||
merchantLogo: metadata?.merchantLogo,
|
||||
merchantCategory: metadata?.merchantCategory,
|
||||
merchantCategoryGroup: metadata?.merchantCategoryGroup,
|
||||
merchantCity: metadata?.mid?.city,
|
||||
merchantCountry: metadata?.mid?.country,
|
||||
maskedPan: metadata?.maskedPan,
|
||||
messageToUser: metadata?.messageToUser,
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,194 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'wallet_operation_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_WalletOperationsResponseModel _$WalletOperationsResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _WalletOperationsResponseModel(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: OperationCursorModel.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
data:
|
||||
(json['data'] as List<dynamic>?)
|
||||
?.map((e) => WalletOperationModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletOperationsResponseModelToJson(
|
||||
_WalletOperationsResponseModel instance,
|
||||
) => <String, dynamic>{'cursor': instance.cursor, 'data': instance.data};
|
||||
|
||||
_OperationCursorModel _$OperationCursorModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _OperationCursorModel(
|
||||
prev: json['prev'] as String?,
|
||||
current: json['current'] as String?,
|
||||
next: json['next'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationCursorModelToJson(
|
||||
_OperationCursorModel instance,
|
||||
) => <String, dynamic>{
|
||||
'prev': instance.prev,
|
||||
'current': instance.current,
|
||||
'next': instance.next,
|
||||
};
|
||||
|
||||
_WalletOperationModel _$WalletOperationModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _WalletOperationModel(
|
||||
operationType: json['operationType'] as String? ?? '',
|
||||
initialFlow: json['initialFlow'] as String? ?? '',
|
||||
amount: json['amount'] == null
|
||||
? null
|
||||
: OperationAmountModel.fromJson(json['amount'] as Map<String, dynamic>),
|
||||
walletId: (json['walletId'] as num?)?.toInt() ?? 0,
|
||||
direction: json['direction'] as String? ?? '',
|
||||
objectId: json['objectId'] as String? ?? '',
|
||||
label: json['label'] as String? ?? '',
|
||||
status: json['status'] as String? ?? '',
|
||||
date: json['date'] == null
|
||||
? null
|
||||
: OperationDateModel.fromJson(json['date'] as Map<String, dynamic>),
|
||||
metadata: json['metadata'] == null
|
||||
? null
|
||||
: OperationMetadataModel.fromJson(
|
||||
json['metadata'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletOperationModelToJson(
|
||||
_WalletOperationModel instance,
|
||||
) => <String, dynamic>{
|
||||
'operationType': instance.operationType,
|
||||
'initialFlow': instance.initialFlow,
|
||||
'amount': instance.amount,
|
||||
'walletId': instance.walletId,
|
||||
'direction': instance.direction,
|
||||
'objectId': instance.objectId,
|
||||
'label': instance.label,
|
||||
'status': instance.status,
|
||||
'date': instance.date,
|
||||
'metadata': instance.metadata,
|
||||
};
|
||||
|
||||
_OperationAmountModel _$OperationAmountModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _OperationAmountModel(
|
||||
amount: (json['amount'] as num?)?.toDouble() ?? 0.0,
|
||||
currency: json['currency'] as String? ?? 'EUR',
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationAmountModelToJson(
|
||||
_OperationAmountModel instance,
|
||||
) => <String, dynamic>{
|
||||
'amount': instance.amount,
|
||||
'currency': instance.currency,
|
||||
};
|
||||
|
||||
_OperationDateModel _$OperationDateModelFromJson(Map<String, dynamic> json) =>
|
||||
_OperationDateModel(
|
||||
creation: json['creation'] as String?,
|
||||
settlement: json['settlement'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationDateModelToJson(_OperationDateModel instance) =>
|
||||
<String, dynamic>{
|
||||
'creation': instance.creation,
|
||||
'settlement': instance.settlement,
|
||||
};
|
||||
|
||||
_OperationMetadataModel _$OperationMetadataModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _OperationMetadataModel(
|
||||
maskedPan: json['maskedPan'] as String?,
|
||||
cardId: json['cardId'] as String?,
|
||||
mcc: json['mcc'] == null
|
||||
? null
|
||||
: OperationMccModel.fromJson(json['mcc'] as Map<String, dynamic>),
|
||||
mid: json['mid'] == null
|
||||
? null
|
||||
: OperationMidModel.fromJson(json['mid'] as Map<String, dynamic>),
|
||||
localAmount: json['localAmount'] == null
|
||||
? null
|
||||
: OperationAmountModel.fromJson(
|
||||
json['localAmount'] as Map<String, dynamic>,
|
||||
),
|
||||
is3DS: json['is3DS'] as String?,
|
||||
optimizedMerchantName: json['optimizedMerchantName'] as String?,
|
||||
merchantLogo: json['merchantLogo'] as String?,
|
||||
merchantCategory: json['merchantCategory'] as String?,
|
||||
merchantCategoryGroup: json['merchantCategoryGroup'] as String?,
|
||||
paymentCountry: json['paymentCountry'] as String?,
|
||||
authorizationNote: json['authorizationNote'] as String?,
|
||||
messageToUser: json['messageToUser'] as String?,
|
||||
authorisationResponseCode: json['authorisationResponseCode'] == null
|
||||
? null
|
||||
: OperationAuthResponseModel.fromJson(
|
||||
json['authorisationResponseCode'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationMetadataModelToJson(
|
||||
_OperationMetadataModel instance,
|
||||
) => <String, dynamic>{
|
||||
'maskedPan': instance.maskedPan,
|
||||
'cardId': instance.cardId,
|
||||
'mcc': instance.mcc,
|
||||
'mid': instance.mid,
|
||||
'localAmount': instance.localAmount,
|
||||
'is3DS': instance.is3DS,
|
||||
'optimizedMerchantName': instance.optimizedMerchantName,
|
||||
'merchantLogo': instance.merchantLogo,
|
||||
'merchantCategory': instance.merchantCategory,
|
||||
'merchantCategoryGroup': instance.merchantCategoryGroup,
|
||||
'paymentCountry': instance.paymentCountry,
|
||||
'authorizationNote': instance.authorizationNote,
|
||||
'messageToUser': instance.messageToUser,
|
||||
'authorisationResponseCode': instance.authorisationResponseCode,
|
||||
};
|
||||
|
||||
_OperationMccModel _$OperationMccModelFromJson(Map<String, dynamic> json) =>
|
||||
_OperationMccModel(code: (json['code'] as num?)?.toInt() ?? 0);
|
||||
|
||||
Map<String, dynamic> _$OperationMccModelToJson(_OperationMccModel instance) =>
|
||||
<String, dynamic>{'code': instance.code};
|
||||
|
||||
_OperationMidModel _$OperationMidModelFromJson(Map<String, dynamic> json) =>
|
||||
_OperationMidModel(
|
||||
value: json['value'] as String?,
|
||||
name: json['name'] as String?,
|
||||
city: json['city'] as String?,
|
||||
country: json['country'] as String?,
|
||||
address: json['address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationMidModelToJson(_OperationMidModel instance) =>
|
||||
<String, dynamic>{
|
||||
'value': instance.value,
|
||||
'name': instance.name,
|
||||
'city': instance.city,
|
||||
'country': instance.country,
|
||||
'address': instance.address,
|
||||
};
|
||||
|
||||
_OperationAuthResponseModel _$OperationAuthResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _OperationAuthResponseModel(
|
||||
action: json['action'] as String?,
|
||||
description: json['description'] as String?,
|
||||
value: (json['value'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OperationAuthResponseModelToJson(
|
||||
_OperationAuthResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'action': instance.action,
|
||||
'description': instance.description,
|
||||
'value': instance.value,
|
||||
};
|
||||
@@ -1,78 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:sf_shared/src/domain/entities/wallet_transaction_entity.dart';
|
||||
|
||||
part 'wallet_transaction_model.freezed.dart';
|
||||
part 'wallet_transaction_model.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class WalletTransactionsResponseModel
|
||||
with _$WalletTransactionsResponseModel {
|
||||
const factory WalletTransactionsResponseModel({
|
||||
required int total,
|
||||
required int page,
|
||||
required int pages,
|
||||
required List<WalletTransactionModel> items,
|
||||
}) = _WalletTransactionsResponseModel;
|
||||
|
||||
factory WalletTransactionsResponseModel.fromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$WalletTransactionsResponseModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WalletTransactionModel with _$WalletTransactionModel {
|
||||
const factory WalletTransactionModel({
|
||||
required int transactionId,
|
||||
required int walletDebitId,
|
||||
required int walletCreditId,
|
||||
required String transactionType,
|
||||
required String foreignId,
|
||||
required String name,
|
||||
required String description,
|
||||
required String valueDate,
|
||||
required String executionDate,
|
||||
required String amount,
|
||||
required String walletDebitBalance,
|
||||
required String walletCreditBalance,
|
||||
required String currency,
|
||||
required String createdDate,
|
||||
required String totalRows,
|
||||
}) = _WalletTransactionModel;
|
||||
|
||||
factory WalletTransactionModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WalletTransactionModelFromJson(json);
|
||||
}
|
||||
|
||||
extension WalletTransactionsResponseModelMapper
|
||||
on WalletTransactionsResponseModel {
|
||||
WalletTransactionsResponseEntity toEntity() {
|
||||
return WalletTransactionsResponseEntity(
|
||||
total: total,
|
||||
page: page,
|
||||
pages: pages,
|
||||
items: items.map((item) => item.toEntity()).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletTransactionModelMapper on WalletTransactionModel {
|
||||
WalletTransactionEntity toEntity() {
|
||||
return WalletTransactionEntity(
|
||||
transactionId: transactionId,
|
||||
walletDebitId: walletDebitId,
|
||||
walletCreditId: walletCreditId,
|
||||
transactionType: TransactionType.fromString(transactionType),
|
||||
foreignId: foreignId,
|
||||
name: name,
|
||||
description: description,
|
||||
valueDate: valueDate,
|
||||
executionDate: executionDate,
|
||||
amount: amount,
|
||||
walletDebitBalance: walletDebitBalance,
|
||||
walletCreditBalance: walletCreditBalance,
|
||||
currency: currency,
|
||||
createdDate: createdDate,
|
||||
totalRows: totalRows,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,597 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'wallet_transaction_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$WalletTransactionsResponseModel {
|
||||
|
||||
int get total; int get page; int get pages; List<WalletTransactionModel> get items;
|
||||
/// Create a copy of WalletTransactionsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$WalletTransactionsResponseModelCopyWith<WalletTransactionsResponseModel> get copyWith => _$WalletTransactionsResponseModelCopyWithImpl<WalletTransactionsResponseModel>(this as WalletTransactionsResponseModel, _$identity);
|
||||
|
||||
/// Serializes this WalletTransactionsResponseModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionsResponseModel&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)&&const DeepCollectionEquality().equals(other.items, items));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,page,pages,const DeepCollectionEquality().hash(items));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionsResponseModel(total: $total, page: $page, pages: $pages, items: $items)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $WalletTransactionsResponseModelCopyWith<$Res> {
|
||||
factory $WalletTransactionsResponseModelCopyWith(WalletTransactionsResponseModel value, $Res Function(WalletTransactionsResponseModel) _then) = _$WalletTransactionsResponseModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, int page, int pages, List<WalletTransactionModel> items
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$WalletTransactionsResponseModelCopyWithImpl<$Res>
|
||||
implements $WalletTransactionsResponseModelCopyWith<$Res> {
|
||||
_$WalletTransactionsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final WalletTransactionsResponseModel _self;
|
||||
final $Res Function(WalletTransactionsResponseModel) _then;
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? page = null,Object? pages = null,Object? items = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionModel>,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [WalletTransactionsResponseModel].
|
||||
extension WalletTransactionsResponseModelPatterns on WalletTransactionsResponseModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _WalletTransactionsResponseModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _WalletTransactionsResponseModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _WalletTransactionsResponseModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, int page, int pages, List<WalletTransactionModel> items)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, int page, int pages, List<WalletTransactionModel> items) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel():
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, int page, int pages, List<WalletTransactionModel> items)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseModel() when $default != null:
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _WalletTransactionsResponseModel implements WalletTransactionsResponseModel {
|
||||
const _WalletTransactionsResponseModel({required this.total, required this.page, required this.pages, required final List<WalletTransactionModel> items}): _items = items;
|
||||
factory _WalletTransactionsResponseModel.fromJson(Map<String, dynamic> json) => _$WalletTransactionsResponseModelFromJson(json);
|
||||
|
||||
@override final int total;
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
final List<WalletTransactionModel> _items;
|
||||
@override List<WalletTransactionModel> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$WalletTransactionsResponseModelCopyWith<_WalletTransactionsResponseModel> get copyWith => __$WalletTransactionsResponseModelCopyWithImpl<_WalletTransactionsResponseModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$WalletTransactionsResponseModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionsResponseModel&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)&&const DeepCollectionEquality().equals(other._items, _items));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,page,pages,const DeepCollectionEquality().hash(_items));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionsResponseModel(total: $total, page: $page, pages: $pages, items: $items)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$WalletTransactionsResponseModelCopyWith<$Res> implements $WalletTransactionsResponseModelCopyWith<$Res> {
|
||||
factory _$WalletTransactionsResponseModelCopyWith(_WalletTransactionsResponseModel value, $Res Function(_WalletTransactionsResponseModel) _then) = __$WalletTransactionsResponseModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, int page, int pages, List<WalletTransactionModel> items
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$WalletTransactionsResponseModelCopyWithImpl<$Res>
|
||||
implements _$WalletTransactionsResponseModelCopyWith<$Res> {
|
||||
__$WalletTransactionsResponseModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _WalletTransactionsResponseModel _self;
|
||||
final $Res Function(_WalletTransactionsResponseModel) _then;
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? page = null,Object? pages = null,Object? items = null,}) {
|
||||
return _then(_WalletTransactionsResponseModel(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionModel>,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$WalletTransactionModel {
|
||||
|
||||
int get transactionId; int get walletDebitId; int get walletCreditId; String get transactionType; String get foreignId; String get name; String get description; String get valueDate; String get executionDate; String get amount; String get walletDebitBalance; String get walletCreditBalance; String get currency; String get createdDate; String get totalRows;
|
||||
/// Create a copy of WalletTransactionModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$WalletTransactionModelCopyWith<WalletTransactionModel> get copyWith => _$WalletTransactionModelCopyWithImpl<WalletTransactionModel>(this as WalletTransactionModel, _$identity);
|
||||
|
||||
/// Serializes this WalletTransactionModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionModel&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)&&(identical(other.walletDebitId, walletDebitId) || other.walletDebitId == walletDebitId)&&(identical(other.walletCreditId, walletCreditId) || other.walletCreditId == walletCreditId)&&(identical(other.transactionType, transactionType) || other.transactionType == transactionType)&&(identical(other.foreignId, foreignId) || other.foreignId == foreignId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.valueDate, valueDate) || other.valueDate == valueDate)&&(identical(other.executionDate, executionDate) || other.executionDate == executionDate)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.walletDebitBalance, walletDebitBalance) || other.walletDebitBalance == walletDebitBalance)&&(identical(other.walletCreditBalance, walletCreditBalance) || other.walletCreditBalance == walletCreditBalance)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.totalRows, totalRows) || other.totalRows == totalRows));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,transactionId,walletDebitId,walletCreditId,transactionType,foreignId,name,description,valueDate,executionDate,amount,walletDebitBalance,walletCreditBalance,currency,createdDate,totalRows);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionModel(transactionId: $transactionId, walletDebitId: $walletDebitId, walletCreditId: $walletCreditId, transactionType: $transactionType, foreignId: $foreignId, name: $name, description: $description, valueDate: $valueDate, executionDate: $executionDate, amount: $amount, walletDebitBalance: $walletDebitBalance, walletCreditBalance: $walletCreditBalance, currency: $currency, createdDate: $createdDate, totalRows: $totalRows)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $WalletTransactionModelCopyWith<$Res> {
|
||||
factory $WalletTransactionModelCopyWith(WalletTransactionModel value, $Res Function(WalletTransactionModel) _then) = _$WalletTransactionModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int transactionId, int walletDebitId, int walletCreditId, String transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$WalletTransactionModelCopyWithImpl<$Res>
|
||||
implements $WalletTransactionModelCopyWith<$Res> {
|
||||
_$WalletTransactionModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final WalletTransactionModel _self;
|
||||
final $Res Function(WalletTransactionModel) _then;
|
||||
|
||||
/// Create a copy of WalletTransactionModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? transactionId = null,Object? walletDebitId = null,Object? walletCreditId = null,Object? transactionType = null,Object? foreignId = null,Object? name = null,Object? description = null,Object? valueDate = null,Object? executionDate = null,Object? amount = null,Object? walletDebitBalance = null,Object? walletCreditBalance = null,Object? currency = null,Object? createdDate = null,Object? totalRows = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletDebitId: null == walletDebitId ? _self.walletDebitId : walletDebitId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletCreditId: null == walletCreditId ? _self.walletCreditId : walletCreditId // ignore: cast_nullable_to_non_nullable
|
||||
as int,transactionType: null == transactionType ? _self.transactionType : transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as String,foreignId: null == foreignId ? _self.foreignId : foreignId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,valueDate: null == valueDate ? _self.valueDate : valueDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,executionDate: null == executionDate ? _self.executionDate : executionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletDebitBalance: null == walletDebitBalance ? _self.walletDebitBalance : walletDebitBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletCreditBalance: null == walletCreditBalance ? _self.walletCreditBalance : walletCreditBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdDate: null == createdDate ? _self.createdDate : createdDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,totalRows: null == totalRows ? _self.totalRows : totalRows // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [WalletTransactionModel].
|
||||
extension WalletTransactionModelPatterns on WalletTransactionModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _WalletTransactionModel value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _WalletTransactionModel value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _WalletTransactionModel value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int transactionId, int walletDebitId, int walletCreditId, String transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel() when $default != null:
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int transactionId, int walletDebitId, int walletCreditId, String transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel():
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int transactionId, int walletDebitId, int walletCreditId, String transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionModel() when $default != null:
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _WalletTransactionModel implements WalletTransactionModel {
|
||||
const _WalletTransactionModel({required this.transactionId, required this.walletDebitId, required this.walletCreditId, required this.transactionType, required this.foreignId, required this.name, required this.description, required this.valueDate, required this.executionDate, required this.amount, required this.walletDebitBalance, required this.walletCreditBalance, required this.currency, required this.createdDate, required this.totalRows});
|
||||
factory _WalletTransactionModel.fromJson(Map<String, dynamic> json) => _$WalletTransactionModelFromJson(json);
|
||||
|
||||
@override final int transactionId;
|
||||
@override final int walletDebitId;
|
||||
@override final int walletCreditId;
|
||||
@override final String transactionType;
|
||||
@override final String foreignId;
|
||||
@override final String name;
|
||||
@override final String description;
|
||||
@override final String valueDate;
|
||||
@override final String executionDate;
|
||||
@override final String amount;
|
||||
@override final String walletDebitBalance;
|
||||
@override final String walletCreditBalance;
|
||||
@override final String currency;
|
||||
@override final String createdDate;
|
||||
@override final String totalRows;
|
||||
|
||||
/// Create a copy of WalletTransactionModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$WalletTransactionModelCopyWith<_WalletTransactionModel> get copyWith => __$WalletTransactionModelCopyWithImpl<_WalletTransactionModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$WalletTransactionModelToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionModel&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)&&(identical(other.walletDebitId, walletDebitId) || other.walletDebitId == walletDebitId)&&(identical(other.walletCreditId, walletCreditId) || other.walletCreditId == walletCreditId)&&(identical(other.transactionType, transactionType) || other.transactionType == transactionType)&&(identical(other.foreignId, foreignId) || other.foreignId == foreignId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.valueDate, valueDate) || other.valueDate == valueDate)&&(identical(other.executionDate, executionDate) || other.executionDate == executionDate)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.walletDebitBalance, walletDebitBalance) || other.walletDebitBalance == walletDebitBalance)&&(identical(other.walletCreditBalance, walletCreditBalance) || other.walletCreditBalance == walletCreditBalance)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.totalRows, totalRows) || other.totalRows == totalRows));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,transactionId,walletDebitId,walletCreditId,transactionType,foreignId,name,description,valueDate,executionDate,amount,walletDebitBalance,walletCreditBalance,currency,createdDate,totalRows);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionModel(transactionId: $transactionId, walletDebitId: $walletDebitId, walletCreditId: $walletCreditId, transactionType: $transactionType, foreignId: $foreignId, name: $name, description: $description, valueDate: $valueDate, executionDate: $executionDate, amount: $amount, walletDebitBalance: $walletDebitBalance, walletCreditBalance: $walletCreditBalance, currency: $currency, createdDate: $createdDate, totalRows: $totalRows)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$WalletTransactionModelCopyWith<$Res> implements $WalletTransactionModelCopyWith<$Res> {
|
||||
factory _$WalletTransactionModelCopyWith(_WalletTransactionModel value, $Res Function(_WalletTransactionModel) _then) = __$WalletTransactionModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int transactionId, int walletDebitId, int walletCreditId, String transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$WalletTransactionModelCopyWithImpl<$Res>
|
||||
implements _$WalletTransactionModelCopyWith<$Res> {
|
||||
__$WalletTransactionModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _WalletTransactionModel _self;
|
||||
final $Res Function(_WalletTransactionModel) _then;
|
||||
|
||||
/// Create a copy of WalletTransactionModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? transactionId = null,Object? walletDebitId = null,Object? walletCreditId = null,Object? transactionType = null,Object? foreignId = null,Object? name = null,Object? description = null,Object? valueDate = null,Object? executionDate = null,Object? amount = null,Object? walletDebitBalance = null,Object? walletCreditBalance = null,Object? currency = null,Object? createdDate = null,Object? totalRows = null,}) {
|
||||
return _then(_WalletTransactionModel(
|
||||
transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletDebitId: null == walletDebitId ? _self.walletDebitId : walletDebitId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletCreditId: null == walletCreditId ? _self.walletCreditId : walletCreditId // ignore: cast_nullable_to_non_nullable
|
||||
as int,transactionType: null == transactionType ? _self.transactionType : transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as String,foreignId: null == foreignId ? _self.foreignId : foreignId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,valueDate: null == valueDate ? _self.valueDate : valueDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,executionDate: null == executionDate ? _self.executionDate : executionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletDebitBalance: null == walletDebitBalance ? _self.walletDebitBalance : walletDebitBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletCreditBalance: null == walletCreditBalance ? _self.walletCreditBalance : walletCreditBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdDate: null == createdDate ? _self.createdDate : createdDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,totalRows: null == totalRows ? _self.totalRows : totalRows // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -1,67 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'wallet_transaction_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_WalletTransactionsResponseModel _$WalletTransactionsResponseModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _WalletTransactionsResponseModel(
|
||||
total: (json['total'] as num).toInt(),
|
||||
page: (json['page'] as num).toInt(),
|
||||
pages: (json['pages'] as num).toInt(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => WalletTransactionModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletTransactionsResponseModelToJson(
|
||||
_WalletTransactionsResponseModel instance,
|
||||
) => <String, dynamic>{
|
||||
'total': instance.total,
|
||||
'page': instance.page,
|
||||
'pages': instance.pages,
|
||||
'items': instance.items,
|
||||
};
|
||||
|
||||
_WalletTransactionModel _$WalletTransactionModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _WalletTransactionModel(
|
||||
transactionId: (json['transactionId'] as num).toInt(),
|
||||
walletDebitId: (json['walletDebitId'] as num).toInt(),
|
||||
walletCreditId: (json['walletCreditId'] as num).toInt(),
|
||||
transactionType: json['transactionType'] as String,
|
||||
foreignId: json['foreignId'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
valueDate: json['valueDate'] as String,
|
||||
executionDate: json['executionDate'] as String,
|
||||
amount: json['amount'] as String,
|
||||
walletDebitBalance: json['walletDebitBalance'] as String,
|
||||
walletCreditBalance: json['walletCreditBalance'] as String,
|
||||
currency: json['currency'] as String,
|
||||
createdDate: json['createdDate'] as String,
|
||||
totalRows: json['totalRows'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletTransactionModelToJson(
|
||||
_WalletTransactionModel instance,
|
||||
) => <String, dynamic>{
|
||||
'transactionId': instance.transactionId,
|
||||
'walletDebitId': instance.walletDebitId,
|
||||
'walletCreditId': instance.walletCreditId,
|
||||
'transactionType': instance.transactionType,
|
||||
'foreignId': instance.foreignId,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'valueDate': instance.valueDate,
|
||||
'executionDate': instance.executionDate,
|
||||
'amount': instance.amount,
|
||||
'walletDebitBalance': instance.walletDebitBalance,
|
||||
'walletCreditBalance': instance.walletCreditBalance,
|
||||
'currency': instance.currency,
|
||||
'createdDate': instance.createdDate,
|
||||
'totalRows': instance.totalRows,
|
||||
};
|
||||
@@ -6,7 +6,7 @@ import 'package:sf_shared/src/data/models/sca_wallet_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_balance_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_card_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_limits_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_transaction_model.dart';
|
||||
import 'package:sf_shared/src/data/models/wallet_operation_model.dart';
|
||||
import 'package:sf_shared/src/domain/entities/mcc_group_entity.dart';
|
||||
import 'package:sf_shared/src/domain/entities/wallet_card_entity.dart';
|
||||
import 'package:sf_shared/src/domain/entities/wallet_limits_entity.dart';
|
||||
@@ -94,11 +94,59 @@ class TreezorRepositoryImpl implements TreezorRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WalletTransactionsResponseEntity> getWalletTransactions({
|
||||
Future<PaymentProfileEntity> updatePaymentProfile({
|
||||
required String paymentProfileId,
|
||||
required String scaProof,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? phone,
|
||||
List<PaymentProfileAddressEntity>? addresses,
|
||||
List<PaymentProfileAddressEntity>? taxResidences,
|
||||
String? nationality,
|
||||
}) async {
|
||||
final body = <String, dynamic>{
|
||||
'scaProof': scaProof,
|
||||
if (firstName != null) 'firstName': firstName,
|
||||
if (lastName != null) 'lastName': lastName,
|
||||
if (phone != null) 'phone': phone,
|
||||
if (addresses != null)
|
||||
'addresses': addresses
|
||||
.map((a) => {
|
||||
'street': a.street,
|
||||
'city': a.city,
|
||||
'province': a.province,
|
||||
'state': a.state,
|
||||
'country': a.country,
|
||||
'postCode': a.postCode,
|
||||
})
|
||||
.toList(),
|
||||
if (taxResidences != null)
|
||||
'taxResidences': taxResidences
|
||||
.map((a) => {
|
||||
'street': a.street,
|
||||
'city': a.city,
|
||||
'province': a.province,
|
||||
'state': a.state,
|
||||
'country': a.country,
|
||||
'postCode': a.postCode,
|
||||
})
|
||||
.toList(),
|
||||
if (nationality != null) 'nationality': nationality,
|
||||
};
|
||||
|
||||
final model = await _remote.updatePaymentProfile(
|
||||
paymentProfileId: paymentProfileId,
|
||||
body: body,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WalletTransactionsResponseEntity> getWalletOperations({
|
||||
required String walletId,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
final model = await _remote.getWalletTransactions(
|
||||
final model = await _remote.getWalletOperations(
|
||||
walletId: walletId,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
@@ -124,11 +172,13 @@ class TreezorRepositoryImpl implements TreezorRepository {
|
||||
Future<TransactionBeneficiaryEntity> createTransactionBeneficiary({
|
||||
required String name,
|
||||
required String iban,
|
||||
String? bic,
|
||||
required String scaProof,
|
||||
}) async {
|
||||
final model = await _remote.createTransactionBeneficiary(
|
||||
name: name,
|
||||
iban: iban,
|
||||
bic: bic,
|
||||
scaProof: scaProof,
|
||||
);
|
||||
return model.toEntity();
|
||||
@@ -145,14 +195,12 @@ class TreezorRepositoryImpl implements TreezorRepository {
|
||||
|
||||
@override
|
||||
Future<void> walletTransfer({
|
||||
required String walletId,
|
||||
required int beneficiaryId,
|
||||
required String beneficiaryValidationId,
|
||||
required double amount,
|
||||
required String scaProof,
|
||||
}) async {
|
||||
await _remote.walletTransfer(
|
||||
walletId: walletId,
|
||||
beneficiaryId: beneficiaryId,
|
||||
beneficiaryValidationId: beneficiaryValidationId,
|
||||
amount: amount,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:sf_shared/src/data/models/child_profile_deletability_model.dart';
|
||||
import 'package:sf_shared/src/data/models/child_profile_response_model.dart';
|
||||
import 'package:sf_shared/src/data/models/device_model.dart';
|
||||
import 'package:sf_shared/src/data/models/user_response_model.dart';
|
||||
import 'package:sf_shared/src/domain/entities/child_profile_deletability_entity.dart';
|
||||
import 'package:sf_shared/src/domain/entities/child_profile_entity.dart';
|
||||
import 'package:sf_shared/src/domain/entities/device_entity.dart';
|
||||
import 'package:sf_shared/src/domain/entities/user_entity.dart';
|
||||
@@ -25,6 +27,16 @@ class UserRepositoryImpl implements UserRepository {
|
||||
return model.items.map((item) => item.toEntity()).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ChildProfileDeletabilityEntity> checkChildProfileDeletability({
|
||||
required String childProfileId,
|
||||
}) async {
|
||||
final model = await _remote.checkChildProfileDeletability(
|
||||
childProfileId: childProfileId,
|
||||
);
|
||||
return model.toEntity();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DeviceEntity> getDeviceByIdentificator({
|
||||
required String identificator,
|
||||
@@ -39,4 +51,26 @@ class UserRepositoryImpl implements UserRepository {
|
||||
Future<String> deleteDevice({required String deviceId}) {
|
||||
return _remote.deleteDevice(deviceId: deviceId);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateChildProfile({
|
||||
required String childProfileId,
|
||||
required String scaProof,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? bornAt,
|
||||
String? address,
|
||||
}) {
|
||||
final body = <String, dynamic>{
|
||||
'scaProof': scaProof,
|
||||
if (firstName != null) 'firstName': firstName,
|
||||
if (lastName != null) 'lastName': lastName,
|
||||
if (bornAt != null) 'bornAt': bornAt,
|
||||
if (address != null) 'address': address,
|
||||
};
|
||||
return _remote.updateChildProfile(
|
||||
childProfileId: childProfileId,
|
||||
body: body,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'child_profile_deletability_entity.freezed.dart';
|
||||
|
||||
@freezed
|
||||
abstract class ChildProfileDeletabilityEntity
|
||||
with _$ChildProfileDeletabilityEntity {
|
||||
const factory ChildProfileDeletabilityEntity({
|
||||
required bool isDeletable,
|
||||
@Default('') String reason,
|
||||
}) = _ChildProfileDeletabilityEntity;
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'child_profile_deletability_entity.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$ChildProfileDeletabilityEntity {
|
||||
|
||||
bool get isDeletable; String get reason;
|
||||
/// Create a copy of ChildProfileDeletabilityEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ChildProfileDeletabilityEntityCopyWith<ChildProfileDeletabilityEntity> get copyWith => _$ChildProfileDeletabilityEntityCopyWithImpl<ChildProfileDeletabilityEntity>(this as ChildProfileDeletabilityEntity, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChildProfileDeletabilityEntity&&(identical(other.isDeletable, isDeletable) || other.isDeletable == isDeletable)&&(identical(other.reason, reason) || other.reason == reason));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isDeletable,reason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChildProfileDeletabilityEntity(isDeletable: $isDeletable, reason: $reason)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ChildProfileDeletabilityEntityCopyWith<$Res> {
|
||||
factory $ChildProfileDeletabilityEntityCopyWith(ChildProfileDeletabilityEntity value, $Res Function(ChildProfileDeletabilityEntity) _then) = _$ChildProfileDeletabilityEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool isDeletable, String reason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ChildProfileDeletabilityEntityCopyWithImpl<$Res>
|
||||
implements $ChildProfileDeletabilityEntityCopyWith<$Res> {
|
||||
_$ChildProfileDeletabilityEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ChildProfileDeletabilityEntity _self;
|
||||
final $Res Function(ChildProfileDeletabilityEntity) _then;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isDeletable = null,Object? reason = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
isDeletable: null == isDeletable ? _self.isDeletable : isDeletable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [ChildProfileDeletabilityEntity].
|
||||
extension ChildProfileDeletabilityEntityPatterns on ChildProfileDeletabilityEntity {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ChildProfileDeletabilityEntity value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ChildProfileDeletabilityEntity value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity():
|
||||
return $default(_that);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ChildProfileDeletabilityEntity value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isDeletable, String reason)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity() when $default != null:
|
||||
return $default(_that.isDeletable,_that.reason);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isDeletable, String reason) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity():
|
||||
return $default(_that.isDeletable,_that.reason);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isDeletable, String reason)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ChildProfileDeletabilityEntity() when $default != null:
|
||||
return $default(_that.isDeletable,_that.reason);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _ChildProfileDeletabilityEntity implements ChildProfileDeletabilityEntity {
|
||||
const _ChildProfileDeletabilityEntity({required this.isDeletable, this.reason = ''});
|
||||
|
||||
|
||||
@override final bool isDeletable;
|
||||
@override@JsonKey() final String reason;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ChildProfileDeletabilityEntityCopyWith<_ChildProfileDeletabilityEntity> get copyWith => __$ChildProfileDeletabilityEntityCopyWithImpl<_ChildProfileDeletabilityEntity>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChildProfileDeletabilityEntity&&(identical(other.isDeletable, isDeletable) || other.isDeletable == isDeletable)&&(identical(other.reason, reason) || other.reason == reason));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isDeletable,reason);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChildProfileDeletabilityEntity(isDeletable: $isDeletable, reason: $reason)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ChildProfileDeletabilityEntityCopyWith<$Res> implements $ChildProfileDeletabilityEntityCopyWith<$Res> {
|
||||
factory _$ChildProfileDeletabilityEntityCopyWith(_ChildProfileDeletabilityEntity value, $Res Function(_ChildProfileDeletabilityEntity) _then) = __$ChildProfileDeletabilityEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool isDeletable, String reason
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ChildProfileDeletabilityEntityCopyWithImpl<$Res>
|
||||
implements _$ChildProfileDeletabilityEntityCopyWith<$Res> {
|
||||
__$ChildProfileDeletabilityEntityCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ChildProfileDeletabilityEntity _self;
|
||||
final $Res Function(_ChildProfileDeletabilityEntity) _then;
|
||||
|
||||
/// Create a copy of ChildProfileDeletabilityEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isDeletable = null,Object? reason = null,}) {
|
||||
return _then(_ChildProfileDeletabilityEntity(
|
||||
isDeletable: null == isDeletable ? _self.isDeletable : isDeletable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -33,10 +33,12 @@ enum DateFilter {
|
||||
class TransactionsQuery {
|
||||
final String walletId;
|
||||
final DateFilter? dateFilter;
|
||||
final String? cursor;
|
||||
|
||||
const TransactionsQuery({
|
||||
required this.walletId,
|
||||
this.dateFilter,
|
||||
this.cursor,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -44,8 +46,9 @@ class TransactionsQuery {
|
||||
identical(this, other) ||
|
||||
other is TransactionsQuery &&
|
||||
walletId == other.walletId &&
|
||||
dateFilter == other.dateFilter;
|
||||
dateFilter == other.dateFilter &&
|
||||
cursor == other.cursor;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(walletId, dateFilter);
|
||||
int get hashCode => Object.hash(walletId, dateFilter, cursor);
|
||||
}
|
||||
|
||||
@@ -3,27 +3,15 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
part 'wallet_transaction_entity.freezed.dart';
|
||||
|
||||
enum TransactionType {
|
||||
payin,
|
||||
payout,
|
||||
transfer,
|
||||
payinRefund,
|
||||
payoutRefund,
|
||||
bankDirectDebit,
|
||||
bankTransfer,
|
||||
cardTopup,
|
||||
cardTransaction,
|
||||
payinAcquiring,
|
||||
payinRefundAcquiring,
|
||||
sctrInst,
|
||||
payinSctInstantRecall,
|
||||
payoutSctInstantEmit,
|
||||
payinSctInstantEmitRecall,
|
||||
creditTransferReturned,
|
||||
checkPayin,
|
||||
sdde,
|
||||
sddr,
|
||||
sddrReversal,
|
||||
sctrRecall,
|
||||
checkRefund,
|
||||
sctr,
|
||||
creditInternationalTransfer,
|
||||
check,
|
||||
creditNote,
|
||||
fees,
|
||||
instantBankTransfer,
|
||||
walletTransfer,
|
||||
unknown;
|
||||
|
||||
static TransactionType fromString(String value) {
|
||||
@@ -39,30 +27,30 @@ enum TransactionType {
|
||||
abstract class WalletTransactionsResponseEntity
|
||||
with _$WalletTransactionsResponseEntity {
|
||||
const factory WalletTransactionsResponseEntity({
|
||||
required int total,
|
||||
required int page,
|
||||
required int pages,
|
||||
required List<WalletTransactionEntity> items,
|
||||
String? nextCursor,
|
||||
}) = _WalletTransactionsResponseEntity;
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WalletTransactionEntity with _$WalletTransactionEntity {
|
||||
const factory WalletTransactionEntity({
|
||||
required int transactionId,
|
||||
required int walletDebitId,
|
||||
required int walletCreditId,
|
||||
required TransactionType transactionType,
|
||||
required String foreignId,
|
||||
required String name,
|
||||
required String description,
|
||||
required String valueDate,
|
||||
required String executionDate,
|
||||
required String amount,
|
||||
required String walletDebitBalance,
|
||||
required String walletCreditBalance,
|
||||
required String currency,
|
||||
required String createdDate,
|
||||
required String totalRows,
|
||||
required TransactionType operationType,
|
||||
@Default('') String direction,
|
||||
@Default('') String objectId,
|
||||
@Default('') String label,
|
||||
@Default('') String status,
|
||||
@Default(0.0) double amount,
|
||||
@Default('EUR') String currency,
|
||||
@Default('') String createdDate,
|
||||
String? settlementDate,
|
||||
String? merchantName,
|
||||
String? merchantLogo,
|
||||
String? merchantCategory,
|
||||
String? merchantCategoryGroup,
|
||||
String? merchantCity,
|
||||
String? merchantCountry,
|
||||
String? maskedPan,
|
||||
String? messageToUser,
|
||||
}) = _WalletTransactionEntity;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$WalletTransactionsResponseEntity {
|
||||
|
||||
int get total; int get page; int get pages; List<WalletTransactionEntity> get items;
|
||||
List<WalletTransactionEntity> get items; String? get nextCursor;
|
||||
/// Create a copy of WalletTransactionsResponseEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -25,16 +25,16 @@ $WalletTransactionsResponseEntityCopyWith<WalletTransactionsResponseEntity> get
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionsResponseEntity&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)&&const DeepCollectionEquality().equals(other.items, items));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionsResponseEntity&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,page,pages,const DeepCollectionEquality().hash(items));
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items),nextCursor);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionsResponseEntity(total: $total, page: $page, pages: $pages, items: $items)';
|
||||
return 'WalletTransactionsResponseEntity(items: $items, nextCursor: $nextCursor)';
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract mixin class $WalletTransactionsResponseEntityCopyWith<$Res> {
|
||||
factory $WalletTransactionsResponseEntityCopyWith(WalletTransactionsResponseEntity value, $Res Function(WalletTransactionsResponseEntity) _then) = _$WalletTransactionsResponseEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int total, int page, int pages, List<WalletTransactionEntity> items
|
||||
List<WalletTransactionEntity> items, String? nextCursor
|
||||
});
|
||||
|
||||
|
||||
@@ -62,13 +62,11 @@ class _$WalletTransactionsResponseEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? page = null,Object? pages = null,Object? items = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? items = null,Object? nextCursor = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionEntity>,
|
||||
items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionEntity>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -153,10 +151,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int total, int page, int pages, List<WalletTransactionEntity> items)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<WalletTransactionEntity> items, String? nextCursor)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseEntity() when $default != null:
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
return $default(_that.items,_that.nextCursor);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -174,10 +172,10 @@ return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int total, int page, int pages, List<WalletTransactionEntity> items) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<WalletTransactionEntity> items, String? nextCursor) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseEntity():
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
return $default(_that.items,_that.nextCursor);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -194,10 +192,10 @@ return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int total, int page, int pages, List<WalletTransactionEntity> items)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<WalletTransactionEntity> items, String? nextCursor)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionsResponseEntity() when $default != null:
|
||||
return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
return $default(_that.items,_that.nextCursor);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -209,12 +207,9 @@ return $default(_that.total,_that.page,_that.pages,_that.items);case _:
|
||||
|
||||
|
||||
class _WalletTransactionsResponseEntity implements WalletTransactionsResponseEntity {
|
||||
const _WalletTransactionsResponseEntity({required this.total, required this.page, required this.pages, required final List<WalletTransactionEntity> items}): _items = items;
|
||||
const _WalletTransactionsResponseEntity({required final List<WalletTransactionEntity> items, this.nextCursor}): _items = items;
|
||||
|
||||
|
||||
@override final int total;
|
||||
@override final int page;
|
||||
@override final int pages;
|
||||
final List<WalletTransactionEntity> _items;
|
||||
@override List<WalletTransactionEntity> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
@@ -222,6 +217,7 @@ class _WalletTransactionsResponseEntity implements WalletTransactionsResponseEnt
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
|
||||
@override final String? nextCursor;
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -233,16 +229,16 @@ _$WalletTransactionsResponseEntityCopyWith<_WalletTransactionsResponseEntity> ge
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionsResponseEntity&&(identical(other.total, total) || other.total == total)&&(identical(other.page, page) || other.page == page)&&(identical(other.pages, pages) || other.pages == pages)&&const DeepCollectionEquality().equals(other._items, _items));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionsResponseEntity&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.nextCursor, nextCursor) || other.nextCursor == nextCursor));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,total,page,pages,const DeepCollectionEquality().hash(_items));
|
||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_items),nextCursor);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionsResponseEntity(total: $total, page: $page, pages: $pages, items: $items)';
|
||||
return 'WalletTransactionsResponseEntity(items: $items, nextCursor: $nextCursor)';
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +249,7 @@ abstract mixin class _$WalletTransactionsResponseEntityCopyWith<$Res> implements
|
||||
factory _$WalletTransactionsResponseEntityCopyWith(_WalletTransactionsResponseEntity value, $Res Function(_WalletTransactionsResponseEntity) _then) = __$WalletTransactionsResponseEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int total, int page, int pages, List<WalletTransactionEntity> items
|
||||
List<WalletTransactionEntity> items, String? nextCursor
|
||||
});
|
||||
|
||||
|
||||
@@ -270,13 +266,11 @@ class __$WalletTransactionsResponseEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of WalletTransactionsResponseEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? page = null,Object? pages = null,Object? items = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? items = null,Object? nextCursor = freezed,}) {
|
||||
return _then(_WalletTransactionsResponseEntity(
|
||||
total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
||||
as int,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
||||
as int,pages: null == pages ? _self.pages : pages // ignore: cast_nullable_to_non_nullable
|
||||
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionEntity>,
|
||||
items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
||||
as List<WalletTransactionEntity>,nextCursor: freezed == nextCursor ? _self.nextCursor : nextCursor // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -286,7 +280,7 @@ as List<WalletTransactionEntity>,
|
||||
/// @nodoc
|
||||
mixin _$WalletTransactionEntity {
|
||||
|
||||
int get transactionId; int get walletDebitId; int get walletCreditId; TransactionType get transactionType; String get foreignId; String get name; String get description; String get valueDate; String get executionDate; String get amount; String get walletDebitBalance; String get walletCreditBalance; String get currency; String get createdDate; String get totalRows;
|
||||
TransactionType get operationType; String get direction; String get objectId; String get label; String get status; double get amount; String get currency; String get createdDate; String? get settlementDate; String? get merchantName; String? get merchantLogo; String? get merchantCategory; String? get merchantCategoryGroup; String? get merchantCity; String? get merchantCountry; String? get maskedPan; String? get messageToUser;
|
||||
/// Create a copy of WalletTransactionEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -297,16 +291,16 @@ $WalletTransactionEntityCopyWith<WalletTransactionEntity> get copyWith => _$Wall
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionEntity&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)&&(identical(other.walletDebitId, walletDebitId) || other.walletDebitId == walletDebitId)&&(identical(other.walletCreditId, walletCreditId) || other.walletCreditId == walletCreditId)&&(identical(other.transactionType, transactionType) || other.transactionType == transactionType)&&(identical(other.foreignId, foreignId) || other.foreignId == foreignId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.valueDate, valueDate) || other.valueDate == valueDate)&&(identical(other.executionDate, executionDate) || other.executionDate == executionDate)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.walletDebitBalance, walletDebitBalance) || other.walletDebitBalance == walletDebitBalance)&&(identical(other.walletCreditBalance, walletCreditBalance) || other.walletCreditBalance == walletCreditBalance)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.totalRows, totalRows) || other.totalRows == totalRows));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is WalletTransactionEntity&&(identical(other.operationType, operationType) || other.operationType == operationType)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.objectId, objectId) || other.objectId == objectId)&&(identical(other.label, label) || other.label == label)&&(identical(other.status, status) || other.status == status)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.settlementDate, settlementDate) || other.settlementDate == settlementDate)&&(identical(other.merchantName, merchantName) || other.merchantName == merchantName)&&(identical(other.merchantLogo, merchantLogo) || other.merchantLogo == merchantLogo)&&(identical(other.merchantCategory, merchantCategory) || other.merchantCategory == merchantCategory)&&(identical(other.merchantCategoryGroup, merchantCategoryGroup) || other.merchantCategoryGroup == merchantCategoryGroup)&&(identical(other.merchantCity, merchantCity) || other.merchantCity == merchantCity)&&(identical(other.merchantCountry, merchantCountry) || other.merchantCountry == merchantCountry)&&(identical(other.maskedPan, maskedPan) || other.maskedPan == maskedPan)&&(identical(other.messageToUser, messageToUser) || other.messageToUser == messageToUser));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,transactionId,walletDebitId,walletCreditId,transactionType,foreignId,name,description,valueDate,executionDate,amount,walletDebitBalance,walletCreditBalance,currency,createdDate,totalRows);
|
||||
int get hashCode => Object.hash(runtimeType,operationType,direction,objectId,label,status,amount,currency,createdDate,settlementDate,merchantName,merchantLogo,merchantCategory,merchantCategoryGroup,merchantCity,merchantCountry,maskedPan,messageToUser);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionEntity(transactionId: $transactionId, walletDebitId: $walletDebitId, walletCreditId: $walletCreditId, transactionType: $transactionType, foreignId: $foreignId, name: $name, description: $description, valueDate: $valueDate, executionDate: $executionDate, amount: $amount, walletDebitBalance: $walletDebitBalance, walletCreditBalance: $walletCreditBalance, currency: $currency, createdDate: $createdDate, totalRows: $totalRows)';
|
||||
return 'WalletTransactionEntity(operationType: $operationType, direction: $direction, objectId: $objectId, label: $label, status: $status, amount: $amount, currency: $currency, createdDate: $createdDate, settlementDate: $settlementDate, merchantName: $merchantName, merchantLogo: $merchantLogo, merchantCategory: $merchantCategory, merchantCategoryGroup: $merchantCategoryGroup, merchantCity: $merchantCity, merchantCountry: $merchantCountry, maskedPan: $maskedPan, messageToUser: $messageToUser)';
|
||||
}
|
||||
|
||||
|
||||
@@ -317,7 +311,7 @@ abstract mixin class $WalletTransactionEntityCopyWith<$Res> {
|
||||
factory $WalletTransactionEntityCopyWith(WalletTransactionEntity value, $Res Function(WalletTransactionEntity) _then) = _$WalletTransactionEntityCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int transactionId, int walletDebitId, int walletCreditId, TransactionType transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows
|
||||
TransactionType operationType, String direction, String objectId, String label, String status, double amount, String currency, String createdDate, String? settlementDate, String? merchantName, String? merchantLogo, String? merchantCategory, String? merchantCategoryGroup, String? merchantCity, String? merchantCountry, String? maskedPan, String? messageToUser
|
||||
});
|
||||
|
||||
|
||||
@@ -334,24 +328,26 @@ class _$WalletTransactionEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of WalletTransactionEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? transactionId = null,Object? walletDebitId = null,Object? walletCreditId = null,Object? transactionType = null,Object? foreignId = null,Object? name = null,Object? description = null,Object? valueDate = null,Object? executionDate = null,Object? amount = null,Object? walletDebitBalance = null,Object? walletCreditBalance = null,Object? currency = null,Object? createdDate = null,Object? totalRows = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? operationType = null,Object? direction = null,Object? objectId = null,Object? label = null,Object? status = null,Object? amount = null,Object? currency = null,Object? createdDate = null,Object? settlementDate = freezed,Object? merchantName = freezed,Object? merchantLogo = freezed,Object? merchantCategory = freezed,Object? merchantCategoryGroup = freezed,Object? merchantCity = freezed,Object? merchantCountry = freezed,Object? maskedPan = freezed,Object? messageToUser = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletDebitId: null == walletDebitId ? _self.walletDebitId : walletDebitId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletCreditId: null == walletCreditId ? _self.walletCreditId : walletCreditId // ignore: cast_nullable_to_non_nullable
|
||||
as int,transactionType: null == transactionType ? _self.transactionType : transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as TransactionType,foreignId: null == foreignId ? _self.foreignId : foreignId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,valueDate: null == valueDate ? _self.valueDate : valueDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,executionDate: null == executionDate ? _self.executionDate : executionDate // ignore: cast_nullable_to_non_nullable
|
||||
operationType: null == operationType ? _self.operationType : operationType // ignore: cast_nullable_to_non_nullable
|
||||
as TransactionType,direction: null == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable
|
||||
as String,objectId: null == objectId ? _self.objectId : objectId // ignore: cast_nullable_to_non_nullable
|
||||
as String,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletDebitBalance: null == walletDebitBalance ? _self.walletDebitBalance : walletDebitBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletCreditBalance: null == walletCreditBalance ? _self.walletCreditBalance : walletCreditBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as double,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdDate: null == createdDate ? _self.createdDate : createdDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,totalRows: null == totalRows ? _self.totalRows : totalRows // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,settlementDate: freezed == settlementDate ? _self.settlementDate : settlementDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantName: freezed == merchantName ? _self.merchantName : merchantName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantLogo: freezed == merchantLogo ? _self.merchantLogo : merchantLogo // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCategory: freezed == merchantCategory ? _self.merchantCategory : merchantCategory // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCategoryGroup: freezed == merchantCategoryGroup ? _self.merchantCategoryGroup : merchantCategoryGroup // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCity: freezed == merchantCity ? _self.merchantCity : merchantCity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCountry: freezed == merchantCountry ? _self.merchantCountry : merchantCountry // ignore: cast_nullable_to_non_nullable
|
||||
as String?,maskedPan: freezed == maskedPan ? _self.maskedPan : maskedPan // ignore: cast_nullable_to_non_nullable
|
||||
as String?,messageToUser: freezed == messageToUser ? _self.messageToUser : messageToUser // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -436,10 +432,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int transactionId, int walletDebitId, int walletCreditId, TransactionType transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( TransactionType operationType, String direction, String objectId, String label, String status, double amount, String currency, String createdDate, String? settlementDate, String? merchantName, String? merchantLogo, String? merchantCategory, String? merchantCategoryGroup, String? merchantCity, String? merchantCountry, String? maskedPan, String? messageToUser)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionEntity() when $default != null:
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
return $default(_that.operationType,_that.direction,_that.objectId,_that.label,_that.status,_that.amount,_that.currency,_that.createdDate,_that.settlementDate,_that.merchantName,_that.merchantLogo,_that.merchantCategory,_that.merchantCategoryGroup,_that.merchantCity,_that.merchantCountry,_that.maskedPan,_that.messageToUser);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -457,10 +453,10 @@ return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_th
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int transactionId, int walletDebitId, int walletCreditId, TransactionType transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( TransactionType operationType, String direction, String objectId, String label, String status, double amount, String currency, String createdDate, String? settlementDate, String? merchantName, String? merchantLogo, String? merchantCategory, String? merchantCategoryGroup, String? merchantCity, String? merchantCountry, String? maskedPan, String? messageToUser) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionEntity():
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
return $default(_that.operationType,_that.direction,_that.objectId,_that.label,_that.status,_that.amount,_that.currency,_that.createdDate,_that.settlementDate,_that.merchantName,_that.merchantLogo,_that.merchantCategory,_that.merchantCategoryGroup,_that.merchantCity,_that.merchantCountry,_that.maskedPan,_that.messageToUser);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -477,10 +473,10 @@ return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_th
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int transactionId, int walletDebitId, int walletCreditId, TransactionType transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( TransactionType operationType, String direction, String objectId, String label, String status, double amount, String currency, String createdDate, String? settlementDate, String? merchantName, String? merchantLogo, String? merchantCategory, String? merchantCategoryGroup, String? merchantCity, String? merchantCountry, String? maskedPan, String? messageToUser)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _WalletTransactionEntity() when $default != null:
|
||||
return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_that.transactionType,_that.foreignId,_that.name,_that.description,_that.valueDate,_that.executionDate,_that.amount,_that.walletDebitBalance,_that.walletCreditBalance,_that.currency,_that.createdDate,_that.totalRows);case _:
|
||||
return $default(_that.operationType,_that.direction,_that.objectId,_that.label,_that.status,_that.amount,_that.currency,_that.createdDate,_that.settlementDate,_that.merchantName,_that.merchantLogo,_that.merchantCategory,_that.merchantCategoryGroup,_that.merchantCity,_that.merchantCountry,_that.maskedPan,_that.messageToUser);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -492,24 +488,26 @@ return $default(_that.transactionId,_that.walletDebitId,_that.walletCreditId,_th
|
||||
|
||||
|
||||
class _WalletTransactionEntity implements WalletTransactionEntity {
|
||||
const _WalletTransactionEntity({required this.transactionId, required this.walletDebitId, required this.walletCreditId, required this.transactionType, required this.foreignId, required this.name, required this.description, required this.valueDate, required this.executionDate, required this.amount, required this.walletDebitBalance, required this.walletCreditBalance, required this.currency, required this.createdDate, required this.totalRows});
|
||||
const _WalletTransactionEntity({required this.operationType, this.direction = '', this.objectId = '', this.label = '', this.status = '', this.amount = 0.0, this.currency = 'EUR', this.createdDate = '', this.settlementDate, this.merchantName, this.merchantLogo, this.merchantCategory, this.merchantCategoryGroup, this.merchantCity, this.merchantCountry, this.maskedPan, this.messageToUser});
|
||||
|
||||
|
||||
@override final int transactionId;
|
||||
@override final int walletDebitId;
|
||||
@override final int walletCreditId;
|
||||
@override final TransactionType transactionType;
|
||||
@override final String foreignId;
|
||||
@override final String name;
|
||||
@override final String description;
|
||||
@override final String valueDate;
|
||||
@override final String executionDate;
|
||||
@override final String amount;
|
||||
@override final String walletDebitBalance;
|
||||
@override final String walletCreditBalance;
|
||||
@override final String currency;
|
||||
@override final String createdDate;
|
||||
@override final String totalRows;
|
||||
@override final TransactionType operationType;
|
||||
@override@JsonKey() final String direction;
|
||||
@override@JsonKey() final String objectId;
|
||||
@override@JsonKey() final String label;
|
||||
@override@JsonKey() final String status;
|
||||
@override@JsonKey() final double amount;
|
||||
@override@JsonKey() final String currency;
|
||||
@override@JsonKey() final String createdDate;
|
||||
@override final String? settlementDate;
|
||||
@override final String? merchantName;
|
||||
@override final String? merchantLogo;
|
||||
@override final String? merchantCategory;
|
||||
@override final String? merchantCategoryGroup;
|
||||
@override final String? merchantCity;
|
||||
@override final String? merchantCountry;
|
||||
@override final String? maskedPan;
|
||||
@override final String? messageToUser;
|
||||
|
||||
/// Create a copy of WalletTransactionEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -521,16 +519,16 @@ _$WalletTransactionEntityCopyWith<_WalletTransactionEntity> get copyWith => __$W
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionEntity&&(identical(other.transactionId, transactionId) || other.transactionId == transactionId)&&(identical(other.walletDebitId, walletDebitId) || other.walletDebitId == walletDebitId)&&(identical(other.walletCreditId, walletCreditId) || other.walletCreditId == walletCreditId)&&(identical(other.transactionType, transactionType) || other.transactionType == transactionType)&&(identical(other.foreignId, foreignId) || other.foreignId == foreignId)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.valueDate, valueDate) || other.valueDate == valueDate)&&(identical(other.executionDate, executionDate) || other.executionDate == executionDate)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.walletDebitBalance, walletDebitBalance) || other.walletDebitBalance == walletDebitBalance)&&(identical(other.walletCreditBalance, walletCreditBalance) || other.walletCreditBalance == walletCreditBalance)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.totalRows, totalRows) || other.totalRows == totalRows));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _WalletTransactionEntity&&(identical(other.operationType, operationType) || other.operationType == operationType)&&(identical(other.direction, direction) || other.direction == direction)&&(identical(other.objectId, objectId) || other.objectId == objectId)&&(identical(other.label, label) || other.label == label)&&(identical(other.status, status) || other.status == status)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.createdDate, createdDate) || other.createdDate == createdDate)&&(identical(other.settlementDate, settlementDate) || other.settlementDate == settlementDate)&&(identical(other.merchantName, merchantName) || other.merchantName == merchantName)&&(identical(other.merchantLogo, merchantLogo) || other.merchantLogo == merchantLogo)&&(identical(other.merchantCategory, merchantCategory) || other.merchantCategory == merchantCategory)&&(identical(other.merchantCategoryGroup, merchantCategoryGroup) || other.merchantCategoryGroup == merchantCategoryGroup)&&(identical(other.merchantCity, merchantCity) || other.merchantCity == merchantCity)&&(identical(other.merchantCountry, merchantCountry) || other.merchantCountry == merchantCountry)&&(identical(other.maskedPan, maskedPan) || other.maskedPan == maskedPan)&&(identical(other.messageToUser, messageToUser) || other.messageToUser == messageToUser));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,transactionId,walletDebitId,walletCreditId,transactionType,foreignId,name,description,valueDate,executionDate,amount,walletDebitBalance,walletCreditBalance,currency,createdDate,totalRows);
|
||||
int get hashCode => Object.hash(runtimeType,operationType,direction,objectId,label,status,amount,currency,createdDate,settlementDate,merchantName,merchantLogo,merchantCategory,merchantCategoryGroup,merchantCity,merchantCountry,maskedPan,messageToUser);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'WalletTransactionEntity(transactionId: $transactionId, walletDebitId: $walletDebitId, walletCreditId: $walletCreditId, transactionType: $transactionType, foreignId: $foreignId, name: $name, description: $description, valueDate: $valueDate, executionDate: $executionDate, amount: $amount, walletDebitBalance: $walletDebitBalance, walletCreditBalance: $walletCreditBalance, currency: $currency, createdDate: $createdDate, totalRows: $totalRows)';
|
||||
return 'WalletTransactionEntity(operationType: $operationType, direction: $direction, objectId: $objectId, label: $label, status: $status, amount: $amount, currency: $currency, createdDate: $createdDate, settlementDate: $settlementDate, merchantName: $merchantName, merchantLogo: $merchantLogo, merchantCategory: $merchantCategory, merchantCategoryGroup: $merchantCategoryGroup, merchantCity: $merchantCity, merchantCountry: $merchantCountry, maskedPan: $maskedPan, messageToUser: $messageToUser)';
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +539,7 @@ abstract mixin class _$WalletTransactionEntityCopyWith<$Res> implements $WalletT
|
||||
factory _$WalletTransactionEntityCopyWith(_WalletTransactionEntity value, $Res Function(_WalletTransactionEntity) _then) = __$WalletTransactionEntityCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int transactionId, int walletDebitId, int walletCreditId, TransactionType transactionType, String foreignId, String name, String description, String valueDate, String executionDate, String amount, String walletDebitBalance, String walletCreditBalance, String currency, String createdDate, String totalRows
|
||||
TransactionType operationType, String direction, String objectId, String label, String status, double amount, String currency, String createdDate, String? settlementDate, String? merchantName, String? merchantLogo, String? merchantCategory, String? merchantCategoryGroup, String? merchantCity, String? merchantCountry, String? maskedPan, String? messageToUser
|
||||
});
|
||||
|
||||
|
||||
@@ -558,24 +556,26 @@ class __$WalletTransactionEntityCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of WalletTransactionEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? transactionId = null,Object? walletDebitId = null,Object? walletCreditId = null,Object? transactionType = null,Object? foreignId = null,Object? name = null,Object? description = null,Object? valueDate = null,Object? executionDate = null,Object? amount = null,Object? walletDebitBalance = null,Object? walletCreditBalance = null,Object? currency = null,Object? createdDate = null,Object? totalRows = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? operationType = null,Object? direction = null,Object? objectId = null,Object? label = null,Object? status = null,Object? amount = null,Object? currency = null,Object? createdDate = null,Object? settlementDate = freezed,Object? merchantName = freezed,Object? merchantLogo = freezed,Object? merchantCategory = freezed,Object? merchantCategoryGroup = freezed,Object? merchantCity = freezed,Object? merchantCountry = freezed,Object? maskedPan = freezed,Object? messageToUser = freezed,}) {
|
||||
return _then(_WalletTransactionEntity(
|
||||
transactionId: null == transactionId ? _self.transactionId : transactionId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletDebitId: null == walletDebitId ? _self.walletDebitId : walletDebitId // ignore: cast_nullable_to_non_nullable
|
||||
as int,walletCreditId: null == walletCreditId ? _self.walletCreditId : walletCreditId // ignore: cast_nullable_to_non_nullable
|
||||
as int,transactionType: null == transactionType ? _self.transactionType : transactionType // ignore: cast_nullable_to_non_nullable
|
||||
as TransactionType,foreignId: null == foreignId ? _self.foreignId : foreignId // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,valueDate: null == valueDate ? _self.valueDate : valueDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,executionDate: null == executionDate ? _self.executionDate : executionDate // ignore: cast_nullable_to_non_nullable
|
||||
operationType: null == operationType ? _self.operationType : operationType // ignore: cast_nullable_to_non_nullable
|
||||
as TransactionType,direction: null == direction ? _self.direction : direction // ignore: cast_nullable_to_non_nullable
|
||||
as String,objectId: null == objectId ? _self.objectId : objectId // ignore: cast_nullable_to_non_nullable
|
||||
as String,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as String,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletDebitBalance: null == walletDebitBalance ? _self.walletDebitBalance : walletDebitBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,walletCreditBalance: null == walletCreditBalance ? _self.walletCreditBalance : walletCreditBalance // ignore: cast_nullable_to_non_nullable
|
||||
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as double,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdDate: null == createdDate ? _self.createdDate : createdDate // ignore: cast_nullable_to_non_nullable
|
||||
as String,totalRows: null == totalRows ? _self.totalRows : totalRows // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as String,settlementDate: freezed == settlementDate ? _self.settlementDate : settlementDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantName: freezed == merchantName ? _self.merchantName : merchantName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantLogo: freezed == merchantLogo ? _self.merchantLogo : merchantLogo // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCategory: freezed == merchantCategory ? _self.merchantCategory : merchantCategory // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCategoryGroup: freezed == merchantCategoryGroup ? _self.merchantCategoryGroup : merchantCategoryGroup // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCity: freezed == merchantCity ? _self.merchantCity : merchantCity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,merchantCountry: freezed == merchantCountry ? _self.merchantCountry : merchantCountry // ignore: cast_nullable_to_non_nullable
|
||||
as String?,maskedPan: freezed == maskedPan ? _self.maskedPan : maskedPan // ignore: cast_nullable_to_non_nullable
|
||||
as String?,messageToUser: freezed == messageToUser ? _self.messageToUser : messageToUser // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,18 @@ abstract class TreezorRepository {
|
||||
|
||||
Future<PaymentProfileEntity> getPaymentProfile({required String userId});
|
||||
|
||||
Future<WalletTransactionsResponseEntity> getWalletTransactions({
|
||||
Future<PaymentProfileEntity> updatePaymentProfile({
|
||||
required String paymentProfileId,
|
||||
required String scaProof,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? phone,
|
||||
List<PaymentProfileAddressEntity>? addresses,
|
||||
List<PaymentProfileAddressEntity>? taxResidences,
|
||||
String? nationality,
|
||||
});
|
||||
|
||||
Future<WalletTransactionsResponseEntity> getWalletOperations({
|
||||
required String walletId,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
@@ -32,13 +43,13 @@ abstract class TreezorRepository {
|
||||
Future<TransactionBeneficiaryEntity> createTransactionBeneficiary({
|
||||
required String name,
|
||||
required String iban,
|
||||
String? bic,
|
||||
required String scaProof,
|
||||
});
|
||||
|
||||
Future<String> validateTransactionBeneficiary({required int beneficiaryId});
|
||||
|
||||
Future<void> walletTransfer({
|
||||
required String walletId,
|
||||
required int beneficiaryId,
|
||||
required String beneficiaryValidationId,
|
||||
required double amount,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import '../entities/child_profile_deletability_entity.dart';
|
||||
import '../entities/child_profile_entity.dart';
|
||||
import '../entities/device_entity.dart';
|
||||
import '../entities/user_entity.dart';
|
||||
@@ -5,6 +6,17 @@ import '../entities/user_entity.dart';
|
||||
abstract class UserRepository {
|
||||
Future<UserEntity> getUserInfo();
|
||||
Future<List<ChildProfileEntity>> getChildProfiles();
|
||||
Future<ChildProfileDeletabilityEntity> checkChildProfileDeletability({
|
||||
required String childProfileId,
|
||||
});
|
||||
Future<DeviceEntity> getDeviceByIdentificator({required String identificator});
|
||||
Future<String> deleteDevice({required String deviceId});
|
||||
Future<void> updateChildProfile({
|
||||
required String childProfileId,
|
||||
required String scaProof,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? bornAt,
|
||||
String? address,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:sf_shared/src/domain/entities/date_filter.dart';
|
||||
@@ -8,22 +6,26 @@ import 'package:sf_shared/src/providers/treezor_repository_provider.dart';
|
||||
import 'package:sf_shared/src/providers/wallet_refresh_provider.dart';
|
||||
|
||||
final walletTransactionsProvider = FutureProvider.autoDispose
|
||||
.family<List<WalletTransactionEntity>, TransactionsQuery>(
|
||||
.family<WalletTransactionsResponseEntity, TransactionsQuery>(
|
||||
(ref, query) async {
|
||||
ref.watch(walletRefreshProvider);
|
||||
final repository = ref.read(treezorRepositoryProvider);
|
||||
|
||||
Map<String, dynamic>? queryParameters;
|
||||
if (query.dateFilter != null) {
|
||||
final filtersJson = jsonEncode({
|
||||
'createdDate': {'gte': query.dateFilter!.startDate.toIso8601String()},
|
||||
});
|
||||
queryParameters = {'filters': base64Encode(utf8.encode(filtersJson))};
|
||||
}
|
||||
final now = DateTime.now().toUtc();
|
||||
final dateFrom = (query.dateFilter?.startDate ??
|
||||
DateTime(now.year, now.month - 1, now.day)).toUtc();
|
||||
final dateTo = now;
|
||||
|
||||
final response = await repository.getWalletTransactions(
|
||||
final queryParameters = <String, dynamic>{
|
||||
'dateFrom': dateFrom.millisecondsSinceEpoch,
|
||||
'dateTo': dateTo.millisecondsSinceEpoch,
|
||||
'pageSize': 3,
|
||||
if (query.cursor != null) 'cursor': query.cursor,
|
||||
};
|
||||
|
||||
final response = await repository.getWalletOperations(
|
||||
walletId: query.walletId,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return response.items;
|
||||
return response;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user