/* Options: Date: 2024-11-21 12:48:35 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: CompanyCreditCardInformation.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class CreditCard extends BaseModel implements IConvertible { // @Ignore() bool? IsValid; // @Required() String? CompanyId; int? Id; // @Required() String? Name; // @Required() bool? Active; // @Required() String? Type; // @Required() String? ExpYear; // @Required() String? ExpMonth; // @Required() String? TicketId; DateTime? Updated; DateTime? Created; DateTime? ModifiedDate; CreditCard({this.IsValid,this.CompanyId,this.Id,this.Name,this.Active,this.Type,this.ExpYear,this.ExpMonth,this.TicketId,this.Updated,this.Created,this.ModifiedDate}); CreditCard.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); IsValid = json['IsValid']; CompanyId = json['CompanyId']; Id = json['Id']; Name = json['Name']; Active = json['Active']; Type = json['Type']; ExpYear = json['ExpYear']; ExpMonth = json['ExpMonth']; TicketId = json['TicketId']; Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'IsValid': IsValid, 'CompanyId': CompanyId, 'Id': Id, 'Name': Name, 'Active': Active, 'Type': Type, 'ExpYear': ExpYear, 'ExpMonth': ExpMonth, 'TicketId': TicketId, 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CreditCard"; TypeContext? context = _ctx; } class CompanyCreditCardQueryResponse implements IConvertible { /** * The credit card id */ // @ApiMember(Description="The credit card id") int? Id; /** * The credit card name */ // @ApiMember(Description="The credit card name") String? Name; /** * If the credit card is active */ // @ApiMember(Description="If the credit card is active") bool? Active; /** * If the credit card is valid (active and not expired) */ // @ApiMember(Description="If the credit card is valid (active and not expired)") bool? IsValid; /** * The credit card type */ // @ApiMember(Description="The credit card type") String? Type; /** * The credit card expiration Year */ // @ApiMember(Description="The credit card expiration Year") String? ExpYear; /** * The credit card expiration month */ // @ApiMember(Description="The credit card expiration month") String? ExpMonth; /** * The credit card ticket name. This is secret information and won't be displayed */ // @ApiMember(Description="The credit card ticket name. This is secret information and won't be displayed") String? TicketId; /** * The date when the credit card was saved. */ // @ApiMember(Description="The date when the credit card was saved.") DateTime? Created; /** * The date when the credit card was updated. */ // @ApiMember(Description="The date when the credit card was updated.") DateTime? Updated; CompanyCreditCardQueryResponse({this.Id,this.Name,this.Active,this.IsValid,this.Type,this.ExpYear,this.ExpMonth,this.TicketId,this.Created,this.Updated}); CompanyCreditCardQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Active = json['Active']; IsValid = json['IsValid']; Type = json['Type']; ExpYear = json['ExpYear']; ExpMonth = json['ExpMonth']; TicketId = json['TicketId']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Active': Active, 'IsValid': IsValid, 'Type': Type, 'ExpYear': ExpYear, 'ExpMonth': ExpMonth, 'TicketId': TicketId, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'Updated': JsonConverters.toJson(Updated,'DateTime',context!) }; getTypeName() => "CompanyCreditCardQueryResponse"; TypeContext? context = _ctx; } // @Route("/billing/company/creditcard", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CompanyCreditCardInformation extends QueryDb2 implements IReturn>, ICompany, IConvertible, IGet { /** * 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; /** * If you want to include only active credit cards */ // @ApiMember(DataType="boolean", Description="If you want to include only active credit cards", ParameterType="query") bool? Active; /** * If you want to include only valid credit cards (not expired and valid) */ // @ApiMember(DataType="boolean", Description="If you want to include only valid credit cards (not expired and valid)", ParameterType="query") bool? IsValid; CompanyCreditCardInformation({this.CompanyId,this.Active,this.IsValid}); CompanyCreditCardInformation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Active = json['Active']; IsValid = json['IsValid']; return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Active': Active, 'IsValid': IsValid }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "CompanyCreditCardInformation"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'CreditCard': TypeInfo(TypeOf.Class, create:() => CreditCard()), 'CompanyCreditCardQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyCreditCardQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'CompanyCreditCardInformation': TypeInfo(TypeOf.Class, create:() => CompanyCreditCardInformation()), 'List': TypeInfo(TypeOf.Class, create:() => []), });