Files
Azeez Muibi ba4d878daf Major update
2025-03-27 08:21:20 +01:00

18 lines
1.0 KiB
Python

from marshmallow import Schema, fields
# Individual SMS item schema for BulkSMS
class BulkSMSItemSchema(Schema):
text = fields.Str(required=True, description="Message to send to customer")
dest = fields.Str(required=True, description="Phone Number in international format")
unicode = fields.Bool(required=True, description="Character encoding standard (set as True for bulk SMS)")
# BulkSMS Request Schema (list of SMS items)
class BulkSMSSchema(Schema):
_schema = fields.List(fields.Nested(BulkSMSItemSchema), required=True)
# BulkSMS Response Schema
class BulkSMSResponseSchema(Schema):
data = fields.Str(required=True, description="Any additional data in response")
statusCode = fields.Int(required=True, description="Result code of executed process (200 = Success)")
IsSuccessful = fields.Bool(required=True, description="An Indicator that the process was successful or not")
errorMessage = fields.Str(required=True, allow_none=True, description="Description of status code if process is failed, null if successful")