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 type: string
description: Description of the Request's state description: Description of the Request's state
enum: enum:
- PurchaseCancelled - cancelled
- PurchaseError - error
- PurchaseFailed - failed
- PurchaseFinished - finished
- PurchasePending - pending
- PurchaseStarted - started
- PurchaseSubmitted - submitted
- PurchaseUnknown - unknown
error: error:
type: string type: string
description: If Request failed, then here is presented the error message description: If Request failed, then here is presented the error message

View File

@ -38,8 +38,8 @@ class Purchase(BaseModel):
if value is None: if value is None:
return value return value
if value not in set(['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 ('PurchaseCancelled', 'PurchaseError', 'PurchaseFailed', 'PurchaseFinished', 'PurchasePending', 'PurchaseStarted', 'PurchaseSubmitted', 'PurchaseUnknown')") raise ValueError("must be one of enum values ('cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')")
return value return value
model_config = ConfigDict( model_config = ConfigDict(