Skip to content

Instantly share code, notes, and snippets.

@bogdan
Last active May 16, 2021 04:20
Show Gist options
  • Save bogdan/f9911f4022c6441cbe40ff93811e1ea2 to your computer and use it in GitHub Desktop.
Save bogdan/f9911f4022c6441cbe40ff93811e1ea2 to your computer and use it in GitHub Desktop.
{
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"$ref": "#/definitions/OrderItem"
}
},
"payment": {
"anyOf": [
{
"$ref": "#/definitions/default_1"
},
{
"$ref": "#/definitions/NativeResellerPaymentType"
}
]
}
},
"additionalProperties": false,
"required": [
"domains"
],
"definitions": {
"OrderItem": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"owner": {
"type": "string"
},
"resolution": {
"$ref": "#/definitions/default"
}
},
"additionalProperties": false,
"required": [
"name",
"owner"
]
},
"default": {
"type": "object",
"properties": {
"crypto": {
"type": "object",
"properties": {
"ADA": {
"$ref": "#/definitions/CurrencyResolution"
},
"BTC": {
"$ref": "#/definitions/CurrencyResolution"
},
"EOS": {
"$ref": "#/definitions/CurrencyResolution"
},
"ETH": {
"$ref": "#/definitions/CurrencyResolution"
},
"XLM": {
"$ref": "#/definitions/CurrencyResolution"
},
"XRP": {
"$ref": "#/definitions/CurrencyResolution"
},
"ZIL": {
"$ref": "#/definitions/CurrencyResolution"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"crypto"
]
},
"CurrencyResolution": {
"type": "object",
"properties": {
"address": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"address"
]
},
"default_1": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"stripe"
]
},
"tokenId": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"tokenId",
"type"
]
},
"NativeResellerPaymentType": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"reseller"
]
}
},
"additionalProperties": false,
"required": [
"type"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
@tuanggolt
Copy link

Tuần Ngo

@tuanggolt
Copy link

Tuần Ngo

@tuanggolt
Copy link

tuanggolt end tuanggo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment