/* Options: Date: 2024-07-06 12:44:15 Version: 5.140 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://wp-cddws-test.worldpay.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CompaniesHouseRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class CompaniesHouseAddress implements IConvertible { String? address1; String? address2; String? address3; String? city; String? postcode; CompaniesHouseAddress({this.address1,this.address2,this.address3,this.city,this.postcode}); CompaniesHouseAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { address1 = json['address1']; address2 = json['address2']; address3 = json['address3']; city = json['city']; postcode = json['postcode']; return this; } Map toJson() => { 'address1': address1, 'address2': address2, 'address3': address3, 'city': city, 'postcode': postcode }; getTypeName() => "CompaniesHouseAddress"; TypeContext? context = _ctx; } class CompaniesHouseIncorporationDate implements IConvertible { int? day; int? month; int? year; CompaniesHouseIncorporationDate({this.day,this.month,this.year}); CompaniesHouseIncorporationDate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { day = json['day']; month = json['month']; year = json['year']; return this; } Map toJson() => { 'day': day, 'month': month, 'year': year }; getTypeName() => "CompaniesHouseIncorporationDate"; TypeContext? context = _ctx; } class CompaniesHouseShareHolderData implements IConvertible { String? title; String? firstName; String? middleNames; String? lastName; double? percentageOfVotingSharesOwned; CompaniesHouseShareHolderData({this.title,this.firstName,this.middleNames,this.lastName,this.percentageOfVotingSharesOwned}); CompaniesHouseShareHolderData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { title = json['title']; firstName = json['firstName']; middleNames = json['middleNames']; lastName = json['lastName']; percentageOfVotingSharesOwned = JsonConverters.toDouble(json['percentageOfVotingSharesOwned']); return this; } Map toJson() => { 'title': title, 'firstName': firstName, 'middleNames': middleNames, 'lastName': lastName, 'percentageOfVotingSharesOwned': percentageOfVotingSharesOwned }; getTypeName() => "CompaniesHouseShareHolderData"; TypeContext? context = _ctx; } class CompaniesHouseDirectorsData implements IConvertible { String? title; String? firstName; String? middleNames; String? lastName; CompaniesHouseDirectorsData({this.title,this.firstName,this.middleNames,this.lastName}); CompaniesHouseDirectorsData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { title = json['title']; firstName = json['firstName']; middleNames = json['middleNames']; lastName = json['lastName']; return this; } Map toJson() => { 'title': title, 'firstName': firstName, 'middleNames': middleNames, 'lastName': lastName }; getTypeName() => "CompaniesHouseDirectorsData"; TypeContext? context = _ctx; } class CompaniesHouseData implements IConvertible { String? registeredName; CompaniesHouseAddress? address; CompaniesHouseIncorporationDate? dateOfIncorporation; List? shareHolders; List? directors; CompaniesHouseData({this.registeredName,this.address,this.dateOfIncorporation,this.shareHolders,this.directors}); CompaniesHouseData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { registeredName = json['registeredName']; address = JsonConverters.fromJson(json['address'],'CompaniesHouseAddress',context!); dateOfIncorporation = JsonConverters.fromJson(json['dateOfIncorporation'],'CompaniesHouseIncorporationDate',context!); shareHolders = JsonConverters.fromJson(json['shareHolders'],'List',context!); directors = JsonConverters.fromJson(json['directors'],'List',context!); return this; } Map toJson() => { 'registeredName': registeredName, 'address': JsonConverters.toJson(address,'CompaniesHouseAddress',context!), 'dateOfIncorporation': JsonConverters.toJson(dateOfIncorporation,'CompaniesHouseIncorporationDate',context!), 'shareHolders': JsonConverters.toJson(shareHolders,'List',context!), 'directors': JsonConverters.toJson(directors,'List',context!) }; getTypeName() => "CompaniesHouseData"; TypeContext? context = _ctx; } class CompaniesHouseResponse implements IConvertible { /** * Contains the companies house lookup result when successful. */ CompaniesHouseData? Result; /** * Contains response status, details and errors. */ ResponseStatus? ResponseStatus; CompaniesHouseResponse({this.Result,this.ResponseStatus}); CompaniesHouseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Result = JsonConverters.fromJson(json['Result'],'CompaniesHouseData',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Result': JsonConverters.toJson(Result,'CompaniesHouseData',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "CompaniesHouseResponse"; TypeContext? context = _ctx; } // @Route("/CompaniesHouse", "GET, POST") // @Route("/CompaniesHouse/{CompanyNumber}", "GET, POST") class CompaniesHouseRequest implements IReturn, IConvertible { /** * The registered company number. */ // @Required() String? CompanyNumber; /** * The Csr of the application (if available). */ String? Csr; CompaniesHouseRequest({this.CompanyNumber,this.Csr}); CompaniesHouseRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyNumber = json['CompanyNumber']; Csr = json['Csr']; return this; } Map toJson() => { 'CompanyNumber': CompanyNumber, 'Csr': Csr }; createResponse() => CompaniesHouseResponse(); getResponseTypeName() => "CompaniesHouseResponse"; getTypeName() => "CompaniesHouseRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'wp_cddws_test.worldpay.com', types: { 'CompaniesHouseAddress': TypeInfo(TypeOf.Class, create:() => CompaniesHouseAddress()), 'CompaniesHouseIncorporationDate': TypeInfo(TypeOf.Class, create:() => CompaniesHouseIncorporationDate()), 'CompaniesHouseShareHolderData': TypeInfo(TypeOf.Class, create:() => CompaniesHouseShareHolderData()), 'CompaniesHouseDirectorsData': TypeInfo(TypeOf.Class, create:() => CompaniesHouseDirectorsData()), 'CompaniesHouseData': TypeInfo(TypeOf.Class, create:() => CompaniesHouseData()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CompaniesHouseResponse': TypeInfo(TypeOf.Class, create:() => CompaniesHouseResponse()), 'CompaniesHouseRequest': TypeInfo(TypeOf.Class, create:() => CompaniesHouseRequest()), });