/* Options: Date: 2024-12-15 19:45:22 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://staging-api.billiecart.com.au //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateContributionRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class PostOperationUnTenanted implements IPost { PostOperationUnTenanted(); PostOperationUnTenanted.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "PostOperationUnTenanted<$TResponse>"; TypeContext? context = _ctx; } abstract class PostOperationTenanted extends PostOperationUnTenanted implements ITenantedRequest { String? organisationId; PostOperationTenanted({this.organisationId}); PostOperationTenanted.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); organisationId = json['organisationId']; return this; } Map toJson() => super.toJson()..addAll({ 'organisationId': organisationId }); getTypeName() => "PostOperationTenanted<$TResponse>"; TypeContext? context = _ctx; } abstract class ITenantedRequest { String? organisationId; } class Contribution implements IIdentifiableResource, IConvertible { String? employerId; String? employerName; double? amount; DateTime? paymentDate; bool? distributed; String? id; Contribution({this.employerId,this.employerName,this.amount,this.paymentDate,this.distributed,this.id}); Contribution.fromJson(Map json) { fromMap(json); } fromMap(Map json) { employerId = json['employerId']; employerName = json['employerName']; amount = JsonConverters.toDouble(json['amount']); paymentDate = JsonConverters.fromJson(json['paymentDate'],'DateTime',context!); distributed = json['distributed']; id = json['id']; return this; } Map toJson() => { 'employerId': employerId, 'employerName': employerName, 'amount': amount, 'paymentDate': JsonConverters.toJson(paymentDate,'DateTime',context!), 'distributed': distributed, 'id': id }; getTypeName() => "Contribution"; TypeContext? context = _ctx; } abstract class IIdentifiableResource { String? id; } class CreateContributionResponse implements IConvertible { ResponseStatus? responseStatus; Contribution? contribution; CreateContributionResponse({this.responseStatus,this.contribution}); CreateContributionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); contribution = JsonConverters.fromJson(json['contribution'],'Contribution',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!), 'contribution': JsonConverters.toJson(contribution,'Contribution',context!) }; getTypeName() => "CreateContributionResponse"; TypeContext? context = _ctx; } // @Route("/contributions", "POST") class CreateContributionRequest extends PostOperationTenanted implements IReturn, IConvertible { double? amount; DateTime? paymentDate; String? employerId; CreateContributionRequest({this.amount,this.paymentDate,this.employerId}); CreateContributionRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); amount = JsonConverters.toDouble(json['amount']); paymentDate = JsonConverters.fromJson(json['paymentDate'],'DateTime',context!); employerId = json['employerId']; return this; } Map toJson() => super.toJson()..addAll({ 'amount': amount, 'paymentDate': JsonConverters.toJson(paymentDate,'DateTime',context!), 'employerId': employerId }); createResponse() => CreateContributionResponse(); getResponseTypeName() => "CreateContributionResponse"; getTypeName() => "CreateContributionRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'staging_api.billiecart.com.au', types: { 'PostOperationUnTenanted': TypeInfo(TypeOf.AbstractClass), 'PostOperationTenanted': TypeInfo(TypeOf.AbstractClass), 'ITenantedRequest': TypeInfo(TypeOf.Interface), 'Contribution': TypeInfo(TypeOf.Class, create:() => Contribution()), 'IIdentifiableResource': TypeInfo(TypeOf.Interface), 'CreateContributionResponse': TypeInfo(TypeOf.Class, create:() => CreateContributionResponse()), 'CreateContributionRequest': TypeInfo(TypeOf.Class, create:() => CreateContributionRequest()), });