feat: implement update functionality for receipt aliases and add corresponding tests
This commit is contained in:
@@ -420,6 +420,19 @@ class AdminRepository {
|
||||
'isGlobal': isGlobal,
|
||||
});
|
||||
|
||||
Future<void> updateReceiptAlias(
|
||||
int id, {
|
||||
String? receiptName,
|
||||
int? productId,
|
||||
}) {
|
||||
final body = <String, dynamic>{
|
||||
if (receiptName != null) 'receiptName': receiptName,
|
||||
if (productId != null) 'productId': productId,
|
||||
};
|
||||
|
||||
return _patchVoid(ReceiptAliasApiPaths.update(id), body);
|
||||
}
|
||||
|
||||
Future<void> removeReceiptAlias(int id) =>
|
||||
_deleteVoid(ReceiptAliasApiPaths.remove(id));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user