Coverage for functions \ flipdare \ wrapper \ internal \ exchange_rate_wrapper.py: 88%
24 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
1#!/usr/bin/env python
2# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved.
3#
4# This file is part of Flipdare's proprietary software and contains
5# confidential and copyrighted material. Unauthorised copying,
6# modification, distribution, or use of this file is strictly
7# prohibited without prior written permission from Flipdare Pty Ltd.
8#
9# This software includes third-party components licensed under MIT,
10# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details.
11#
13from __future__ import annotations
15from flipdare.generated.model.internal.exchange_rate_model import ExchangeRateModel
16from flipdare.generated.shared.stripe.stripe_currency_code import StripeCurrencyCode
17from flipdare.wrapper._persisted_wrapper import PersistedWrapper
20class ExchangeRateWrapper(PersistedWrapper[ExchangeRateModel]):
21 MODEL_CLASS = ExchangeRateModel
23 # <AUTO_GENERATED_CONTENT> - do not edit
25 @property
26 def base_currency(self) -> StripeCurrencyCode:
27 return self._model.base_currency
29 @base_currency.setter
30 def base_currency(self, value: StripeCurrencyCode) -> None:
31 self.update_field("base_currency", value)
33 @property
34 def target_currency(self) -> StripeCurrencyCode:
35 return self._model.target_currency
37 @target_currency.setter
38 def target_currency(self, value: StripeCurrencyCode) -> None:
39 self.update_field("target_currency", value)
41 @property
42 def rate(self) -> float:
43 return self._model.rate
45 @rate.setter
46 def rate(self, value: float) -> None:
47 self.update_field("rate", value)
49 # </AUTO_GENERATED_CONTENT> - do not edit