Skip to content

Commit

Permalink
fix: purchase states
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Aug 25, 2024
1 parent 4e6e4e0 commit fa33bfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions codex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions codex_client/models/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit fa33bfb

Please sign in to comment.