""" Options: Date: 2024-05-18 17:18:21 Version: 6.50 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://www.clubready.com/api/current #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: CalculatePaymentPlanRequest.* #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 RestrictedResourceType(str, Enum): STORE = 'Store' CHAIN = 'Chain' USER = 'User' UNDEFINED = 'Undefined' class IRestrictedApiRequest(IApiKeyEndpoint): restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None class IApiKeyEndpoint: api_key: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ApiDtoBase: api_key: Optional[str] = None store_id: Optional[int] = None chain_id: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CalculatePaymentPlanRequestDto(ApiDtoBase): installment_plan_id: int = 0 package_id: int = 0 start_date: Optional[datetime.datetime] = None promo_code: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PaymentPlanInstallment: pay_today: bool = False amount: Decimal = decimal.Decimal(0) taxed: bool = False tax_rate: Optional[float] = None tax_amount: Optional[Decimal] = None fee_name: Optional[str] = None due_date: datetime.datetime = datetime.datetime(1, 1, 1) total: Optional[str] = None setup_fee_id: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CalculatePaymentPlanResultDto: plan_total: Optional[str] = None sub_total: Optional[str] = None tax_rate: Optional[float] = None enhancement_fee: Optional[str] = None enhancement_fee_tax_amount: Optional[str] = None tax_enh_fee: bool = False tax: Optional[str] = None total_due_today: Optional[str] = None payments: Optional[List[PaymentPlanInstallment]] = None fees: Optional[List[PaymentPlanInstallment]] = None is_evergreen: bool = False require_payment_profile: bool = False # @Route("/sales/packages/{PackageId}/installments/calculate/{InstallmentPlanId}", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CalculatePaymentPlanRequest(CalculatePaymentPlanRequestDto, IReturn[CalculatePaymentPlanResultDto], IRestrictedApiRequest): # @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") api_key: Optional[str] = None """ Api Key - grants access to resources """ # @ApiMember(DataType="integer", Description="ID # of store to calculate plan for", IsRequired=true, Name="StoreId", ParameterType="query") store_id: Optional[int] = None """ ID # of store to calculate plan for """ # @ApiMember(DataType="integer", Description="Installment Plan to calculate a scheduel for", IsRequired=true, Name="InstallmentPlanId", ParameterType="path") installment_plan_id: int = 0 """ Installment Plan to calculate a scheduel for """ # @ApiMember(DataType="integer", Description="The package to calculate for", IsRequired=true, Name="PackageId", ParameterType="path") package_id: int = 0 """ The package to calculate for """ # @ApiMember(DataType="datetime", Description="Date to calculate schedule from. If not provided, will use today.", Name="StartDate", ParameterType="query") start_date: Optional[datetime.datetime] = None """ Date to calculate schedule from. If not provided, will use today. """ # @ApiMember(DataType="string", Description="Promo code to apply a discount.", Name="PromoCode", ParameterType="query") promo_code: Optional[str] = None """ Promo code to apply a discount. """ restricted_id: Optional[int] = None restricted_resource_type: Optional[RestrictedResourceType] = None