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 Aug 21, 2024
1 parent 81a3e49 commit 6098949
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ groups:
title: P2P Ping
- name: p2p_settings
title: P2P Settings
- name: partner_settings
title: Get Partner-Specific Account Settings
- name: partner_settings_update
title: Set Partner Account Settings
- name: payment_methods
title: Payment Methods
- name: paymentagent_create
Expand Down
3 changes: 3 additions & 0 deletions config/v3/partner_settings/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"partner_settings": 1
}
67 changes: 67 additions & 0 deletions config/v3/partner_settings/receive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Get Partner-Specific Account Settings (response)",
"description": "Get Partner Settings (Partner Type, Company Details etc)",
"type": "object",
"required": [
"echo_req",
"msg_type"
],
"properties": {
"partner_settings": {
"title": "partner_settings",
"description": "Partner-specific information and settings.",
"type": "object",
"additionalProperties": false,
"properties": {
"company_name": {
"description": "[Optional] Company name. Only applicable for partners of type company.",
"type": "string",
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$",
"sensitive": 1
},
"company_registration_number": {
"description": "[Optional] Company registration number. Only applicable for partners of type company.",
"type": "string",
"pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$"
},
"partner_type": {
"description": "Defines whether this partner is an individual or a company.",
"type": "string",
"enum": [
"individual",
"company"
]
},
"provider": {
"description": "Defines the provider platform.",
"type": "string",
"enum": [
"myaffiliates",
"dynamicworks"
]
},
"website": {
"description": "Partner's Website URI/Promotional Platform",
"type": "string",
"pattern": "^[\\w_@./:#&+-]*$"
}
}
},
"echo_req": {
"description": "Echo of the request made.",
"type": "object"
},
"msg_type": {
"description": "Action name of the request made.",
"type": "string",
"enum": [
"partner_settings"
]
},
"req_id": {
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
"type": "integer"
}
}
}
36 changes: 36 additions & 0 deletions config/v3/partner_settings/send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Get Partner-Specific Account Settings (request)",
"description": "Get Partner Settings (Partner Type, Company Details etc)",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"read"
],
"additionalProperties": false,
"required": [
"partner_settings"
],
"properties": {
"partner_settings": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"loginid": {
"description": "[Optional] The login id of the partner account. Mandatory when multiple tokens were provided during authorize.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"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"
}
}
}
7 changes: 7 additions & 0 deletions config/v3/partner_settings_update/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"partner_settings_update": 1,
"company_name": "XYZ New Corp",
"company_registration_no": "ABC322",
"partner_type": "company",
"website": "www.newxyz.com"
}
32 changes: 32 additions & 0 deletions config/v3/partner_settings_update/receive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Set Partner Account Settings (response)",
"description": "A message with Partner Settings",
"type": "object",
"required": [
"echo_req",
"msg_type"
],
"properties": {
"partner_settings_update": {
"title": "partner_settings_update",
"description": "1 on success",
"type": "integer"
},
"echo_req": {
"description": "Echo of the request made.",
"type": "object"
},
"msg_type": {
"description": "Action name of the request made.",
"type": "string",
"enum": [
"partner_settings_update"
]
},
"req_id": {
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
"type": "integer"
}
}
}
60 changes: 60 additions & 0 deletions config/v3/partner_settings_update/send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Set Partner Account Settings (request)",
"description": "A message with Partner Settings",
"type": "object",
"auth_required": 1,
"auth_scopes": [
"admin"
],
"additionalProperties": false,
"required": [
"partner_settings_update"
],
"properties": {
"partner_settings_update": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"company_name": {
"description": "[Optional] Company name. Only applicable for partners of type company.",
"type": "string",
"pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$",
"sensitive": 1
},
"company_registration_no": {
"description": "[Optional] Company registration number. Only applicable for partners of type company.",
"type": "string",
"pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$"
},
"partner_type": {
"description": "Defines whether this partner is an individual or a company.",
"type": "string",
"enum": [
"individual",
"company"
]
},
"website": {
"description": "Partner's Website URI/Promotional Platform",
"type": "string",
"pattern": "^[\\w_@./:#&+-]*$"
},
"loginid": {
"description": "[Optional] The login id of the partner account. Mandatory when multiple tokens were provided during authorize.",
"type": "string",
"pattern": "^[A-Za-z]+[0-9]+$"
},
"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 6098949

Please sign in to comment.