/* Options: Date: 2024-11-21 12:41:53 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: SendNewsLetter.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class SendNewslettersResponse implements IConvertible { /** * The number of messages that are added into queue. */ // @ApiMember(Description="The number of messages that are added into queue.") int? Total; /** * Send Method. 1 = Email, 2 = SMS */ // @ApiMember(Description="Send Method. 1 = Email, 2 = SMS") int? SendMethodId; /** * Message example sent (in HTML format) */ // @ApiMember(Description="Message example sent (in HTML format)") String? MessageExample; SendNewslettersResponse({this.Total,this.SendMethodId,this.MessageExample}); SendNewslettersResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Total = json['Total']; SendMethodId = json['SendMethodId']; MessageExample = json['MessageExample']; return this; } Map toJson() => { 'Total': Total, 'SendMethodId': SendMethodId, 'MessageExample': MessageExample }; getTypeName() => "SendNewslettersResponse"; TypeContext? context = _ctx; } // @Route("/newsletter/send", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class SendNewsLetter implements IReturn, ICompany, IConvertible, IPost { /** * The newsletter template id. */ // @ApiMember(Description="The newsletter template id.", IsRequired=true) int? Id; /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") String? CompanyId; /** * The datetime when the newsletters should be sent. */ // @ApiMember(Description="The datetime when the newsletters should be sent.", IsRequired=true) DateTime? SendDate; /** * The customer ids to send newsletters to. */ // @ApiMember(Description="The customer ids to send newsletters to.", IsRequired=true) List? Customers; SendNewsLetter({this.Id,this.CompanyId,this.SendDate,this.Customers}); SendNewsLetter.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; SendDate = JsonConverters.fromJson(json['SendDate'],'DateTime',context!); Customers = JsonConverters.fromJson(json['Customers'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'SendDate': JsonConverters.toJson(SendDate,'DateTime',context!), 'Customers': JsonConverters.toJson(Customers,'List',context!) }; createResponse() => SendNewslettersResponse(); getResponseTypeName() => "SendNewslettersResponse"; getTypeName() => "SendNewsLetter"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'SendNewslettersResponse': TypeInfo(TypeOf.Class, create:() => SendNewslettersResponse()), 'SendNewsLetter': TypeInfo(TypeOf.Class, create:() => SendNewsLetter()), });