completed batch feature
This commit is contained in:
46
lib/screens/groups/models/batch_item_update_model.dart
Normal file
46
lib/screens/groups/models/batch_item_update_model.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'batch_item_update_model.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GroupBatchItemUpdateRequest {
|
||||
final String? id;
|
||||
final double? amount;
|
||||
final String? recipientName;
|
||||
final String? recipientPhone;
|
||||
final String? billClientId;
|
||||
final String? billName;
|
||||
final String? billProductName;
|
||||
final String? providerImage;
|
||||
final String? providerLabel;
|
||||
|
||||
const GroupBatchItemUpdateRequest({
|
||||
this.id,
|
||||
this.amount,
|
||||
this.recipientName,
|
||||
this.recipientPhone,
|
||||
this.billClientId,
|
||||
this.billName,
|
||||
this.billProductName,
|
||||
this.providerImage,
|
||||
this.providerLabel,
|
||||
});
|
||||
|
||||
factory GroupBatchItemUpdateRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$GroupBatchItemUpdateRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$GroupBatchItemUpdateRequestToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GroupBatchItemUpdateList {
|
||||
final List<GroupBatchItemUpdateRequest>? items;
|
||||
final String? userId;
|
||||
|
||||
const GroupBatchItemUpdateList({this.items, this.userId});
|
||||
|
||||
factory GroupBatchItemUpdateList.fromJson(Map<String, dynamic> json) =>
|
||||
_$GroupBatchItemUpdateListFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$GroupBatchItemUpdateListToJson(this);
|
||||
}
|
||||
53
lib/screens/groups/models/batch_item_update_model.g.dart
Normal file
53
lib/screens/groups/models/batch_item_update_model.g.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'batch_item_update_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GroupBatchItemUpdateRequest _$GroupBatchItemUpdateRequestFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => GroupBatchItemUpdateRequest(
|
||||
id: json['id'] as String?,
|
||||
amount: (json['amount'] as num?)?.toDouble(),
|
||||
recipientName: json['recipientName'] as String?,
|
||||
recipientPhone: json['recipientPhone'] as String?,
|
||||
billClientId: json['billClientId'] as String?,
|
||||
billName: json['billName'] as String?,
|
||||
billProductName: json['billProductName'] as String?,
|
||||
providerImage: json['providerImage'] as String?,
|
||||
providerLabel: json['providerLabel'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GroupBatchItemUpdateRequestToJson(
|
||||
GroupBatchItemUpdateRequest instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'amount': instance.amount,
|
||||
'recipientName': instance.recipientName,
|
||||
'recipientPhone': instance.recipientPhone,
|
||||
'billClientId': instance.billClientId,
|
||||
'billName': instance.billName,
|
||||
'billProductName': instance.billProductName,
|
||||
'providerImage': instance.providerImage,
|
||||
'providerLabel': instance.providerLabel,
|
||||
};
|
||||
|
||||
GroupBatchItemUpdateList _$GroupBatchItemUpdateListFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => GroupBatchItemUpdateList(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => GroupBatchItemUpdateRequest.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
userId: json['userId'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GroupBatchItemUpdateListToJson(
|
||||
GroupBatchItemUpdateList instance,
|
||||
) => <String, dynamic>{
|
||||
'items': instance.items?.map((e) => e.toJson()).toList(),
|
||||
'userId': instance.userId,
|
||||
};
|
||||
@@ -55,6 +55,10 @@ class GroupBatchItem {
|
||||
final String? transactionId;
|
||||
final String? errorMessage;
|
||||
final String? createdAt;
|
||||
final String? billName;
|
||||
final String? billProductName;
|
||||
final String? providerLabel;
|
||||
final String? providerImage;
|
||||
|
||||
const GroupBatchItem({
|
||||
this.id,
|
||||
@@ -66,6 +70,10 @@ class GroupBatchItem {
|
||||
this.transactionId,
|
||||
this.errorMessage,
|
||||
this.createdAt,
|
||||
this.billName,
|
||||
this.billProductName,
|
||||
this.providerLabel,
|
||||
this.providerImage,
|
||||
});
|
||||
|
||||
factory GroupBatchItem.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -84,7 +92,6 @@ class CreateBatchRequest {
|
||||
final String? paymentProcessorLabel;
|
||||
final String? paymentProcessorName;
|
||||
final String? paymentProcessorImage;
|
||||
final Map<String, dynamic> transactionTemplate;
|
||||
|
||||
const CreateBatchRequest({
|
||||
required this.recipientGroupId,
|
||||
@@ -95,7 +102,6 @@ class CreateBatchRequest {
|
||||
this.paymentProcessorLabel,
|
||||
this.paymentProcessorName,
|
||||
this.paymentProcessorImage,
|
||||
required this.transactionTemplate,
|
||||
});
|
||||
|
||||
factory CreateBatchRequest.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -140,4 +146,4 @@ class GroupBatchUpdateRequest {
|
||||
_$GroupBatchUpdateRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$GroupBatchUpdateRequestToJson(this);
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,10 @@ GroupBatchItem _$GroupBatchItemFromJson(Map<String, dynamic> json) =>
|
||||
transactionId: json['transactionId'] as String?,
|
||||
errorMessage: json['errorMessage'] as String?,
|
||||
createdAt: json['createdAt'] as String?,
|
||||
billName: json['billName'] as String?,
|
||||
billProductName: json['billProductName'] as String?,
|
||||
providerLabel: json['providerLabel'] as String?,
|
||||
providerImage: json['providerImage'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GroupBatchItemToJson(GroupBatchItem instance) =>
|
||||
@@ -67,6 +71,10 @@ Map<String, dynamic> _$GroupBatchItemToJson(GroupBatchItem instance) =>
|
||||
'transactionId': instance.transactionId,
|
||||
'errorMessage': instance.errorMessage,
|
||||
'createdAt': instance.createdAt,
|
||||
'billName': instance.billName,
|
||||
'billProductName': instance.billProductName,
|
||||
'providerLabel': instance.providerLabel,
|
||||
'providerImage': instance.providerImage,
|
||||
};
|
||||
|
||||
CreateBatchRequest _$CreateBatchRequestFromJson(Map<String, dynamic> json) =>
|
||||
@@ -79,7 +87,6 @@ CreateBatchRequest _$CreateBatchRequestFromJson(Map<String, dynamic> json) =>
|
||||
paymentProcessorLabel: json['paymentProcessorLabel'] as String?,
|
||||
paymentProcessorName: json['paymentProcessorName'] as String?,
|
||||
paymentProcessorImage: json['paymentProcessorImage'] as String?,
|
||||
transactionTemplate: json['transactionTemplate'] as Map<String, dynamic>,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateBatchRequestToJson(CreateBatchRequest instance) =>
|
||||
@@ -92,7 +99,6 @@ Map<String, dynamic> _$CreateBatchRequestToJson(CreateBatchRequest instance) =>
|
||||
'paymentProcessorLabel': instance.paymentProcessorLabel,
|
||||
'paymentProcessorName': instance.paymentProcessorName,
|
||||
'paymentProcessorImage': instance.paymentProcessorImage,
|
||||
'transactionTemplate': instance.transactionTemplate,
|
||||
};
|
||||
|
||||
BatchActionRequest _$BatchActionRequestFromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Reference in New Issue
Block a user