Skip to content

Instantly share code, notes, and snippets.

@tiarebalbi
Created May 15, 2024 03:16
Show Gist options
  • Save tiarebalbi/49f62f45cefedbef78cade51858c8472 to your computer and use it in GitHub Desktop.
Save tiarebalbi/49f62f45cefedbef78cade51858c8472 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Transaction",
"type": "object",
"properties": {
"integration_code": { "type": "string" },
"checkout_name": { "type": "string" },
"type": { "type": "string" },
"transaction_id": { "type": "string" },
"description": { "type": "string" },
"created_at": { "type": "string", "format": "date-time" },
"user": {
"type": "object",
"properties": {
"user_id": { "type": "string" },
"name": { "type": "string" },
"email": { "type": "string", "format": "email" },
"cpf": { "type": "string" },
"cnpj": { "type": ["string", "null"] },
"phone": { "type": "string" },
"gender": { "type": ["string", "null"] },
"birth_date": { "type": ["string", "null"], "format": "date" }
},
"required": ["user_id", "name", "email", "cpf", "phone"]
},
"transaction": {
"type": "object",
"properties": {
"value_cents": { "type": "integer" },
"payment_type": { "type": "string" },
"status": { "type": "string" },
"billing_way": { "type": "string" },
"installments": { "type": "integer" },
"duration": { "type": "integer" }
},
"required": ["value_cents", "payment_type", "status", "billing_way", "installments", "duration"]
},
"order_bumps": {
"type": "array",
"items": { "type": "object" }
},
"tracking_parameters": {
"type": "array",
"items": { "type": "object" }
},
"browser": {
"type": "object",
"properties": {
"ip": { "type": "string", "format": "ipv4" },
"countryCode": { "type": ["string", "null"] },
"countryName": { "type": ["string", "null"] },
"region": { "type": ["string", "null"] },
"city": { "type": ["string", "null"] },
"cityLatLong": { "type": ["string", "null"] },
"currencies": {
"type": "array",
"items": { "type": "string" }
},
"languages": {
"type": "array",
"items": { "type": "string" }
},
"userAgent": { "type": "string" },
"browser": { "type": "string" },
"browserVersion": { "type": "string" },
"os": { "type": "string" },
"osVersion": { "type": "string" },
"device": { "type": "string" },
"deviceBrand": { "type": "string" },
"deviceModel": { "type": "string" },
"deviceFamily": { "type": "string" }
},
"required": ["ip", "currencies", "languages", "userAgent", "browser", "browserVersion", "os", "osVersion", "device", "deviceBrand", "deviceModel", "deviceFamily"]
},
"address": {
"type": "object",
"properties": {
"country": { "type": "string" },
"zip_code": { "type": "string" },
"street": { "type": "string" },
"number": { "type": "string" },
"district": { "type": "string" },
"complement": { "type": ["string", "null"] },
"city": { "type": "string" },
"state": { "type": "string" }
},
"required": ["country", "zip_code", "street", "number", "district", "city", "state"]
}
},
"required": [
"integration_code",
"checkout_name",
"type",
"transaction_id",
"description",
"created_at",
"user",
"transaction",
"order_bumps",
"tracking_parameters",
"browser",
"address"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment