""" Options: Date: 2024-11-21 13:15:55 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: CompanyBillingInformation.* #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 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseModel: pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BillingMethodCountriesRelation(BaseModel): # @Required() billing_method_id: int = 0 # @Required() country_id: Optional[str] = None modified_date: Optional[datetime.datetime] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BillingMethod(BaseModel): billing_method_countries_relation: Optional[List[BillingMethodCountriesRelation]] = None # @Required() name: Optional[str] = None # @Required() description: Optional[str] = None modified_date: Optional[datetime.datetime] = None id: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BillingMethodQueryResponse: # @ApiMember(Description="The billing method id") id: int = 0 """ The billing method id """ # @ApiMember(Description="The billing method name") name: Optional[str] = None """ The billing method name """ # @ApiMember(Description="The billing method description") description: Optional[str] = None """ The billing method description """ # @ApiMember(Description="The billing method is valid for the following countries") countries: Optional[List[str]] = None """ The billing method is valid for the following countries """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BillingInformation(BaseModel): billing_method: Optional[BillingMethod] = None # @Required() billing_method_id: int = 0 # @Required() name: Optional[str] = None attention: Optional[str] = None street1: Optional[str] = None street2: Optional[str] = None zip_code: Optional[str] = None city: Optional[str] = None email: Optional[str] = None credit_card: Optional[str] = None credit_card_holder: Optional[str] = None credit_card_number: Optional[str] = None valid_to_year: Optional[int] = None valid_to_month: Optional[int] = None csv: Optional[str] = None # @Required() updated: datetime.datetime = datetime.datetime(1, 1, 1) # @Required() created: datetime.datetime = datetime.datetime(1, 1, 1) # @Required() country_id: Optional[str] = None # @Required() payment_terms_days: int = 0 vat_registration_number: Optional[str] = None gln: Optional[str] = None reference_line1: Optional[str] = None reference_line2: Optional[str] = None modified_date: Optional[datetime.datetime] = None # @Required() id: Optional[str] = None # @Route("/billing/company", "GET") # @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) # @ValidateRequest(Validator="IsAuthenticated") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CompanyBillingInformation(QueryDb2[BillingInformation, BillingMethodQueryResponse], IReturn[QueryResponse[BillingMethodQueryResponse]]): # @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") company_id: Optional[str] = None """ The company id, if empty will use the company id for the user you are logged in with. """ # @ApiMember(DataType="boolean", Description="If you want to include the billing methods to select from", ParameterType="query") include_billing_method_options: bool = False """ If you want to include the billing methods to select from """