(20250115) Allowing internal IPs to send SMS messages.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user