Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
cyclops-4-hpc/services/customerdb/restapi/embedded_spec.go

4004 lines
90 KiB

// Code generated by go-swagger; DO NOT EDIT.
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "An API which supports creation, deletion, listing etc of customers and products",
"title": "Customer Database Management API",
"contact": {
"email": "diego@cyclops-labs.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.0"
},
"host": "localhost:8000",
"basePath": "/api/v1.0",
"paths": {
"/customer": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "List all the customers in the system",
"operationId": "listCustomers",
"responses": {
"200": {
"description": "List of customers in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Customer"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Insert a new customer in the system.",
"operationId": "addCustomer",
"parameters": [
{
"description": "Customer to be added",
"name": "customer",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Customer"
}
}
],
"responses": {
"201": {
"description": "New customer was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The new customer was added but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/customer/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Return the information about the customer with the given id",
"operationId": "getCustomer",
"parameters": [
{
"type": "string",
"description": "Id of the customer to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Customer with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Customer"
}
},
"404": {
"description": "The customer with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Updates the information of the customer with the given id",
"operationId": "updateCustomer",
"parameters": [
{
"type": "string",
"description": "Id of the customer to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Customer to be updated",
"name": "customer",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Customer"
}
}
],
"responses": {
"200": {
"description": "Customer with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The customer was updated but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The customer with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/product": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "List all the products in the system",
"operationId": "listProducts",
"responses": {
"200": {
"description": "List of products in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Insert a new product in the system.",
"operationId": "addProduct",
"parameters": [
{
"description": "Product to be added",
"name": "product",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Product"
}
}
],
"responses": {
"201": {
"description": "New product was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/product/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Return the information about the product with the given id",
"operationId": "getProduct",
"parameters": [
{
"type": "string",
"description": "Id of the product to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Product with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Product"
}
},
"404": {
"description": "The product with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Updates the information of the product with the given id",
"operationId": "updateProduct",
"parameters": [
{
"type": "string",
"description": "Id of the product to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Product to be updated",
"name": "product",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Product"
}
}
],
"responses": {
"200": {
"description": "Product with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The product with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/reseller": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "List all the resellers in the system",
"operationId": "listResellers",
"responses": {
"200": {
"description": "List of resellers in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Reseller"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Insert a new reseller in the system.",
"operationId": "addReseller",
"parameters": [
{
"description": "Reseller to be added",
"name": "reseller",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Reseller"
}
}
],
"responses": {
"201": {
"description": "New reseller was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The new reseller was added but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/reseller/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Return the information about the reseller with the given id",
"operationId": "getReseller",
"parameters": [
{
"type": "string",
"description": "Id of the reseller to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Reseller with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Reseller"
}
},
"404": {
"description": "The reseller with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Updates the information of the reseller with the given id",
"operationId": "updateReseller",
"parameters": [
{
"type": "string",
"description": "Id of the reseller to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Reseller to be updated",
"name": "reseller",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Reseller"
}
}
],
"responses": {
"200": {
"description": "Reseller with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The reseller was updated but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The reseller with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "showStatus",
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
}
}
}
},
"/status/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "getStatus",
"parameters": [
{
"enum": [
"kafka-receiver",
"kafka-sender",
"status",
"trigger",
"customer",
"product",
"reseller"
],
"type": "string",
"description": "Id of the product to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"404": {
"description": "The endpoint provided doesn't exist",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/trigger/sample": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"triggerManagement"
],
"summary": "Sample task trigger",
"operationId": "execSample",
"responses": {
"200": {
"description": "Sample task executed successfully"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"Customer": {
"type": "object",
"properties": {
"AbacusCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"Address": {
"type": "string"
},
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"BillContact": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"BillCurrency": {
"description": "ISO-4217 currency code",
"type": "string",
"default": "CHF",
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL"
],
"x-go-custom-tag": "gorm:\"default:CHF\""
},
"BillPeriod": {
"type": "string",
"default": "monthly",
"enum": [
"daily",
"weekly",
"bi-weekly",
"monthly",
"bi-monthly",
"quarterly",
"semi-annually",
"annually"
],
"x-go-custom-tag": "gorm:\"default:monthly\""
},
"Billable": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"BillingCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"CancelDate": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"ContractEnd": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2030-12-31\""
},
"ContractStart": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2019-01-01\""
},
"CustomerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"EmailBcc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailCc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailTo": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"InvoiceMode": {
"type": "string",
"default": "email",
"enum": [
"email",
"post"
],
"x-go-custom-tag": "gorm:\"default:email\""
},
"IsActive": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"Language": {
"description": "ISO-369-1 alpha-2 language codes",
"type": "string",
"default": "DE",
"enum": [
"AA",
"AB",
"AE",
"AF",
"AK",
"AM",
"AN",
"AR",
"AS",
"AV",
"AY",
"AZ",
"BA",
"BE",
"BG",
"BH",
"BI",
"BM",
"BN",
"BO",
"BR",
"BS",
"CA",
"CE",
"CH",
"CO",
"CR",
"CS",
"CU",
"CV",
"CY",
"DA",
"DE",
"DV",
"DZ",
"EE",
"EL",
"EN",
"EO",
"ES",
"ET",
"EU",
"FA",
"FF",
"FI",
"FJ",
"FO",
"FR",
"FY",
"GA",
"GD",
"GL",
"GN",
"GU",
"GV",
"HA",
"HE",
"HI",
"HO",
"HR",
"HT",
"HU",
"HY",
"HZ",
"IA",
"ID",
"IE",
"IG",
"II",
"IK",
"IO",
"IS",
"IT",
"IU",
"JA",
"JV",
"KA",
"KG",
"KI",
"KJ",
"KK",
"KL",
"KM",
"KN",
"KO",
"KR",
"KS",
"KU",
"KV",
"KW",
"KY",
"LA",
"LB",
"LG",
"LI",
"LN",
"LO",
"LT",
"LU",
"LV",
"MG",
"MH",
"MI",
"MK",
"ML",
"MN",
"MR",
"MS",
"MT",
"MY",
"NA",
"NB",
"ND",
"NE",
"NG",
"NL",
"NN",
"NO",
"NR",
"NV",
"NY",
"OC",
"OJ",
"OM",
"OR",
"OS",
"PA",
"PI",
"PL",
"PS",
"PT",
"QU",
"RM",
"RN",
"RO",
"RU",
"RW",
"SA",
"SC",
"SD",
"SE",
"SG",
"SI",
"SK",
"SL",
"SM",
"SN",
"SO",
"SQ",
"SR",
"SS",
"ST",
"SU",
"SV",
"SW",
"TA",
"TE",
"TG",
"TH",
"TI",
"TK",
"TL",
"TN",
"TO",
"TR",
"TS",
"TT",
"TW",
"TY",
"UG",
"UK",
"UR",
"UZ",
"VE",
"VI",
"VO",
"WA",
"WO",
"XH",
"YI",
"YO",
"ZA",
"ZH",
"ZU"
],
"x-go-custom-tag": "gorm:\"default:DE\""
},
"Name": {
"type": "string"
},
"ParentCustomerId": {
"type": "string"
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"Products": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
},
"x-go-custom-tag": "gorm:\"-\""
},
"ResellerId": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"required": [
"errorString"
],
"properties": {
"errorString": {
"type": "string"
}
}
},
"ItemCreatedResponse": {
"properties": {
"ApiLink": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"Product": {
"type": "object",
"properties": {
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"CancelDate": {
"type": "string",
"format": "date",
"default": "2100-12-31",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"CustomerId": {
"type": "string"
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"Name": {
"type": "string"
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"ProductId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
},
"Type": {
"type": "string"
}
}
},
"Reseller": {
"type": "object",
"properties": {
"AbacusCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"Address": {
"type": "string"
},
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"BillContact": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"BillCurrency": {
"description": "ISO-4217 currency code",
"type": "string",
"default": "CHF",
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL"
],
"x-go-custom-tag": "gorm:\"default:CHF\""
},
"BillPeriod": {
"type": "string",
"default": "monthly",
"enum": [
"daily",
"weekly",
"bi-weekly",
"monthly",
"bi-monthly",
"quarterly",
"semi-annually",
"annually"
],
"x-go-custom-tag": "gorm:\"default:monthly\""
},
"Billable": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"BillingCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"CancelDate": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"ContractEnd": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2030-12-31\""
},
"ContractStart": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2019-01-01\""
},
"Customers": {
"type": "array",
"items": {
"$ref": "#/definitions/Customer"
},
"x-go-custom-tag": "gorm:\"-\""
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"EmailBcc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailCc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailTo": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"InvoiceMode": {
"type": "string",
"default": "email",
"enum": [
"email",
"post"
],
"x-go-custom-tag": "gorm:\"default:email\""
},
"IsActive": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"Language": {
"description": "ISO-369-1 alpha-2 language codes",
"type": "string",
"default": "DE",
"enum": [
"AA",
"AB",
"AE",
"AF",
"AK",
"AM",
"AN",
"AR",
"AS",
"AV",
"AY",
"AZ",
"BA",
"BE",
"BG",
"BH",
"BI",
"BM",
"BN",
"BO",
"BR",
"BS",
"CA",
"CE",
"CH",
"CO",
"CR",
"CS",
"CU",
"CV",
"CY",
"DA",
"DE",
"DV",
"DZ",
"EE",
"EL",
"EN",
"EO",
"ES",
"ET",
"EU",
"FA",
"FF",
"FI",
"FJ",
"FO",
"FR",
"FY",
"GA",
"GD",
"GL",
"GN",
"GU",
"GV",
"HA",
"HE",
"HI",
"HO",
"HR",
"HT",
"HU",
"HY",
"HZ",
"IA",
"ID",
"IE",
"IG",
"II",
"IK",
"IO",
"IS",
"IT",
"IU",
"JA",
"JV",
"KA",
"KG",
"KI",
"KJ",
"KK",
"KL",
"KM",
"KN",
"KO",
"KR",
"KS",
"KU",
"KV",
"KW",
"KY",
"LA",
"LB",
"LG",
"LI",
"LN",
"LO",
"LT",
"LU",
"LV",
"MG",
"MH",
"MI",
"MK",
"ML",
"MN",
"MR",
"MS",
"MT",
"MY",
"NA",
"NB",
"ND",
"NE",
"NG",
"NL",
"NN",
"NO",
"NR",
"NV",
"NY",
"OC",
"OJ",
"OM",
"OR",
"OS",
"PA",
"PI",
"PL",
"PS",
"PT",
"QU",
"RM",
"RN",
"RO",
"RU",
"RW",
"SA",
"SC",
"SD",
"SE",
"SG",
"SI",
"SK",
"SL",
"SM",
"SN",
"SO",
"SQ",
"SR",
"SS",
"ST",
"SU",
"SV",
"SW",
"TA",
"TE",
"TG",
"TH",
"TI",
"TK",
"TL",
"TN",
"TO",
"TR",
"TS",
"TT",
"TW",
"TY",
"UG",
"UK",
"UR",
"UZ",
"VE",
"VI",
"VO",
"WA",
"WO",
"XH",
"YI",
"YO",
"ZA",
"ZH",
"ZU"
],
"x-go-custom-tag": "gorm:\"default:DE\""
},
"Name": {
"type": "string"
},
"ParentResellerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"ResellerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
}
}
},
"Status": {
"type": "object",
"required": [
"SystemState"
],
"properties": {
"AverageResponseTime": {
"type": "number",
"format": "double"
},
"DBState": {
"type": "string"
},
"LastRequest": {
"type": "string"
},
"RequestsBoT": {
"type": "integer"
},
"RequestsLastHour": {
"type": "integer"
},
"RequestsToday": {
"type": "integer"
},
"SystemState": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"APIKeyHeader": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
},
"APIKeyParam": {
"type": "apiKey",
"name": "api_key",
"in": "query"
},
"Keycloak": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
"tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
"scopes": {
"admin": "Admin scope",
"user": "User scope"
}
}
},
"security": [
{
"Keycloak": [
"user",
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"tags": [
{
"description": "Actions relating to the reporting of the state of the service",
"name": "statusManagement"
},
{
"description": "Actions relating to the periodics actions to be triggered in the system",
"name": "triggerManagement"
},
{
"description": "Actions relating to the management of Resellers",
"name": "resellerManagement"
},
{
"description": "Actions relating to the management of Customers",
"name": "customerManagement"
},
{
"description": "Actions relating to the management of Products",
"name": "productManagement"
}
]
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "An API which supports creation, deletion, listing etc of customers and products",
"title": "Customer Database Management API",
"contact": {
"email": "diego@cyclops-labs.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.0"
},
"host": "localhost:8000",
"basePath": "/api/v1.0",
"paths": {
"/customer": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "List all the customers in the system",
"operationId": "listCustomers",
"responses": {
"200": {
"description": "List of customers in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Customer"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Insert a new customer in the system.",
"operationId": "addCustomer",
"parameters": [
{
"description": "Customer to be added",
"name": "customer",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Customer"
}
}
],
"responses": {
"201": {
"description": "New customer was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The new customer was added but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/customer/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Return the information about the customer with the given id",
"operationId": "getCustomer",
"parameters": [
{
"type": "string",
"description": "Id of the customer to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Customer with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Customer"
}
},
"404": {
"description": "The customer with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"customerManagement"
],
"summary": "Updates the information of the customer with the given id",
"operationId": "updateCustomer",
"parameters": [
{
"type": "string",
"description": "Id of the customer to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Customer to be updated",
"name": "customer",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Customer"
}
}
],
"responses": {
"200": {
"description": "Customer with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The customer was updated but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The customer with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/product": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "List all the products in the system",
"operationId": "listProducts",
"responses": {
"200": {
"description": "List of products in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Insert a new product in the system.",
"operationId": "addProduct",
"parameters": [
{
"description": "Product to be added",
"name": "product",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Product"
}
}
],
"responses": {
"201": {
"description": "New product was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/product/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Return the information about the product with the given id",
"operationId": "getProduct",
"parameters": [
{
"type": "string",
"description": "Id of the product to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Product with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Product"
}
},
"404": {
"description": "The product with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"productManagement"
],
"summary": "Updates the information of the product with the given id",
"operationId": "updateProduct",
"parameters": [
{
"type": "string",
"description": "Id of the product to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Product to be updated",
"name": "product",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Product"
}
}
],
"responses": {
"200": {
"description": "Product with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The product with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/reseller": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "List all the resellers in the system",
"operationId": "listResellers",
"responses": {
"200": {
"description": "List of resellers in the system returned",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Reseller"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Insert a new reseller in the system.",
"operationId": "addReseller",
"parameters": [
{
"description": "Reseller to be added",
"name": "reseller",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Reseller"
}
}
],
"responses": {
"201": {
"description": "New reseller was added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The new reseller was added but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"409": {
"description": "The given item already exists",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/reseller/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Return the information about the reseller with the given id",
"operationId": "getReseller",
"parameters": [
{
"type": "string",
"description": "Id of the reseller to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Reseller with the id given in the system returned",
"schema": {
"$ref": "#/definitions/Reseller"
}
},
"404": {
"description": "The reseller with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"resellerManagement"
],
"summary": "Updates the information of the reseller with the given id",
"operationId": "updateReseller",
"parameters": [
{
"type": "string",
"description": "Id of the reseller to be updated",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Reseller to be updated",
"name": "reseller",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Reseller"
}
}
],
"responses": {
"200": {
"description": "Reseller with the given id was updated",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"202": {
"description": "The reseller was updated but there might have been some fails when adding part of the data",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"404": {
"description": "The reseller with the given id wasn't found",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "showStatus",
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
}
}
}
},
"/status/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "getStatus",
"parameters": [
{
"enum": [
"kafka-receiver",
"kafka-sender",
"status",
"trigger",
"customer",
"product",
"reseller"
],
"type": "string",
"description": "Id of the product to be retrieved",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"404": {
"description": "The endpoint provided doesn't exist",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/trigger/sample": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"triggerManagement"
],
"summary": "Sample task trigger",
"operationId": "execSample",
"responses": {
"200": {
"description": "Sample task executed successfully"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"Customer": {
"type": "object",
"properties": {
"AbacusCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"Address": {
"type": "string"
},
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"BillContact": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"BillCurrency": {
"description": "ISO-4217 currency code",
"type": "string",
"default": "CHF",
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL"
],
"x-go-custom-tag": "gorm:\"default:CHF\""
},
"BillPeriod": {
"type": "string",
"default": "monthly",
"enum": [
"daily",
"weekly",
"bi-weekly",
"monthly",
"bi-monthly",
"quarterly",
"semi-annually",
"annually"
],
"x-go-custom-tag": "gorm:\"default:monthly\""
},
"Billable": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"BillingCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"CancelDate": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"ContractEnd": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2030-12-31\""
},
"ContractStart": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2019-01-01\""
},
"CustomerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"EmailBcc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailCc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailTo": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"InvoiceMode": {
"type": "string",
"default": "email",
"enum": [
"email",
"post"
],
"x-go-custom-tag": "gorm:\"default:email\""
},
"IsActive": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"Language": {
"description": "ISO-369-1 alpha-2 language codes",
"type": "string",
"default": "DE",
"enum": [
"AA",
"AB",
"AE",
"AF",
"AK",
"AM",
"AN",
"AR",
"AS",
"AV",
"AY",
"AZ",
"BA",
"BE",
"BG",
"BH",
"BI",
"BM",
"BN",
"BO",
"BR",
"BS",
"CA",
"CE",
"CH",
"CO",
"CR",
"CS",
"CU",
"CV",
"CY",
"DA",
"DE",
"DV",
"DZ",
"EE",
"EL",
"EN",
"EO",
"ES",
"ET",
"EU",
"FA",
"FF",
"FI",
"FJ",
"FO",
"FR",
"FY",
"GA",
"GD",
"GL",
"GN",
"GU",
"GV",
"HA",
"HE",
"HI",
"HO",
"HR",
"HT",
"HU",
"HY",
"HZ",
"IA",
"ID",
"IE",
"IG",
"II",
"IK",
"IO",
"IS",
"IT",
"IU",
"JA",
"JV",
"KA",
"KG",
"KI",
"KJ",
"KK",
"KL",
"KM",
"KN",
"KO",
"KR",
"KS",
"KU",
"KV",
"KW",
"KY",
"LA",
"LB",
"LG",
"LI",
"LN",
"LO",
"LT",
"LU",
"LV",
"MG",
"MH",
"MI",
"MK",
"ML",
"MN",
"MR",
"MS",
"MT",
"MY",
"NA",
"NB",
"ND",
"NE",
"NG",
"NL",
"NN",
"NO",
"NR",
"NV",
"NY",
"OC",
"OJ",
"OM",
"OR",
"OS",
"PA",
"PI",
"PL",
"PS",
"PT",
"QU",
"RM",
"RN",
"RO",
"RU",
"RW",
"SA",
"SC",
"SD",
"SE",
"SG",
"SI",
"SK",
"SL",
"SM",
"SN",
"SO",
"SQ",
"SR",
"SS",
"ST",
"SU",
"SV",
"SW",
"TA",
"TE",
"TG",
"TH",
"TI",
"TK",
"TL",
"TN",
"TO",
"TR",
"TS",
"TT",
"TW",
"TY",
"UG",
"UK",
"UR",
"UZ",
"VE",
"VI",
"VO",
"WA",
"WO",
"XH",
"YI",
"YO",
"ZA",
"ZH",
"ZU"
],
"x-go-custom-tag": "gorm:\"default:DE\""
},
"Name": {
"type": "string"
},
"ParentCustomerId": {
"type": "string"
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"Products": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
},
"x-go-custom-tag": "gorm:\"-\""
},
"ResellerId": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"required": [
"errorString"
],
"properties": {
"errorString": {
"type": "string"
}
}
},
"ItemCreatedResponse": {
"properties": {
"ApiLink": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"Product": {
"type": "object",
"properties": {
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"CancelDate": {
"type": "string",
"format": "date",
"default": "2100-12-31",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"CustomerId": {
"type": "string"
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"Name": {
"type": "string"
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"ProductId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
},
"Type": {
"type": "string"
}
}
},
"Reseller": {
"type": "object",
"properties": {
"AbacusCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"Address": {
"type": "string"
},
"ApiLink": {
"type": "string",
"x-go-custom-tag": "gorm:\"-\""
},
"BillContact": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"BillCurrency": {
"description": "ISO-4217 currency code",
"type": "string",
"default": "CHF",
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL"
],
"x-go-custom-tag": "gorm:\"default:CHF\""
},
"BillPeriod": {
"type": "string",
"default": "monthly",
"enum": [
"daily",
"weekly",
"bi-weekly",
"monthly",
"bi-monthly",
"quarterly",
"semi-annually",
"annually"
],
"x-go-custom-tag": "gorm:\"default:monthly\""
},
"Billable": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"BillingCode": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"CancelDate": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2100-12-31\""
},
"ContractEnd": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2030-12-31\""
},
"ContractStart": {
"type": "string",
"format": "date",
"x-go-custom-tag": "gorm:\"type:date;default:2019-01-01\""
},
"Customers": {
"type": "array",
"items": {
"$ref": "#/definitions/Customer"
},
"x-go-custom-tag": "gorm:\"-\""
},
"DeletedAt": {
"type": "string",
"format": "datetime",
"x-go-custom-tag": "gorm:\"type:timestamptz\"",
"x-nullable": true
},
"Discount": {
"type": "number",
"format": "double",
"default": 0,
"x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
},
"EmailBcc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailCc": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"EmailTo": {
"type": "string",
"format": "email",
"x-go-custom-tag": "gorm:\"default:''\""
},
"InvoiceMode": {
"type": "string",
"default": "email",
"enum": [
"email",
"post"
],
"x-go-custom-tag": "gorm:\"default:email\""
},
"IsActive": {
"type": "boolean",
"default": true,
"x-go-custom-tag": "gorm:\"default:true\""
},
"Language": {
"description": "ISO-369-1 alpha-2 language codes",
"type": "string",
"default": "DE",
"enum": [
"AA",
"AB",
"AE",
"AF",
"AK",
"AM",
"AN",
"AR",
"AS",
"AV",
"AY",
"AZ",
"BA",
"BE",
"BG",
"BH",
"BI",
"BM",
"BN",
"BO",
"BR",
"BS",
"CA",
"CE",
"CH",
"CO",
"CR",
"CS",
"CU",
"CV",
"CY",
"DA",
"DE",
"DV",
"DZ",
"EE",
"EL",
"EN",
"EO",
"ES",
"ET",
"EU",
"FA",
"FF",
"FI",
"FJ",
"FO",
"FR",
"FY",
"GA",
"GD",
"GL",
"GN",
"GU",
"GV",
"HA",
"HE",
"HI",
"HO",
"HR",
"HT",
"HU",
"HY",
"HZ",
"IA",
"ID",
"IE",
"IG",
"II",
"IK",
"IO",
"IS",
"IT",
"IU",
"JA",
"JV",
"KA",
"KG",
"KI",
"KJ",
"KK",
"KL",
"KM",
"KN",
"KO",
"KR",
"KS",
"KU",
"KV",
"KW",
"KY",
"LA",
"LB",
"LG",
"LI",
"LN",
"LO",
"LT",
"LU",
"LV",
"MG",
"MH",
"MI",
"MK",
"ML",
"MN",
"MR",
"MS",
"MT",
"MY",
"NA",
"NB",
"ND",
"NE",
"NG",
"NL",
"NN",
"NO",
"NR",
"NV",
"NY",
"OC",
"OJ",
"OM",
"OR",
"OS",
"PA",
"PI",
"PL",
"PS",
"PT",
"QU",
"RM",
"RN",
"RO",
"RU",
"RW",
"SA",
"SC",
"SD",
"SE",
"SG",
"SI",
"SK",
"SL",
"SM",
"SN",
"SO",
"SQ",
"SR",
"SS",
"ST",
"SU",
"SV",
"SW",
"TA",
"TE",
"TG",
"TH",
"TI",
"TK",
"TL",
"TN",
"TO",
"TR",
"TS",
"TT",
"TW",
"TY",
"UG",
"UK",
"UR",
"UZ",
"VE",
"VI",
"VO",
"WA",
"WO",
"XH",
"YI",
"YO",
"ZA",
"ZH",
"ZU"
],
"x-go-custom-tag": "gorm:\"default:DE\""
},
"Name": {
"type": "string"
},
"ParentResellerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:''\""
},
"PlanId": {
"type": "string",
"x-go-custom-tag": "gorm:\"default:'DEFAULT'\""
},
"ResellerId": {
"type": "string",
"x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
}
}
},
"Status": {
"type": "object",
"required": [
"SystemState"
],
"properties": {
"AverageResponseTime": {
"type": "number",
"format": "double"
},
"DBState": {
"type": "string"
},
"LastRequest": {
"type": "string"
},
"RequestsBoT": {
"type": "integer"
},
"RequestsLastHour": {
"type": "integer"
},
"RequestsToday": {
"type": "integer"
},
"SystemState": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"APIKeyHeader": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
},
"APIKeyParam": {
"type": "apiKey",
"name": "api_key",
"in": "query"
},
"Keycloak": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
"tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
"scopes": {
"admin": "Admin scope",
"user": "User scope"
}
}
},
"security": [
{
"Keycloak": [
"user",
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"tags": [
{
"description": "Actions relating to the reporting of the state of the service",
"name": "statusManagement"
},
{
"description": "Actions relating to the periodics actions to be triggered in the system",
"name": "triggerManagement"
},
{
"description": "Actions relating to the management of Resellers",
"name": "resellerManagement"
},
{
"description": "Actions relating to the management of Customers",
"name": "customerManagement"
},
{
"description": "Actions relating to the management of Products",
"name": "productManagement"
}
]
}`))
}