/* Options: Date: 2024-11-21 13:01:12 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: CreateRebateCodeTransaction.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class RebateCodeServiceResponse implements IConvertible { int? Id; String? Name; String? Description; bool? Active; RebateCodeServiceResponse({this.Id,this.Name,this.Description,this.Active}); RebateCodeServiceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Active = json['Active']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Active': Active }; getTypeName() => "RebateCodeServiceResponse"; TypeContext? context = _ctx; } class RebateCodeCustomerResponse implements IConvertible { String? Id; String? Firstname; String? Lastname; String? Email; String? Phone; String? ImageUrl; RebateCodeCustomerResponse({this.Id,this.Firstname,this.Lastname,this.Email,this.Phone,this.ImageUrl}); RebateCodeCustomerResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; ImageUrl = json['ImageUrl']; return this; } Map toJson() => { 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone, 'ImageUrl': ImageUrl }; getTypeName() => "RebateCodeCustomerResponse"; TypeContext? context = _ctx; } class RebateCodeTransactionQueryResponse implements IConvertible { int? Id; String? CompanyId; String? Note; int? RebateCodeId; String? RebateCodeSign; int? RebateCodeTypeId; String? RebateCodeTypeName; double? Amount; int? BookingId; DateTime? UpdatedDate; DateTime? CreatedDate; RebateCodeServiceResponse? Service; RebateCodeCustomerResponse? Customer; String? PriceSign; RebateCodeTransactionQueryResponse({this.Id,this.CompanyId,this.Note,this.RebateCodeId,this.RebateCodeSign,this.RebateCodeTypeId,this.RebateCodeTypeName,this.Amount,this.BookingId,this.UpdatedDate,this.CreatedDate,this.Service,this.Customer,this.PriceSign}); RebateCodeTransactionQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Note = json['Note']; RebateCodeId = json['RebateCodeId']; RebateCodeSign = json['RebateCodeSign']; RebateCodeTypeId = json['RebateCodeTypeId']; RebateCodeTypeName = json['RebateCodeTypeName']; Amount = JsonConverters.toDouble(json['Amount']); BookingId = json['BookingId']; UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); Service = JsonConverters.fromJson(json['Service'],'RebateCodeServiceResponse',context!); Customer = JsonConverters.fromJson(json['Customer'],'RebateCodeCustomerResponse',context!); PriceSign = json['PriceSign']; return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Note': Note, 'RebateCodeId': RebateCodeId, 'RebateCodeSign': RebateCodeSign, 'RebateCodeTypeId': RebateCodeTypeId, 'RebateCodeTypeName': RebateCodeTypeName, 'Amount': Amount, 'BookingId': BookingId, 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'Service': JsonConverters.toJson(Service,'RebateCodeServiceResponse',context!), 'Customer': JsonConverters.toJson(Customer,'RebateCodeCustomerResponse',context!), 'PriceSign': PriceSign }; getTypeName() => "RebateCodeTransactionQueryResponse"; TypeContext? context = _ctx; } enum AmountChangeType { Increase, Decrease, } class RebateCodeTransactionResponse implements IConvertible { ResponseStatus? ResponseStatus; RebateCodeTransactionQueryResponse? RebateCodeTransactionItem; RebateCodeTransactionResponse({this.ResponseStatus,this.RebateCodeTransactionItem}); RebateCodeTransactionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); RebateCodeTransactionItem = JsonConverters.fromJson(json['RebateCodeTransactionItem'],'RebateCodeTransactionQueryResponse',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'RebateCodeTransactionItem': JsonConverters.toJson(RebateCodeTransactionItem,'RebateCodeTransactionQueryResponse',context!) }; getTypeName() => "RebateCodeTransactionResponse"; TypeContext? context = _ctx; } // @Route("/rebatecodes/transactions", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CreateRebateCodeTransaction implements IReturn, IConvertible, IPost { /** * */ // @ApiMember(Description="", IsRequired=true) String? CompanyId; /** * Rebate code id to which you wish to add transaction */ // @ApiMember(Description="Rebate code id to which you wish to add transaction", IsRequired=true) int? RebateCodeId; // @ApiMember(IsRequired=true) double? Amount; // @ApiMember(IsRequired=true) int? Usage; // @ApiMember() int? BookingId; /** * If you want to Increase = 0 or Decrease = 1 the value */ // @ApiMember(Description="If you want to Increase = 0 or Decrease = 1 the value", IsRequired=true) AmountChangeType? ChangeType; CreateRebateCodeTransaction({this.CompanyId,this.RebateCodeId,this.Amount,this.Usage,this.BookingId,this.ChangeType}); CreateRebateCodeTransaction.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; RebateCodeId = json['RebateCodeId']; Amount = JsonConverters.toDouble(json['Amount']); Usage = json['Usage']; BookingId = json['BookingId']; ChangeType = JsonConverters.fromJson(json['ChangeType'],'AmountChangeType',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'RebateCodeId': RebateCodeId, 'Amount': Amount, 'Usage': Usage, 'BookingId': BookingId, 'ChangeType': JsonConverters.toJson(ChangeType,'AmountChangeType',context!) }; createResponse() => RebateCodeTransactionResponse(); getResponseTypeName() => "RebateCodeTransactionResponse"; getTypeName() => "CreateRebateCodeTransaction"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'RebateCodeServiceResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeServiceResponse()), 'RebateCodeCustomerResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeCustomerResponse()), 'RebateCodeTransactionQueryResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeTransactionQueryResponse()), 'AmountChangeType': TypeInfo(TypeOf.Enum, enumValues:AmountChangeType.values), 'RebateCodeTransactionResponse': TypeInfo(TypeOf.Class, create:() => RebateCodeTransactionResponse()), 'CreateRebateCodeTransaction': TypeInfo(TypeOf.Class, create:() => CreateRebateCodeTransaction()), });