From fa33bfb9672e5ec7597bc449c5937edf49001e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Uhl=C3=AD=C5=99?= Date: Sun, 25 Aug 2024 21:03:33 +0200 Subject: [PATCH] fix: purchase states --- codex.yaml | 16 ++++++++-------- codex_client/models/purchase.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/codex.yaml b/codex.yaml index bb4da14..ac87a18 100644 --- a/codex.yaml +++ b/codex.yaml @@ -294,14 +294,14 @@ components: type: string description: Description of the Request's state enum: - - PurchaseCancelled - - PurchaseError - - PurchaseFailed - - PurchaseFinished - - PurchasePending - - PurchaseStarted - - PurchaseSubmitted - - PurchaseUnknown + - cancelled + - error + - failed + - finished + - pending + - started + - submitted + - unknown error: type: string description: If Request failed, then here is presented the error message diff --git a/codex_client/models/purchase.py b/codex_client/models/purchase.py index b1427be..e0648ea 100644 --- a/codex_client/models/purchase.py +++ b/codex_client/models/purchase.py @@ -38,8 +38,8 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in set(['PurchaseCancelled', 'PurchaseError', 'PurchaseFailed', 'PurchaseFinished', 'PurchasePending', 'PurchaseStarted', 'PurchaseSubmitted', 'PurchaseUnknown']): - raise ValueError("must be one of enum values ('PurchaseCancelled', 'PurchaseError', 'PurchaseFailed', 'PurchaseFinished', 'PurchasePending', 'PurchaseStarted', 'PurchaseSubmitted', 'PurchaseUnknown')") + if value not in set(['cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown']): + raise ValueError("must be one of enum values ('cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')") return value model_config = ConfigDict(