""" Options: Date: 2025-12-14 05:12:45 Version: 8.80 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://api.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: UpdateVossSubscriptions.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum class PeriodKindEnum(str, Enum): FIXED_TIME = 'FixedTime' ALIGNED_TO_BINDING_PERIOD = 'AlignedToBindingPeriod' ALIGNED_TO_SUBSCRIPTION_BILLING_PERIOD = 'AlignedToSubscriptionBillingPeriod' class UnitEnum(str, Enum): DAY = 'Day' MONTH = 'Month' YEAR = 'Year' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class DiscountAgreementTimeLengthRequestDto: unit: Optional[UnitEnum] = None value: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SubscriptionDiscountPeriodRequestDto: period_kind: Optional[PeriodKindEnum] = None length: Optional[DiscountAgreementTimeLengthRequestDto] = None period_iteration_count: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SubscriptionDiscountAgreementRequestDto: discount_agreement_id: Optional[str] = None period: Optional[SubscriptionDiscountPeriodRequestDto] = None class DiscountAgreementsChangeTypeEnum(str, Enum): PROSPECTIVE = 'Prospective' RETROSPECTIVE = 'Retrospective' # @Route("/voss/subscriptions", "PUT") # @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UpdateVossSubscriptions: # @ApiMember(Description="The company id. Subscription will be fetched of this company") company_id: Optional[str] = None """ The company id. Subscription will be fetched of this company """ # @ApiMember(Description="Discount agreement data") discount_agreements: List[SubscriptionDiscountAgreementRequestDto] = field(default_factory=list) """ Discount agreement data """ # @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") discount_agreements_change_type: Optional[DiscountAgreementsChangeTypeEnum] = None """ 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="The company id. Subscription will be fetched of this company") company_owner_id: int = 0 """ The company id. Subscription will be fetched of this company """