fix: purchase states

This commit is contained in:
Adam Uhlíř 2024-08-25 21:03:33 +02:00
parent 4e6e4e01b3
commit fa33bfb967
No known key found for this signature in database
GPG Key ID: 1D17A9E81F76155B
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -38,8 +38,8 @@ class Purchase(BaseModel):
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(