Create a Peripheral Device Schema

The following describes how to create a new peripheral device schema record using the Peripheral Schema editor in Data Management.

Assign schemas to peripheral devices using the Peripherals editor.

To create a peripheral schema:

  1. From the Xenial Portal, select Data Management.

  2. From the Ordering Settings menu, select Hardware.

  3. Select Peripheral Schema.

  4. Select New Peripheral Schema.

  5. In the Name field, type the name of the peripheral device schema.

  6. From the Type dropdown, select the type of schema: Device or Adapter.

  7. In the Schema field, type the peripheral schema in JSON data format.

  8. Select Save to save the schema record.

Define a Custom Schema for Payment Peripheral

Xenial Portal Data Management Ordering Settings Hardware Peripheral Schema

To define a custom schema for a payment peripheral:

  1. Select New Peripheral Schema.

  2. In the Name field, type the name of the peripheral device schema.

  3. From the Type dropdown, select Device.

  4. In the Schema field, paste the following peripheral schema:

    { "type": "object", "properties": { "name": { "description": "Name", "type": "string", "minLength": 1 }, "adapter_url": { "description": "The URL link to the custom adapter.", "type": "string", "maxLength": 1024, "minLength": 1 }, "options": { "description": "Configuration payment adapter in JSON format.", "type": "string", "minLength": 1, "maxLength": 2048 }, "adapter_type": { "description": "Adapter Type", "type": "string", "oneOf": [ { "enum": [ "lan" ], "description": "LAN" }, { "enum": [ "websocket" ], "description": "Windows Device Bridge" }, { "enum": [ "bluetooth" ], "description": "Bluetooth" } ], "default": "lan" }, "device_type": { "description": "Device Type", "type": "string", "oneOf": [ { "enum": [ "payment" ], "description": "Payment Device" } ], "default": "payment" }, "connection_type": { "description": "Connection Type", "type": "string", "oneOf": [ { "enum": [ "lan" ], "description": "LAN" }, { "enum": [ "opos" ], "description": "OPOS" }, { "enum": [ "bluetooth" ], "description": "Bluetooth" } ], "default": "lan" } }, "required": [ "name", "adapter_url", "options", "adapter_type", "device_type", "connection_type" ] }

  5. Select Save to save the schema record.

See Also