""" Options: Date: 2026-09-23 02:15:42 Version: 10.05 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://testapi.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: UpdateArticleMappings.* #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 Object = TypeVar('Object') class ICompany: company_id: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ArticleMappingToHandle: # @ApiMember(Description="The id of an existing mapping to update; leave empty to create a new one") id: Optional[str] = None """ The id of an existing mapping to update; leave empty to create a new one """ # @ApiMember(Description="The BokaMera article id") article_id: int = 0 """ The BokaMera article id """ # @ApiMember(Description="The Reference Type: StripeArticle = 1, EAccountingArticle = 2") reference_type: Optional[str] = None """ The Reference Type: StripeArticle = 1, EAccountingArticle = 2 """ # @ApiMember(Description="The external reference; Values for EAccountingArticle, StripeArticle") external_reference: Optional[str] = None """ The external reference; Values for EAccountingArticle, StripeArticle """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ArticleMappingResponse: # @ApiMember(Description="The company id") company_id: Optional[str] = None """ The company id """ # @ApiMember(Description="The id") id: Optional[str] = None """ The id """ # @ApiMember(Description="The BokaMera article id") article_id: int = 0 """ The BokaMera article id """ # @ApiMember(Description="The external reference") external_reference: Optional[str] = None """ The external reference """ # @ApiMember(Description="The Reference Type") reference_type: Optional[str] = None """ The Reference Type """ # @Route("/articles/mappings", "PUT") # @ValidateRequest(Validator="IsAuthenticated") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UpdateArticleMappings(IReturn[List[ArticleMappingResponse]], ICompany): # @ApiMember(Description="Company to update article mappings for") company_id: Optional[str] = None """ Company to update article mappings for """ # @ApiMember(Description="The article mappings to create or update", IsRequired=true) article_mappings: List[ArticleMappingToHandle] = field(default_factory=list) """ The article mappings to create or update """