- Models parsed from a PayWay response now keep that response verbatim on
raw. Parsing is lossy — keys PayWay sends but the dataclass does not declare are dropped (a real transaction losescreditCard.cardSchemeandcreditCard.cardType), absent keys come back as explicitNone, and aliases rename them (maskedCardNumberis stored ascardNumber) — soto_dict()is a projection, not the payload. Callers persisting responses for auditing, reconciliation or dispute resolution should storetransaction.raw. Models you construct yourself leave itNone, andrawis not a dataclass field, soto_dict(), equality andreprare unchanged.
- Add
search_transactions_by_customer(),search_transactions_by_receipt()andsearch_transactions_by_order(), matching PayWay's three documented search paths. Parameters are passed as query params and an optionalpagesupports pagination. - Breaking: remove
search_transactions(query). It builtGET /transactions<query>, and/transactionsonly accepts POST, so any query that wasn't a/search-*path failed with 405 Method Not Allowed. Use the three methods above instead. - Add an optional
pageargument tolist_customers(), so results past the first 20 customers can be reached. - Breaking:
constants.TOKEN_URLnow holds/single-use-tokens, the endpoint PayWay actually documents. The old value,/single-use-tokens-redirect, is not a PayWay endpoint and was unused.constants.TOKEN_NO_REDIRECTis removed — useTOKEN_URL. - Breaking: remove the unused
constants.OWN_BANK_ACCOUNTS_URL.
- Add opt-in transport retries to
Clientviamax_retriesandretry_delayconstructor kwargs, following PayWay's retry guidance: resend on connection errors, timeouts and HTTP 429/503 (honouringRetry-After), never on other status codes, and never for a POST without anIdempotency-Key. - Behaviour is unchanged unless
max_retriesis set — the default (max_retries=0) keeps the existing single-attempt behaviour.
- Simplify model serialization, raise minimum Python to 3.11.