Source code for q2_sdk.models.adapters.fx_rates

from dataclasses import dataclass
from typing import List, Optional


[docs] @dataclass class ReplyStatus: success = (0,) error = (-1,) throttling_limit = (-2,) usd_amount_too_small = -3
[docs] @dataclass class FxCustomerRate: buy_or_sell: str base_currency_code: str contra_currency_code: str exchange_rate: float maximum_amount: float
[docs] @dataclass class FxRateBaseReply: status: int status_description: str
[docs] @dataclass class FxRateExchangeRateReply(FxRateBaseReply): base_rate: float #: (rate not including markup) - must be persisted with transaction for data extract during file creation - new field to store. usd_equivalent_amount: float #: converted fx amount to usd exchange_rate: ( float #: (rate including markup) - to be included in approval success message )
[docs] @dataclass class FxRateExchangeRateReplyUSDEquivalent(FxRateBaseReply): base_rate: float amount: float exchange_rate: float
[docs] @dataclass class FxRateQuoteReply(FxRateExchangeRateReply): quote_id: str #: ID to be used later during the booking process expiration_date: str # . quote is good until
[docs] @dataclass class FxRateQuoteReplyUSDEquivalent(FxRateExchangeRateReplyUSDEquivalent): quote_id: str #: ID to be used later during the booking process expiration_date: str # . quote is good until
[docs] @dataclass class FxRateExchangeDealReply(FxRateExchangeRateReply): deal_id: str #: unique id to reference the order value_date: str #: date the value was calculated top_tier: Optional[str] = ""
[docs] @dataclass class FxRateExchangeDealReplyUSDEquivalent(FxRateExchangeRateReplyUSDEquivalent): deal_id: str #: unique id to reference the order value_date: str #: date the value was calculated top_tier: Optional[str] = ""
[docs] @dataclass class FxRateSheetsReply(FxRateBaseReply): effective_start_date: str effective_end_date: str customer_rates: List[FxCustomerRate]