/* Options: Date: 2024-11-23 09:04:45 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: UpdateBillingInformation.* //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 BillingMethodCountriesRelation extends BaseModel implements IConvertible { // @Required() int? BillingMethodId; // @Required() String? CountryId; DateTime? ModifiedDate; BillingMethodCountriesRelation({this.BillingMethodId,this.CountryId,this.ModifiedDate}); BillingMethodCountriesRelation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); BillingMethodId = json['BillingMethodId']; CountryId = json['CountryId']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'BillingMethodId': BillingMethodId, 'CountryId': CountryId, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "BillingMethodCountriesRelation"; TypeContext? context = _ctx; } class BillingMethod extends BaseModel implements IConvertible { List? BillingMethodCountriesRelation; // @Required() String? Name; // @Required() String? Description; DateTime? ModifiedDate; int? Id; BillingMethod({this.BillingMethodCountriesRelation,this.Name,this.Description,this.ModifiedDate,this.Id}); BillingMethod.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); BillingMethodCountriesRelation = JsonConverters.fromJson(json['BillingMethodCountriesRelation'],'List',context!); Name = json['Name']; Description = json['Description']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'BillingMethodCountriesRelation': JsonConverters.toJson(BillingMethodCountriesRelation,'List',context!), 'Name': Name, 'Description': Description, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "BillingMethod"; TypeContext? context = _ctx; } class BillingInformationResponse implements IConvertible { /** * The company id. */ // @ApiMember(Description="The company id.") String? CompanyId; /** * The prefered billing method. */ // @ApiMember(Description="The prefered billing method.", IsRequired=true) int? BillingMethodId; /** * The name that should be printed on the billing information, normally this would be your company name. */ // @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.") String? Name; /** * If you want to add the attention to the billing address. */ // @ApiMember(Description="If you want to add the attention to the billing address.") String? Attention; /** * The street for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.") String? Street1; /** * The street for the billing adress. */ // @ApiMember(Description="The street for the billing adress.") String? Street2; /** * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.") String? ZipCode; /** * The city for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.") String? City; /** * The country for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.") String? CountryId; /** * The billing email. This is required when having email invoice as billing method. */ // @ApiMember(Description="The billing email. This is required when having email invoice as billing method.") String? Email; /** * The company global location number. */ // @ApiMember(Description="The company global location number.") String? GLN; /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") String? ReferenceLine1; /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") String? ReferenceLine2; /** * The billing payment terms in days. This is default 15 days. */ // @ApiMember(Description="The billing payment terms in days. This is default 15 days.") int? PaymentTermsDays; /** * The company vat registration number. */ // @ApiMember(Description="The company vat registration number.") String? VatRegistrationNumber; /** * The billing method options to choose from */ // @ApiMember(Description="The billing method options to choose from") List? BillingMethodOptions; BillingInformationResponse({this.CompanyId,this.BillingMethodId,this.Name,this.Attention,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Email,this.GLN,this.ReferenceLine1,this.ReferenceLine2,this.PaymentTermsDays,this.VatRegistrationNumber,this.BillingMethodOptions}); BillingInformationResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; BillingMethodId = json['BillingMethodId']; Name = json['Name']; Attention = json['Attention']; Street1 = json['Street1']; Street2 = json['Street2']; ZipCode = json['ZipCode']; City = json['City']; CountryId = json['CountryId']; Email = json['Email']; GLN = json['GLN']; ReferenceLine1 = json['ReferenceLine1']; ReferenceLine2 = json['ReferenceLine2']; PaymentTermsDays = json['PaymentTermsDays']; VatRegistrationNumber = json['VatRegistrationNumber']; BillingMethodOptions = JsonConverters.fromJson(json['BillingMethodOptions'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'BillingMethodId': BillingMethodId, 'Name': Name, 'Attention': Attention, 'Street1': Street1, 'Street2': Street2, 'ZipCode': ZipCode, 'City': City, 'CountryId': CountryId, 'Email': Email, 'GLN': GLN, 'ReferenceLine1': ReferenceLine1, 'ReferenceLine2': ReferenceLine2, 'PaymentTermsDays': PaymentTermsDays, 'VatRegistrationNumber': VatRegistrationNumber, 'BillingMethodOptions': JsonConverters.toJson(BillingMethodOptions,'List',context!) }; getTypeName() => "BillingInformationResponse"; TypeContext? context = _ctx; } // @Route("/billing/company/", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateBillingInformation implements IReturn, ICompany, IConvertible, IPut { /** * 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 prefered billing method. */ // @ApiMember(Description="The prefered billing method.", IsRequired=true) int? BillingMethodId; /** * The name that should be printed on the billing information, normally this would be your company name. */ // @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.") String? Name; /** * If you want to add the attention to the billing address. */ // @ApiMember(Description="If you want to add the attention to the billing address.") String? Attention; /** * The street for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.") String? Street1; /** * The street for the billing adress. */ // @ApiMember(Description="The street for the billing adress.") String? Street2; /** * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.") String? ZipCode; /** * The city for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.") String? City; /** * The country for the billing adress. This is required when having postal invoice as billing method. */ // @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.") String? CountryId; /** * The billing email. This is required when having email invoice as billing method. */ // @ApiMember(Description="The billing email. This is required when having email invoice as billing method.") String? Email; /** * The billing payment terms in days. This is default 15 days. */ // @ApiMember(Description="The billing payment terms in days. This is default 15 days.") int? PaymentTermsDays; /** * The company vat registration number. */ // @ApiMember(Description="The company vat registration number.") String? VatRegistrationNumber; /** * The company global location number. */ // @ApiMember(Description="The company global location number.") String? GLN; /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") String? ReferenceLine1; /** * You're internal rereference. */ // @ApiMember(Description="You're internal rereference.") String? ReferenceLine2; UpdateBillingInformation({this.CompanyId,this.BillingMethodId,this.Name,this.Attention,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Email,this.PaymentTermsDays,this.VatRegistrationNumber,this.GLN,this.ReferenceLine1,this.ReferenceLine2}); UpdateBillingInformation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; BillingMethodId = json['BillingMethodId']; Name = json['Name']; Attention = json['Attention']; Street1 = json['Street1']; Street2 = json['Street2']; ZipCode = json['ZipCode']; City = json['City']; CountryId = json['CountryId']; Email = json['Email']; PaymentTermsDays = json['PaymentTermsDays']; VatRegistrationNumber = json['VatRegistrationNumber']; GLN = json['GLN']; ReferenceLine1 = json['ReferenceLine1']; ReferenceLine2 = json['ReferenceLine2']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'BillingMethodId': BillingMethodId, 'Name': Name, 'Attention': Attention, 'Street1': Street1, 'Street2': Street2, 'ZipCode': ZipCode, 'City': City, 'CountryId': CountryId, 'Email': Email, 'PaymentTermsDays': PaymentTermsDays, 'VatRegistrationNumber': VatRegistrationNumber, 'GLN': GLN, 'ReferenceLine1': ReferenceLine1, 'ReferenceLine2': ReferenceLine2 }; createResponse() => BillingInformationResponse(); getResponseTypeName() => "BillingInformationResponse"; getTypeName() => "UpdateBillingInformation"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'BillingMethodCountriesRelation': TypeInfo(TypeOf.Class, create:() => BillingMethodCountriesRelation()), 'BillingMethod': TypeInfo(TypeOf.Class, create:() => BillingMethod()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'BillingInformationResponse': TypeInfo(TypeOf.Class, create:() => BillingInformationResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateBillingInformation': TypeInfo(TypeOf.Class, create:() => UpdateBillingInformation()), });