Skip to content

Commit

Permalink
JSON Schema Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Workflow committed Jun 28, 2024
1 parent d0a13dc commit cdbe451
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config/v3/tin_validations/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tin_validations": 1,
"tax_residence": "ke"
}
64 changes: 64 additions & 0 deletions config/v3/tin_validations/receive.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
33 changes: 33 additions & 0 deletions config/v3/tin_validations/send.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

0 comments on commit cdbe451

Please sign in to comment.