(20250115) Allowing internal IPs to send SMS messages.

This commit is contained in:
2025-01-15 14:00:40 +05:30
parent 3c7ce68200
commit 9e80fda596
3 changed files with 20 additions and 7 deletions
+8 -2
View File
@@ -150,10 +150,16 @@ class PaymentRequestMetadata(BaseModel):
class PGPaymentRequestData(BaseModel):
tokenKey: ObjectId = Field(
description = "the auth token to use to send this message",
description = "the auth token of the account that must be used to request the payment",
frozen = True,
)
paymentId: ObjectId | None = Field(
description = "if you had queued the payment request separately, pass the id here",
frozen = True,
default = None
)
customerName: str | None = Field(
description = "the name of the registered customer who must make the payment",
frozen = True,
@@ -222,7 +228,7 @@ class PGPaymentRequestData(BaseModel):
# ┃┃┏┓┃┓┏┫┏┓╋┓┏┓┏┓
# ┗┛┗┻┗┗┗┻┗┻┗┗┗┛┛┗
@field_validator("tokenKey", mode = "before")
@field_validator("tokenKey", "paymentId", mode = "before")
def parse_oid(cls, value):
try: value = ObjectId(value)
except: pass