/* Options: Date: 2025-07-01 17:10:44 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: UpdateVossSubscriptions.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/voss/subscriptions", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) public class UpdateVossSubscriptions : Codable { /** * The company id. Subscription will be fetched of this company */ // @ApiMember(Description="The company id. Subscription will be fetched of this company") public var companyId:String /** * Discount agreement data */ // @ApiMember(Description="Discount agreement data") public var discountAgreements:[SubscriptionDiscountAgreementRequestDto] = [] /** * 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") public var discountAgreementsChangeType:DiscountAgreementsChangeTypeEnum /** * The company id. Subscription will be fetched of this company */ // @ApiMember(Description="The company id. Subscription will be fetched of this company") public var companyOwnerId:Int required public init(){} } // @DataContract(Name="SubscriptionDiscountAgreementRequestDto") public class SubscriptionDiscountAgreementRequestDto : Codable { // @DataMember(Name="discountAgreementId", IsRequired=true) public var discountAgreementId:String // @DataMember(Name="period") public var period:SubscriptionDiscountPeriodRequestDto required public init(){} } public enum DiscountAgreementsChangeTypeEnum : String, Codable { case Prospective case Retrospective } // @DataContract(Name="SubscriptionDiscountPeriodRequestDto") public class SubscriptionDiscountPeriodRequestDto : Codable { // @DataMember(Name="periodKind", IsRequired=true) public var periodKind:PeriodKindEnum // @DataMember(Name="length") public var length:DiscountAgreementTimeLengthRequestDto // @DataMember(Name="periodIterationCount") public var periodIterationCount:Int? required public init(){} } public enum PeriodKindEnum : String, Codable { case FixedTime case AlignedToBindingPeriod case AlignedToSubscriptionBillingPeriod } // @DataContract(Name="DiscountAgreementTimeLengthRequestDto") public class DiscountAgreementTimeLengthRequestDto : Codable { // @DataMember(Name="unit", IsRequired=true) public var unit:UnitEnum // @DataMember(Name="value", IsRequired=true) public var value:Int required public init(){} } public enum UnitEnum : String, Codable { case Day case Month case Year }