completed migrating data scope from user to workspace
This commit is contained in:
@@ -35,9 +35,9 @@ class GroupBatchItemUpdateRequest {
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GroupBatchItemUpdateList {
|
||||
final List<GroupBatchItemUpdateRequest>? items;
|
||||
final String? userId;
|
||||
final String? workspaceId;
|
||||
|
||||
const GroupBatchItemUpdateList({this.items, this.userId});
|
||||
const GroupBatchItemUpdateList({this.items, this.workspaceId});
|
||||
|
||||
factory GroupBatchItemUpdateList.fromJson(Map<String, dynamic> json) =>
|
||||
_$GroupBatchItemUpdateListFromJson(json);
|
||||
|
||||
@@ -42,12 +42,12 @@ GroupBatchItemUpdateList _$GroupBatchItemUpdateListFromJson(
|
||||
(e) => GroupBatchItemUpdateRequest.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
userId: json['userId'] as String?,
|
||||
workspaceId: json['workspaceId'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GroupBatchItemUpdateListToJson(
|
||||
GroupBatchItemUpdateList instance,
|
||||
) => <String, dynamic>{
|
||||
'items': instance.items?.map((e) => e.toJson()).toList(),
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ class GroupBatch {
|
||||
final String? id;
|
||||
final String? recipientGroupId;
|
||||
final String? userId;
|
||||
final String? workspaceId;
|
||||
final String? currency;
|
||||
final String? description;
|
||||
final double? value;
|
||||
@@ -24,6 +25,7 @@ class GroupBatch {
|
||||
this.id,
|
||||
this.recipientGroupId,
|
||||
this.userId,
|
||||
this.workspaceId,
|
||||
this.currency,
|
||||
this.description,
|
||||
this.value,
|
||||
@@ -88,6 +90,7 @@ class GroupBatchItem {
|
||||
class CreateBatchRequest {
|
||||
final String recipientGroupId;
|
||||
final String userId;
|
||||
final String workspaceId;
|
||||
final String currency;
|
||||
final String description;
|
||||
final double amount;
|
||||
@@ -98,6 +101,7 @@ class CreateBatchRequest {
|
||||
const CreateBatchRequest({
|
||||
required this.recipientGroupId,
|
||||
required this.userId,
|
||||
required this.workspaceId,
|
||||
required this.currency,
|
||||
required this.description,
|
||||
required this.amount,
|
||||
@@ -114,12 +118,14 @@ class CreateBatchRequest {
|
||||
|
||||
@JsonSerializable()
|
||||
class BatchActionRequest {
|
||||
final String userId;
|
||||
final String workspaceId;
|
||||
final String idempotencyKey;
|
||||
final String? authType;
|
||||
|
||||
const BatchActionRequest({
|
||||
required this.userId,
|
||||
required this.workspaceId,
|
||||
required this.idempotencyKey,
|
||||
this.authType,
|
||||
});
|
||||
|
||||
factory BatchActionRequest.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -131,14 +137,14 @@ class BatchActionRequest {
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class GroupBatchUpdateRequest {
|
||||
String? id;
|
||||
String? userId;
|
||||
String? workspaceId;
|
||||
String? paymentProcessorLabel;
|
||||
String? paymentProcessorName;
|
||||
String? paymentProcessorImage;
|
||||
|
||||
GroupBatchUpdateRequest({
|
||||
this.id,
|
||||
this.userId,
|
||||
this.workspaceId,
|
||||
this.paymentProcessorLabel,
|
||||
this.paymentProcessorName,
|
||||
this.paymentProcessorImage,
|
||||
|
||||
@@ -10,6 +10,7 @@ GroupBatch _$GroupBatchFromJson(Map<String, dynamic> json) => GroupBatch(
|
||||
id: json['id'] as String?,
|
||||
recipientGroupId: json['recipientGroupId'] as String?,
|
||||
userId: json['userId'] as String?,
|
||||
workspaceId: json['workspaceId'] as String?,
|
||||
currency: json['currency'] as String?,
|
||||
description: json['description'] as String?,
|
||||
value: (json['value'] as num?)?.toDouble(),
|
||||
@@ -29,6 +30,7 @@ Map<String, dynamic> _$GroupBatchToJson(GroupBatch instance) =>
|
||||
'id': instance.id,
|
||||
'recipientGroupId': instance.recipientGroupId,
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'currency': instance.currency,
|
||||
'description': instance.description,
|
||||
'value': instance.value,
|
||||
@@ -83,6 +85,7 @@ CreateBatchRequest _$CreateBatchRequestFromJson(Map<String, dynamic> json) =>
|
||||
CreateBatchRequest(
|
||||
recipientGroupId: json['recipientGroupId'] as String,
|
||||
userId: json['userId'] as String,
|
||||
workspaceId: json['workspaceId'] as String,
|
||||
currency: json['currency'] as String,
|
||||
description: json['description'] as String,
|
||||
amount: (json['amount'] as num).toDouble(),
|
||||
@@ -95,6 +98,7 @@ Map<String, dynamic> _$CreateBatchRequestToJson(CreateBatchRequest instance) =>
|
||||
<String, dynamic>{
|
||||
'recipientGroupId': instance.recipientGroupId,
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'currency': instance.currency,
|
||||
'description': instance.description,
|
||||
'amount': instance.amount,
|
||||
@@ -105,21 +109,23 @@ Map<String, dynamic> _$CreateBatchRequestToJson(CreateBatchRequest instance) =>
|
||||
|
||||
BatchActionRequest _$BatchActionRequestFromJson(Map<String, dynamic> json) =>
|
||||
BatchActionRequest(
|
||||
userId: json['userId'] as String,
|
||||
workspaceId: json['workspaceId'] as String,
|
||||
idempotencyKey: json['idempotencyKey'] as String,
|
||||
authType: json['authType'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BatchActionRequestToJson(BatchActionRequest instance) =>
|
||||
<String, dynamic>{
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'idempotencyKey': instance.idempotencyKey,
|
||||
'authType': instance.authType,
|
||||
};
|
||||
|
||||
GroupBatchUpdateRequest _$GroupBatchUpdateRequestFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => GroupBatchUpdateRequest(
|
||||
id: json['id'] as String?,
|
||||
userId: json['userId'] as String?,
|
||||
workspaceId: json['workspaceId'] as String?,
|
||||
paymentProcessorLabel: json['paymentProcessorLabel'] as String?,
|
||||
paymentProcessorName: json['paymentProcessorName'] as String?,
|
||||
paymentProcessorImage: json['paymentProcessorImage'] as String?,
|
||||
@@ -129,7 +135,7 @@ Map<String, dynamic> _$GroupBatchUpdateRequestToJson(
|
||||
GroupBatchUpdateRequest instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'paymentProcessorLabel': instance.paymentProcessorLabel,
|
||||
'paymentProcessorName': instance.paymentProcessorName,
|
||||
'paymentProcessorImage': instance.paymentProcessorImage,
|
||||
|
||||
@@ -9,6 +9,7 @@ class RecipientGroup {
|
||||
final String name;
|
||||
final String? description;
|
||||
final String? userId;
|
||||
final String? workspaceId;
|
||||
final String? createdAt;
|
||||
|
||||
const RecipientGroup({
|
||||
@@ -16,6 +17,7 @@ class RecipientGroup {
|
||||
required this.name,
|
||||
this.description,
|
||||
this.userId,
|
||||
this.workspaceId,
|
||||
this.createdAt,
|
||||
});
|
||||
|
||||
@@ -56,12 +58,14 @@ class CreateGroupRequest {
|
||||
final String name;
|
||||
final String? description;
|
||||
final String userId;
|
||||
final String workspaceId;
|
||||
final List<Recipient> recipients;
|
||||
|
||||
const CreateGroupRequest({
|
||||
required this.name,
|
||||
this.description,
|
||||
required this.userId,
|
||||
required this.workspaceId,
|
||||
required this.recipients,
|
||||
});
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ RecipientGroup _$RecipientGroupFromJson(Map<String, dynamic> json) =>
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String?,
|
||||
userId: json['userId'] as String?,
|
||||
workspaceId: json['workspaceId'] as String?,
|
||||
createdAt: json['createdAt'] as String?,
|
||||
);
|
||||
|
||||
@@ -21,6 +22,7 @@ Map<String, dynamic> _$RecipientGroupToJson(RecipientGroup instance) =>
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'createdAt': instance.createdAt,
|
||||
};
|
||||
|
||||
@@ -53,6 +55,7 @@ CreateGroupRequest _$CreateGroupRequestFromJson(Map<String, dynamic> json) =>
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String?,
|
||||
userId: json['userId'] as String,
|
||||
workspaceId: json['workspaceId'] as String,
|
||||
recipients: (json['recipients'] as List<dynamic>)
|
||||
.map((e) => Recipient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
@@ -63,5 +66,6 @@ Map<String, dynamic> _$CreateGroupRequestToJson(CreateGroupRequest instance) =>
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'userId': instance.userId,
|
||||
'workspaceId': instance.workspaceId,
|
||||
'recipients': instance.recipients.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user