From cdbe451b60c6308fac4b7da35226440941085a4b Mon Sep 17 00:00:00 2001 From: Github Workflow Date: Fri, 28 Jun 2024 11:19:34 +0000 Subject: [PATCH] JSON Schema Update --- _data/v3.yml | 2 + config/v3/tin_validations/example.json | 4 ++ config/v3/tin_validations/receive.json | 64 ++++++++++++++++++++++++++ config/v3/tin_validations/send.json | 33 +++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 config/v3/tin_validations/example.json create mode 100644 config/v3/tin_validations/receive.json create mode 100644 config/v3/tin_validations/send.json diff --git a/_data/v3.yml b/_data/v3.yml index c113d56b..35ca549c 100644 --- a/_data/v3.yml +++ b/_data/v3.yml @@ -215,6 +215,8 @@ groups: title: Ticks History - name: time title: Server Time + - name: tin_validations + title: Tax Identification Number Validations - name: tnc_approval title: Terms and Conditions Approval - name: topup_virtual diff --git a/config/v3/tin_validations/example.json b/config/v3/tin_validations/example.json new file mode 100644 index 00000000..29f20c58 --- /dev/null +++ b/config/v3/tin_validations/example.json @@ -0,0 +1,4 @@ +{ + "tin_validations": 1, + "tax_residence": "ke" +} diff --git a/config/v3/tin_validations/receive.json b/config/v3/tin_validations/receive.json new file mode 100644 index 00000000..c8ed129c --- /dev/null +++ b/config/v3/tin_validations/receive.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Tax Identification Number Validations (response)", + "description": "A message with validations for Tax Identification Numbers (TIN)", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "tin_validations": { + "title": "tin_validations", + "description": "Validations for Tax Identification Numbers (TIN)", + "type": "object", + "additionalProperties": false, + "properties": { + "invalid_patterns": { + "description": "Invalid regex patterns for tin validation", + "type": "array", + "items": { + "type": "string" + } + }, + "is_tin_mandatory": { + "description": "Whether the TIN is mandatory for the selected country", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_employment_status_bypass": { + "description": "List of employment statuses that bypass TIN requirements for the selected country", + "type": "array", + "items": { + "type": "string" + } + }, + "tin_format": { + "description": "Country tax identifier formats.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "tin_validations" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" + } + } +} diff --git a/config/v3/tin_validations/send.json b/config/v3/tin_validations/send.json new file mode 100644 index 00000000..a1f59df5 --- /dev/null +++ b/config/v3/tin_validations/send.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Tax Identification Number Validations (request)", + "description": "Get the validations for Tax Identification Numbers (TIN)", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "tin_validations", + "tax_residence" + ], + "properties": { + "tin_validations": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "tax_residence": { + "description": "The tax residence selected by the client.", + "type": "string" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } + } +}