/* Options: Date: 2025-07-01 17:40:04 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateVossSubscriptions.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum PeriodKindEnum { FixedTime, AlignedToBindingPeriod, AlignedToSubscriptionBillingPeriod, } enum UnitEnum { Day, Month, Year, } // @DataContract(Name="DiscountAgreementTimeLengthRequestDto") class DiscountAgreementTimeLengthRequestDto implements IConvertible { // @DataMember(Name="unit", IsRequired=true) UnitEnum? unit; // @DataMember(Name="value", IsRequired=true) int? value; DiscountAgreementTimeLengthRequestDto({this.unit,this.value}); DiscountAgreementTimeLengthRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { unit = JsonConverters.fromJson(json['Unit'],'UnitEnum',context!); value = json['Value']; return this; } Map toJson() => { 'unit': JsonConverters.toJson(unit,'UnitEnum',context!), 'value': value }; getTypeName() => "DiscountAgreementTimeLengthRequestDto"; TypeContext? context = _ctx; } // @DataContract(Name="SubscriptionDiscountPeriodRequestDto") class SubscriptionDiscountPeriodRequestDto implements IConvertible { // @DataMember(Name="periodKind", IsRequired=true) PeriodKindEnum? periodKind; // @DataMember(Name="length") DiscountAgreementTimeLengthRequestDto? length; // @DataMember(Name="periodIterationCount") int? periodIterationCount; SubscriptionDiscountPeriodRequestDto({this.periodKind,this.length,this.periodIterationCount}); SubscriptionDiscountPeriodRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { periodKind = JsonConverters.fromJson(json['PeriodKind'],'PeriodKindEnum',context!); length = JsonConverters.fromJson(json['Length'],'DiscountAgreementTimeLengthRequestDto',context!); periodIterationCount = json['PeriodIterationCount']; return this; } Map toJson() => { 'periodKind': JsonConverters.toJson(periodKind,'PeriodKindEnum',context!), 'length': JsonConverters.toJson(length,'DiscountAgreementTimeLengthRequestDto',context!), 'periodIterationCount': periodIterationCount }; getTypeName() => "SubscriptionDiscountPeriodRequestDto"; TypeContext? context = _ctx; } // @DataContract(Name="SubscriptionDiscountAgreementRequestDto") class SubscriptionDiscountAgreementRequestDto implements IConvertible { // @DataMember(Name="discountAgreementId", IsRequired=true) String? discountAgreementId; // @DataMember(Name="period") SubscriptionDiscountPeriodRequestDto? period; SubscriptionDiscountAgreementRequestDto({this.discountAgreementId,this.period}); SubscriptionDiscountAgreementRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { discountAgreementId = json['DiscountAgreementId']; period = JsonConverters.fromJson(json['Period'],'SubscriptionDiscountPeriodRequestDto',context!); return this; } Map toJson() => { 'discountAgreementId': discountAgreementId, 'period': JsonConverters.toJson(period,'SubscriptionDiscountPeriodRequestDto',context!) }; getTypeName() => "SubscriptionDiscountAgreementRequestDto"; TypeContext? context = _ctx; } enum DiscountAgreementsChangeTypeEnum { Prospective, Retrospective, } // @Route("/voss/subscriptions", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class UpdateVossSubscriptions implements IConvertible, IPut { /** * The company id. Subscription will be fetched of this company */ // @ApiMember(Description="The company id. Subscription will be fetched of this company") String? CompanyId; /** * Discount agreement data */ // @ApiMember(Description="Discount agreement data") List? DiscountAgreements; /** * Discount agreements change type controls how already occured transactions are treated <br />Retrospective - all future and past not invoiced transactions will be recalculated with new discount agreements <br />Prospective - discounts will apply only for future transactions */ // @ApiMember(Description=" Discount agreements change type controls how already occured transactions are treated <br />Retrospective - all future and past not invoiced transactions will be recalculated with new discount agreements <br />Prospective - discounts will apply only for future transactions\n") DiscountAgreementsChangeTypeEnum? DiscountAgreementsChangeType; /** * The company id. Subscription will be fetched of this company */ // @ApiMember(Description="The company id. Subscription will be fetched of this company") int? CompanyOwnerId; UpdateVossSubscriptions({this.CompanyId,this.DiscountAgreements,this.DiscountAgreementsChangeType,this.CompanyOwnerId}); UpdateVossSubscriptions.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; DiscountAgreements = JsonConverters.fromJson(json['DiscountAgreements'],'List',context!); DiscountAgreementsChangeType = JsonConverters.fromJson(json['DiscountAgreementsChangeType'],'DiscountAgreementsChangeTypeEnum',context!); CompanyOwnerId = json['CompanyOwnerId']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'DiscountAgreements': JsonConverters.toJson(DiscountAgreements,'List',context!), 'DiscountAgreementsChangeType': JsonConverters.toJson(DiscountAgreementsChangeType,'DiscountAgreementsChangeTypeEnum',context!), 'CompanyOwnerId': CompanyOwnerId }; getTypeName() => "UpdateVossSubscriptions"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'PeriodKindEnum': TypeInfo(TypeOf.Enum, enumValues:PeriodKindEnum.values), 'UnitEnum': TypeInfo(TypeOf.Enum, enumValues:UnitEnum.values), 'DiscountAgreementTimeLengthRequestDto': TypeInfo(TypeOf.Class, create:() => DiscountAgreementTimeLengthRequestDto()), 'SubscriptionDiscountPeriodRequestDto': TypeInfo(TypeOf.Class, create:() => SubscriptionDiscountPeriodRequestDto()), 'SubscriptionDiscountAgreementRequestDto': TypeInfo(TypeOf.Class, create:() => SubscriptionDiscountAgreementRequestDto()), 'DiscountAgreementsChangeTypeEnum': TypeInfo(TypeOf.Enum, enumValues:DiscountAgreementsChangeTypeEnum.values), 'UpdateVossSubscriptions': TypeInfo(TypeOf.Class, create:() => UpdateVossSubscriptions()), 'List': TypeInfo(TypeOf.Class, create:() => []), });