{
  "swagger": "2.0",
  "info": {
    "description": "This is a management portal server",
    "title": "Management Portal API",
    "contact": {},
    "version": "1.0"
  },
  "schemes": ["http"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "basePath": "/api/v1/devops/billing-proxy/api/v1/billing",
  "paths": {
    "/fx_rates": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "enum": [
              "aed",
              "afn",
              "all",
              "amd",
              "ang",
              "aoa",
              "ars",
              "aud",
              "awg",
              "azn",
              "bam",
              "bbd",
              "bdt",
              "bgn",
              "bif",
              "bmd",
              "bnd",
              "bob",
              "brl",
              "bsd",
              "bwp",
              "bzd",
              "cad",
              "cdf",
              "chf",
              "clp",
              "cny",
              "cop",
              "crc",
              "cve",
              "czk",
              "djf",
              "dkk",
              "dop",
              "dzd",
              "eek",
              "egp",
              "etb",
              "eur",
              "fjd",
              "fkp",
              "gbp",
              "gel",
              "gip",
              "gmd",
              "gnf",
              "gtq",
              "gyd",
              "hkd",
              "hnl",
              "hrk",
              "htg",
              "huf",
              "idr",
              "ils",
              "inr",
              "isk",
              "jmd",
              "jpy",
              "kes",
              "kgs",
              "khr",
              "kmf",
              "krw",
              "kyd",
              "kzt",
              "lak",
              "lbp",
              "lkr",
              "lrd",
              "lsl",
              "ltl",
              "lvl",
              "mad",
              "mdl",
              "mga",
              "mkd",
              "mnt",
              "mop",
              "mro",
              "mur",
              "mvr",
              "mwk",
              "mxn",
              "myr",
              "mzn",
              "nad",
              "ngn",
              "nio",
              "nok",
              "npr",
              "nzd",
              "pab",
              "pen",
              "pgk",
              "php",
              "pkr",
              "pln",
              "pyg",
              "qar",
              "ron",
              "rsd",
              "rub",
              "rwf",
              "sar",
              "sbd",
              "scr",
              "sek",
              "sgd",
              "shp",
              "sll",
              "sos",
              "srd",
              "std",
              "svc",
              "szl",
              "thb",
              "tjs",
              "top",
              "try",
              "ttd",
              "twd",
              "tzs",
              "uah",
              "ugx",
              "usd",
              "uyu",
              "uzs",
              "vef",
              "vnd",
              "vuv",
              "wst",
              "xaf",
              "xcd",
              "xof",
              "xpf",
              "yer",
              "zar",
              "zmw"
            ],
            "type": "string",
            "description": "base",
            "name": "base",
            "in": "query"
          },
          {
            "enum": [
              "aed",
              "afn",
              "all",
              "amd",
              "ang",
              "aoa",
              "ars",
              "aud",
              "awg",
              "azn",
              "bam",
              "bbd",
              "bdt",
              "bgn",
              "bif",
              "bmd",
              "bnd",
              "bob",
              "brl",
              "bsd",
              "bwp",
              "bzd",
              "cad",
              "cdf",
              "chf",
              "clp",
              "cny",
              "cop",
              "crc",
              "cve",
              "czk",
              "djf",
              "dkk",
              "dop",
              "dzd",
              "eek",
              "egp",
              "etb",
              "eur",
              "fjd",
              "fkp",
              "gbp",
              "gel",
              "gip",
              "gmd",
              "gnf",
              "gtq",
              "gyd",
              "hkd",
              "hnl",
              "hrk",
              "htg",
              "huf",
              "idr",
              "ils",
              "inr",
              "isk",
              "jmd",
              "jpy",
              "kes",
              "kgs",
              "khr",
              "kmf",
              "krw",
              "kyd",
              "kzt",
              "lak",
              "lbp",
              "lkr",
              "lrd",
              "lsl",
              "ltl",
              "lvl",
              "mad",
              "mdl",
              "mga",
              "mkd",
              "mnt",
              "mop",
              "mro",
              "mur",
              "mvr",
              "mwk",
              "mxn",
              "myr",
              "mzn",
              "nad",
              "ngn",
              "nio",
              "nok",
              "npr",
              "nzd",
              "pab",
              "pen",
              "pgk",
              "php",
              "pkr",
              "pln",
              "pyg",
              "qar",
              "ron",
              "rsd",
              "rub",
              "rwf",
              "sar",
              "sbd",
              "scr",
              "sek",
              "sgd",
              "shp",
              "sll",
              "sos",
              "srd",
              "std",
              "svc",
              "szl",
              "thb",
              "tjs",
              "top",
              "try",
              "ttd",
              "twd",
              "tzs",
              "uah",
              "ugx",
              "usd",
              "uyu",
              "uzs",
              "vef",
              "vnd",
              "vuv",
              "wst",
              "xaf",
              "xcd",
              "xof",
              "xpf",
              "yer",
              "zar",
              "zmw"
            ],
            "type": "string",
            "description": "target",
            "name": "target",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.InvoiceAppliedFXRate"
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "description": "fx",
            "name": "fx",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/forms.InvoiceAppliedFXRate"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.InvoiceAppliedFXRate"
            }
          }
        }
      }
    },
    "/global-discounts": {
      "get": {
        "description": "List global discount",
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "ListGlobalDiscount",
        "summary": "List Global Discount",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Discount"
              }
            }
          }
        }
      },
      "post": {
        "description": "Create global discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "CreateGlobalDiscount",
        "summary": "Create Global Discount",
        "parameters": [
          {
            "description": "discount",
            "name": "discount",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        }
      }
    },
    "/global-discounts/{discount_id}": {
      "put": {
        "description": "Update global discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "UpdateGlobalDiscount",
        "summary": "Update Global Discount",
        "parameters": [
          {
            "type": "string",
            "description": "discount_id",
            "name": "discount_id",
            "in": "path",
            "required": true
          },
          {
            "description": "discount",
            "name": "discount",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        }
      },
      "delete": {
        "description": "Reclaim global discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "ReclaimGlobalDiscount",
        "summary": "Reclaim Global Discount",
        "parameters": [
          {
            "type": "string",
            "description": "discount_id",
            "name": "discount_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "ListAllInvoices",
        "parameters": [
          {
            "type": "boolean",
            "description": "brief",
            "name": "brief",
            "in": "query"
          },
          {
            "type": "string",
            "description": "from, example: 2024-01-01T00:00:00Z",
            "name": "from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "to, example: 2024-01-01T00:00:00Z",
            "name": "to",
            "in": "query"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "csv",
            "description": "brief",
            "name": "statuses[]",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.InvoiceForOpsList"
              }
            }
          }
        }
      }
    },
    "/marketplace/azure/subscriptions/{payment_code}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Azure subscriptions",
        "operationId": "GetAzureSubscriptions",
        "parameters": [
          {
            "type": "string",
            "description": "payment_code",
            "name": "payment_code",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.SubscriptionList"
            }
          }
        }
      }
    },
    "/marketplace/azure/subscriptions/{subscription_id}": {
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete Azure Subscription",
        "operationId": "DeleteAzureSubscription",
        "parameters": [
          {
            "type": "string",
            "description": "subscription_id",
            "name": "subscription_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/marketplace/azure/token": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Azure Token",
        "operationId": "GetAzureToken",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/sku_groups": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get SKU Groups",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.SKUGroup"
              }
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Add SKU Groups",
        "parameters": [
          {
            "description": "SKUGroup",
            "name": "SKUGroup",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.SKUGroup"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.SKUGroup"
            }
          }
        }
      }
    },
    "/sku_groups/category": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Category View",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.CategoryNode"
              }
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Add SKU Group Category",
        "parameters": [
          {
            "description": "CategoryItemShow",
            "name": "CategoryItemShow",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CategoryItemShow"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CategoryItemShow"
            }
          }
        }
      }
    },
    "/sku_groups/category/{category}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get SKU Group Category",
        "parameters": [
          {
            "type": "string",
            "description": "category",
            "name": "category",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CategoryItemShow"
            }
          }
        }
      },
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update SKU Group Category",
        "parameters": [
          {
            "type": "string",
            "description": "category",
            "name": "category",
            "in": "path",
            "required": true
          },
          {
            "description": "CategoryItemShow",
            "name": "CategoryItemShow",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CategoryItemShow"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CategoryItemShow"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete SKU Group Category",
        "parameters": [
          {
            "type": "string",
            "description": "category",
            "name": "category",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/sku_groups/{group_id}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get SKU Group",
        "parameters": [
          {
            "type": "string",
            "description": "group_id",
            "name": "group_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.SKUGroup"
              }
            }
          }
        }
      },
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update SKU Group",
        "parameters": [
          {
            "description": "SKUGroup",
            "name": "group_id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "description": "SKUGroup",
            "name": "SKUGroup",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.SKUGroup"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.SKUGroup"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update SKU Group",
        "parameters": [
          {
            "type": "string",
            "description": "group_id",
            "name": "group_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/contracts": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List All Contract",
        "operationId": "ListAllContract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "page,default=1,min=1,max=100",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "page_size,default=20,min=1,max=100",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.ContractsResponse"
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Contract",
        "operationId": "CreateContract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Contract",
            "name": "contract",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.ContractInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Contract"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/contracts/{contract_id}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Contract",
        "operationId": "GetContract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "contract_id",
            "name": "contract_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Contract"
            }
          }
        }
      },
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "UpdateContract",
        "summary": "Update Contract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "contract_id",
            "name": "contract_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Contract",
            "name": "contract",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.ContractInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Contract"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/contracts/{contract_id}/actions/{action}": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "OperateContract",
        "summary": "Operate Contract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "contract_id",
            "name": "contract_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "action",
            "name": "action",
            "in": "path",
            "required": true,
            "enum": ["create", "submit", "cancel", "delete", "terminate"]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/contracts/{contract_id}/download": {
      "get": {
        "operationId": "DownloadContract",
        "summary": "Download Contract",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "contract_id",
            "name": "contract_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/apiHttpBody"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/trends": {
      "post": {
        "operationId": "GetCostExplorerTrends",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Cost Explorer Trends",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Query",
            "name": "Query",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsOutput"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/trends/csv": {
      "post": {
        "operationId": "ExportCostExplorerTrends",
        "consumes": ["application/json"],
        "produces": ["text/csv"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "display_discounts_and_credits",
            "name": "with_discounts_and_credits",
            "in": "query"
          },
          {
            "description": "Query",
            "name": "Query",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/costexplorer/args": {
      "get": {
        "operationId": "GetTenantCostExplorerArgs",
        "produces": ["application/json"],
        "summary": "Cost Explorer Args",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CostExplorerArgs"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/costexplorer/trends": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Cost Explorer Trends",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Query",
            "name": "Query",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsOutput"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/costexplorer/trends/csv": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["text/csv"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Query",
            "name": "Query",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CostExploreTrendsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/budgets": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List All Tenant Budgets",
        "operationId": "ListAllBudgets",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Budget"
              }
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Budget",
        "operationId": "CreateBudget",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "budget",
            "name": "budget",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Budget"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Budget"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/budgets/{budget_id}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Budget",
        "operationId": "GetBudget",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Budget"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete Budget",
        "operationId": "DeleteBudget",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      },
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Budget Limitation",
        "operationId": "UpdateBudget",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          },
          {
            "description": "name",
            "name": "budget",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/forms.Budget"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Budget"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/budgets/{budget_id}/thresholds": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Add Budget Threshold",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.SpendLimitThreshold"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/budgets/{budget_id}/thresholds/{threshold_id}": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Budget Threshold",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "threshold_id",
            "name": "threshold_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.SpendLimitThreshold"
              }
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete Budget Threshold",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "budget_id",
            "name": "budget_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "threshold_id",
            "name": "threshold_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/cppo_billing_config": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CreateCPPOBillingConfig",
        "summary": "Create CPPO Billing Config",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "CPPOBillingConfig",
            "name": "CPPOBillingConfig",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CPPOBillingConfig"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/mcpo_billing_config": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CreateMCPOBillingConfig",
        "summary": "Create MCPO Billing Config",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "MCPOBillingConfig",
            "name": "MCPOBillingConfig",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.MCPOBillingConfig"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/credits": {
      "get": {
        "operationId": "ListTenantsCredits",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "summary": "List Tenants Credits",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.CreditsPackage"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "CreateCredits",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Credits",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "credits",
            "name": "credits",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CreateCreditsPackageReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CreditsPackage"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/credits/{credit_id}": {
      "get": {
        "operationId": "GetTenantCredits",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "credit_id",
            "name": "credit_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "summary": "Get Credits",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CreditsPackage"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/credits/{credit_id}/actions/reclaim": {
      "post": {
        "operationId": "ReclaimCredits",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "credit_id",
            "name": "credit_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "summary": "Reclaim Credits",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/credits_summary": {
      "get": {
        "operationId": "GetTenantsCreditsSummary",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "summary": "Get Tenants Credits Summary",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CreditsSummary"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/discounts": {
      "get": {
        "description": "List tenant discount",
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "ListTenantDiscount",
        "summary": "List Tenant Discount",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Discount"
              }
            }
          }
        }
      },
      "post": {
        "description": "Create tenant discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "CreateTenantDiscount",
        "summary": "Create Tenant Discount",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "discount",
            "name": "discount",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/discounts/{discount_id}": {
      "put": {
        "description": "Update tenant discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "summary": "Update Tenant Discount",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "discount_id",
            "name": "discount_id",
            "in": "path",
            "required": true
          },
          {
            "description": "discount",
            "name": "discount",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Discount"
            }
          }
        }
      },
      "delete": {
        "description": "Reclaim tenant discount",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["DiscountInfo"],
        "operationId": "ReclaimTenantDiscount",
        "summary": "Reclaim Tenant Discount",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "discount_id",
            "name": "discount_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/invoices": {
      "get": {
        "operationId": "ListInvoicesV1",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List Invoices",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "brief",
            "name": "brief",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Invoice"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "CreateInvoiceV1",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "CreateInvoiceReq",
            "name": "CreateInvoiceReq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CreateInvoiceReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/invoices/{invoice_id}": {
      "get": {
        "operationId": "GetInvoiceV1",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteUnsentInvoiceV1",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete Unsent Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/cr_tables/init": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["text/csv"],
        "operationId": "GenerateInitCRTable",
        "summary": "Generate Init CR Table",
        "parameters": [
          {
            "type": "integer",
            "description": "year",
            "name": "year",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "month",
            "name": "month",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "/paying": {
      "get": {
        "description": "Returns recent paying tasks and the carryover dashboard summary.",
        "produces": ["application/json"],
        "tags": ["StripePaying"],
        "summary": "List recent Stripe invoice paying tasks",
        "parameters": [
          {
            "type": "integer",
            "default": 20,
            "description": "Number of payings to return (maximum 100)",
            "name": "paying_limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/api.StripePayingListResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a persisted Stripe invoice paying task for the requested month.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePaying"],
        "summary": "Create a Stripe invoice paying task",
        "parameters": [
          {
            "description": "Paying request",
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/api.CreatePayingRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/api.StripePayingResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/api.StripePayingErrorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/api.StripePayingConflictResponse"
            }
          }
        }
      }
    },
    "/paying/{id}": {
      "get": {
        "description": "Returns the full result of one Stripe invoice paying task.",
        "produces": ["application/json"],
        "tags": ["StripePaying"],
        "summary": "Get a Stripe invoice paying task",
        "parameters": [
          {
            "type": "integer",
            "description": "Paying ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/api.StripePayingDetailResult"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/api.StripePayingErrorResponse"
            }
          }
        }
      }
    },
    "/ar_tables": {
      "get": {
        "description": "Query AR table records with pagination and optional filters (year, month, is_estimated, tenant_id, payment_type, binded_billing_config_id).",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List AR Table Records",
        "parameters": [
          {
            "type": "integer",
            "description": "filter by year (used with month, e.g. 2025)",
            "name": "year",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by month (used with year, e.g. 4)",
            "name": "month",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by estimated flag",
            "name": "is_estimated",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by tenant ID",
            "name": "tenant_id",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by payment type (e.g. stripe, wire_transfer, aws)",
            "name": "payment_type",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by binded billing config ID",
            "name": "binded_billing_config_id",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "page number, default=1, min=1, max=100",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "page size, default=20, min=1, max=100",
            "name": "page_size",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.ARTableListResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      },
      "post": {
        "description": "Create a new AR table record. All fields except ID (primary key) are supported.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create AR Table Record",
        "parameters": [
          {
            "description": "AR table record to create",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.ARTableCreateInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.ARTableRecordResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      }
    },
    "/ar_tables/download": {
      "get": {
        "description": "Download AR table records as a CSV file with optional filters (year, month, is_estimated, tenant_id, payment_type, binded_billing_config_id).",
        "consumes": ["application/json"],
        "summary": "Download AR Table Records as CSV",
        "parameters": [
          {
            "type": "integer",
            "description": "filter by year (used with month, e.g. 2025)",
            "name": "year",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by month (used with year, e.g. 4)",
            "name": "month",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "filter by estimated flag",
            "name": "is_estimated",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by tenant ID",
            "name": "tenant_id",
            "in": "query"
          },
          {
            "type": "string",
            "description": "filter by payment type (e.g. stripe, wire_transfer, aws)",
            "name": "payment_type",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "filter by binded billing config ID",
            "name": "binded_billing_config_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file",
            "schema": {
              "type": "file"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      }
    },
    "/ar_tables/{id}": {
      "get": {
        "description": "Get a single AR table record by its primary key ID.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get AR Table Record by ID",
        "parameters": [
          {
            "type": "integer",
            "description": "AR table record ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.ARTableRecordResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      },
      "put": {
        "description": "Update an existing AR table record by ID. Only non-zero fields in the request body will be updated. Primary key (ID) is not allowed to be modified.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update AR Table Record",
        "parameters": [
          {
            "type": "integer",
            "description": "AR table record ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "fields to update (only non-zero fields will be applied)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.ARTableUpdateInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.ARTableRecordResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      },
      "delete": {
        "description": "Soft-delete an AR table record by its primary key ID.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete AR Table Record",
        "parameters": [
          {
            "type": "integer",
            "description": "AR table record ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/billing_errors.BaseError"
            }
          }
        }
      }
    },
    "/billing_configs/managed_tenants/{tenant_id}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "GetBillingConfigsByManagedTenant",
        "summary": "Get Billing Configs By Managed Tenant",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BillingConfig"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_info": {
      "get": {
        "operationId": "GetBillingInfo",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get BillingInfo",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BillingInformation"
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateBillingInfo",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update BillingInfo",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "BillingInformation",
            "name": "Query",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.BillingInformationInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BillingInformation"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/tax_rates": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "UpdateTenantTaxRate",
        "summary": "Update Tenant TaxRate",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.TaxRate"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_configs": {
      "get": {
        "operationId": "ListBillingConfigs",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List Billing Configs",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.BillingConfig"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "ListInvoices",
        "summary": "List Invoices",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "brief",
            "name": "brief",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.Invoice"
              }
            }
          }
        }
      },
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CreateInvoice",
        "summary": "Create Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "CreateInvoiceReq",
            "name": "CreateInvoiceReq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CreateInvoiceReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/support_plan": {
      "get": {
        "operationId": "GetPublicSupportPlan",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Public Support Plan",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.SupportPlan"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/binded_support_plan/private": {
      "post": {
        "operationId": "TenantBindPrivateSupportPlan",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Tenant Bind Private Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "PrivateSupportPlanReq",
            "name": "PrivateSupportPlanReq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.SupportPlanInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BindedSupportPlan"
            }
          }
        }
      }
    },
    "/support_plan/{support_plan_id}": {
      "put": {
        "operationId": "UpdatePublicSupportPlan",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Public Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "support_plan_id",
            "name": "support_plan_id",
            "in": "path",
            "required": true
          },
          {
            "description": "UpdateSupportPlanReq",
            "name": "UpdateSupportPlanReq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.SupportPlanInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.SupportPlan"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/binded_support_plan/public": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "TenantBindPublicSupportPlan",
        "summary": "Tenant Bind Public Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "BindSupportPlanReq",
            "name": "BindSupportPlanReq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.BindedSupportPlan"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BindedSupportPlan"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CancelTennatPublicSupportPlan",
        "summary": "Cancel Tenant Public Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/binded_support_plan": {
      "get": {
        "operationId": "GetTenantSupportPlanV2",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Tenant Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BindedSupportPlan"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/binded_support_plan": {
      "get": {
        "operationId": "GetTenantSupportPlan",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Tenant Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.BindedSupportPlan"
            }
          }
        }
      },
      "delete": {
        "operationId": "CancelActivatedTenantSupportPlan",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Cancel Activated Tenant Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/binded_support_plan/{binded_support_plan_id}": {
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "cancelTenantSupportPlan",
        "summary": "Cancel Tenant Support Plan",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "binded_support_plan_id",
            "name": "binded_support_plan_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/binded_support_plan/list": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "ListTenantSupportPlans",
        "summary": "List Tenant Support Plans",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.BindedSupportPlan"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/commitment_invoices": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CreateCommitmentInvoice",
        "summary": "Create Commitment Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "description": "CommitmentInvoiceInput",
            "name": "CommitmentInvoiceInput",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.CommitmentInvoiceInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices/{invoice_id}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "GetInvoice",
        "summary": "Get Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "DeleteUnsentInvoice",
        "summary": "Delete Unsent Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices/{invoice_id}/confirm": {
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "ConfirmInvoice",
        "summary": "Confirm Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices/{invoice_id}/modify": {
      "post": {
        "operationId": "ModifyInvoice",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices/{invoice_id}/send": {
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "SendInovice",
        "summary": "Send Invoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/stripe/invoices": {
      "get": {
        "operationId": "ListStripeInvoices",
        "description": "ListStripeInvoices",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePayment"],
        "summary": "ListStripeInvoices",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.StripeInvoice"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/invoices/{invoice_id}/suspend": {
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Suspend Invoice",
        "operationId": "SuspendInvoice",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.Invoice"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List Tenant Payment Methods",
        "operationId": "ListTenantPaymentMethods",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.PaymentMethod"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/active": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "GetActivePaymentMethod",
        "summary": "Get Active PaymentMethod",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.PaymentMethod"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/types": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "listTenantPaymentTypes",
        "summary": "List Tenant Payment Types",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.PaymentMethodType"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/{payment_type}/code": {
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Payment Code and SubCode",
        "operationId": "UpdatePaymentCodeAndSubCode",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_type, e.g. wire_transfer",
            "name": "payment_type",
            "in": "path",
            "required": true
          },
          {
            "description": "PaymentCodeUpdateQuery",
            "name": "payment_code_update_query",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/forms.PaymentCodeUpdateQuery"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.PaymentMethod"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/{payment_type}/invoiceable": {
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Payment Invoiceable",
        "operationId": "UpdatePaymentInvoviceable",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_type",
            "name": "payment_type",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.PaymentMethod"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/stripe/invoices/{invoice_id}/payment_required_notification": {
      "post": {
        "description": "manually send notification and email to notify customer need to pay the invoice",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "manually send notification and email to notify customer need to pay the invoice",
        "operationId": "Stripe_CreditCardPaymentRequiredNotification",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "invoice_id",
            "name": "invoice_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/payments/setup/{payment_type}": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "SetupPaymentMethodV1",
        "summary": "Setup PaymentMethod",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_type, e.g. endorsed",
            "name": "payment_type",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/setup/{payment_type}": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "SetupPaymentMethod",
        "summary": "Setup PaymentMethod",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_type, e.g. endorsed",
            "name": "payment_type",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/bills_details/year/{year}/month/{month}": {
      "get": {
        "operationId": "getBillsDetails",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "year",
            "name": "year",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "month",
            "name": "month",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.CostExplorerDetailsResult"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/monthly_bills/year/{year}/month/{month}/export": {
      "post": {
        "operationId": "getMonthlyBillsExport",
        "consumes": ["application/json"],
        "produces": ["application/octet-stream"],
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "year",
            "name": "year",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "month",
            "name": "month",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/apiHttpBody"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/monthly_cost/year/{year}/month/{month}": {
      "get": {
        "operationId": "GetMonthlyCost",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Cost Explorer Monthly",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "year",
            "name": "year",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "month",
            "name": "month",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.MonthlycostExplorerResult"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/costexplorer/monthly_cost/year/{year}/month/{month}/export": {
      "post": {
        "operationId": "ExportMonthBillCSV",
        "consumes": ["application/json"],
        "produces": ["application/octet-stream"],
        "summary": "Cost Explorer Monthly",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "year",
            "name": "year",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "month",
            "name": "month",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.MonthlycostExplorerResult"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/stripe/payment_methods": {
      "get": {
        "operationId": "ListStripePaymentMethods",
        "description": "ListStripePaymentMethods",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePayment"],
        "summary": "ListPaymentMethods",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.StripePaymentMethod"
              }
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/stripe/payment_methods/{payment_method_id}": {
      "put": {
        "description": "UpdatePaymentMethod",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePayment"],
        "summary": "UpdatePaymentMethod",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_method_id",
            "name": "payment_method_id",
            "in": "path",
            "required": true
          },
          {
            "description": "method",
            "name": "method",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.StripePaymentMethod"
            }
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.StripePaymentMethod"
            }
          }
        }
      },
      "delete": {
        "description": "DeletePaymentMethod",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePayment"],
        "summary": "DeletePaymentMethod",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_method_id",
            "name": "payment_method_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/billing_config_id/{billing_config_id}/payments/stripe/payment_methods/{payment_method_id}/default": {
      "put": {
        "description": "SetPaymentMethodDefault",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "tags": ["StripePayment"],
        "summary": "SetPaymentMethodDefault",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "payment_method_id",
            "name": "payment_method_id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "billing_config_id",
            "name": "billing_config_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/measures": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CostUnitsMeasure",
        "summary": "Cost Units Measure",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Cost",
            "name": "Cost",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.UnitCostsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitCosts"
            }
          }
        }
      }
    },
    "/tenants/{tenant_id}/measures/dryrun": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "operationId": "CostUnitsDryrun",
        "summary": "Cost Units Dryrun",
        "parameters": [
          {
            "type": "string",
            "description": "tenant_id",
            "name": "tenant_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Cost",
            "name": "Cost",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.UnitCostsInput"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitCosts"
            }
          }
        }
      }
    },
    "/units": {
      "get": {
        "description": "Return units matching group_id or the group's non-empty category. Without group_id, return all units.",
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "List Units By GroupID",
        "parameters": [
          {
            "type": "integer",
            "description": "group_id",
            "name": "group_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/forms.UnitInfo"
              }
            }
          }
        }
      }
    },
    "/units/_create_by_group": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Unit By Group",
        "parameters": [
          {
            "description": "UnitByGroup",
            "name": "UnitByGroup",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.UnitByGroup"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitInfo"
            }
          }
        }
      }
    },
    "/units/_create_by_group/dryrun": {
      "post": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Create Unit By Group",
        "parameters": [
          {
            "description": "UnitByGroup",
            "name": "UnitByGroup",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.UnitByGroup"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitInfo"
            }
          }
        }
      }
    },
    "/units/{unit_key}": {
      "get": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Get Unit",
        "parameters": [
          {
            "type": "string",
            "description": "UnitKey",
            "name": "unit_key",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitInfo"
            }
          }
        }
      },
      "put": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Update Unit",
        "parameters": [
          {
            "type": "string",
            "description": "UnitKey",
            "name": "unit_key",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitInfo"
            }
          }
        }
      },
      "delete": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Delete Unit",
        "parameters": [
          {
            "type": "string",
            "description": "UnitKey",
            "name": "unit_key",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.OKType"
            }
          }
        }
      },

      "patch": {
        "consumes": ["application/json"],
        "produces": ["application/json"],
        "summary": "Patch Unit",
        "parameters": [
          {
            "type": "string",
            "description": "UnitKey",
            "name": "unit_key",
            "in": "path",
            "required": true
          },
          {
            "description": "unit patch",
            "name": "unit",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/forms.UnitPatch"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitInfo"
            }
          }
        }
      }
    },
    "/units/_export": {
      "get": {
        "description": "Export units selected by group_id or the group's non-empty category. Without group_id, the CSV contains only its header. SQL NULL values are represented as \\N.",
        "produces": ["text/csv"],
        "summary": "Export Units CSV",
        "parameters": [
          {
            "type": "integer",
            "description": "group_id",
            "name": "group_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "units CSV file",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/units/_import": {
      "post": {
        "description": "Atomically upsert units by unit_key. The endpoint accepts a multipart file field named file or a raw text/csv body.",
        "consumes": ["multipart/form-data", "text/csv"],
        "produces": ["application/json"],
        "summary": "Import Units CSV",
        "parameters": [
          {
            "type": "file",
            "description": "units CSV file (required for multipart requests)",
            "name": "file",
            "in": "formData"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/forms.UnitCSVImportResult"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "api.CreatePayingRequest": {
      "type": "object",
      "required": ["month"],
      "properties": {
        "force": {
          "type": "boolean",
          "example": false
        },
        "month": {
          "type": "string",
          "example": "2026-06"
        }
      }
    },
    "api.StripePayingCarryoverSummary": {
      "type": "object",
      "properties": {
        "oldest_first_carry_month": {
          "type": "string"
        },
        "total_amount": {
          "type": "string"
        },
        "total_count": {
          "type": "integer"
        }
      }
    },
    "api.StripePayingConflictResponse": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string"
        },
        "existing_paying": {
          "$ref": "#/definitions/api.StripePayingResponse"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "api.StripePayingDetailResponse": {
      "type": "object",
      "properties": {
        "completed_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "duration_seconds": {
          "type": "integer"
        },
        "error_message": {
          "type": "string"
        },
        "month": {
          "type": "string"
        },
        "paying_id": {
          "type": "integer"
        },
        "picked_up_at": {
          "type": "string"
        },
        "result": {},
        "status": {
          "type": "string"
        }
      }
    },
    "api.StripePayingDetailResult": {
      "type": "object",
      "properties": {
        "paying": {
          "$ref": "#/definitions/api.StripePayingDetailResponse"
        }
      }
    },
    "api.StripePayingErrorResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "error": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "api.StripePayingListResponse": {
      "type": "object",
      "properties": {
        "carryover_summary": {
          "$ref": "#/definitions/api.StripePayingCarryoverSummary"
        },
        "payings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/api.StripePayingResponse"
          }
        }
      }
    },
    "api.StripePayingResponse": {
      "type": "object",
      "properties": {
        "completed_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "duration_seconds": {
          "type": "integer"
        },
        "error_message": {
          "type": "string"
        },
        "month": {
          "type": "string"
        },
        "paying_id": {
          "type": "integer"
        },
        "picked_up_at": {
          "type": "string"
        },
        "result": {},
        "status": {
          "type": "string"
        }
      }
    },
    "billing_errors.BaseError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "error": {},
        "msgPrefix": {
          "type": "string"
        },
        "status": {
          "type": "integer"
        }
      }
    },
    "forms.ARTableCreateInput": {
      "type": "object",
      "required": [
        "bill_month",
        "binded_billing_config_id",
        "payment_type",
        "tenant_id"
      ],
      "properties": {
        "bill_month": {
          "type": "string"
        },
        "binded_billing_config_id": {
          "type": "integer"
        },
        "channel_loss_amount": {
          "type": "string"
        },
        "cppo_discountable_product_amount": {
          "type": "string"
        },
        "cppo_non_discountable_product_amount": {
          "type": "string"
        },
        "dedicated_accrual_amount": {
          "type": "string"
        },
        "dedicated_allocated_loss": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "essential_allocated_loss": {
          "type": "string"
        },
        "invoice_amount": {
          "type": "string"
        },
        "is_estimated": {
          "type": "boolean"
        },
        "lake_allocated_loss": {
          "type": "string"
        },
        "marketplace_amount": {
          "type": "string"
        },
        "partner_id": {
          "type": "string"
        },
        "payment_code": {
          "type": "string"
        },
        "payment_type": {
          "type": "string"
        },
        "premium_allocated_loss": {
          "type": "string"
        },
        "prepayment_credits": {
          "type": "string"
        },
        "raw_dedicated_amount": {
          "type": "string"
        },
        "raw_dedicated_customer_success_amount": {
          "type": "string"
        },
        "raw_dedicated_program_credits_amount": {
          "type": "string"
        },
        "raw_dedicated_redeem_credits_amount": {
          "type": "string"
        },
        "raw_essential_amount": {
          "type": "string"
        },
        "raw_essential_customer_success_amount": {
          "type": "string"
        },
        "raw_essential_program_credits_amount": {
          "type": "string"
        },
        "raw_essential_redeem_credits_amount": {
          "type": "string"
        },
        "raw_lake_amount": {
          "type": "string"
        },
        "raw_lake_customer_success_amount": {
          "type": "string"
        },
        "raw_lake_program_credits_amount": {
          "type": "string"
        },
        "raw_lake_redeem_credits_amount": {
          "type": "string"
        },
        "raw_premium_amount": {
          "type": "string"
        },
        "raw_premium_customer_success_amount": {
          "type": "string"
        },
        "raw_premium_program_credits_amount": {
          "type": "string"
        },
        "raw_premium_redeem_credits_amount": {
          "type": "string"
        },
        "raw_serverless_amount": {
          "type": "string"
        },
        "raw_serverless_customer_success_amount": {
          "type": "string"
        },
        "raw_serverless_program_credits_amount": {
          "type": "string"
        },
        "raw_serverless_redeem_credits_amount": {
          "type": "string"
        },
        "raw_starter_amount": {
          "type": "string"
        },
        "raw_starter_customer_success_amount": {
          "type": "string"
        },
        "raw_starter_program_credits_amount": {
          "type": "string"
        },
        "raw_starter_redeem_credits_amount": {
          "type": "string"
        },
        "raw_support_amount": {
          "type": "string"
        },
        "raw_support_customer_success_amount": {
          "type": "string"
        },
        "raw_support_program_credits_amount": {
          "type": "string"
        },
        "raw_support_redeem_credits_amount": {
          "type": "string"
        },
        "serverless_allocated_loss": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "starter_allocated_loss": {
          "type": "string"
        },
        "stripe_amount": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_amount_including_tax": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_finalized_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_number": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_tax_rate": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "support_accrual_amount": {
          "type": "string"
        },
        "support_allocated_loss": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "total_amount": {
          "type": "string"
        },
        "wire_transfer_amount": {
          "type": "string"
        }
      }
    },
    "forms.ARTableListResponse": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer"
        },
        "page_size": {
          "type": "integer"
        },
        "records": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.ARTableRecordResponse"
          }
        },
        "total_results": {
          "type": "integer"
        }
      }
    },
    "forms.ARTableRecordResponse": {
      "type": "object",
      "properties": {
        "bill_month": {
          "type": "string",
          "example": "2025-04"
        },
        "binded_billing_config_id": {
          "type": "integer",
          "example": 1
        },
        "channel_loss_amount": {
          "type": "string"
        },
        "cppo_discountable_product_amount": {
          "type": "string"
        },
        "cppo_non_discountable_product_amount": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "dedicated_accrual_amount": {
          "type": "string"
        },
        "dedicated_allocated_loss": {
          "type": "string"
        },
        "dedicated_amount": {
          "type": "string"
        },
        "end_date": {
          "type": "string",
          "example": "2025-04-30"
        },
        "essential_allocated_loss": {
          "type": "string"
        },
        "essential_amount": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "example": 1
        },
        "invoice_amount": {
          "type": "string",
          "example": "150.00"
        },
        "is_estimated": {
          "type": "boolean",
          "example": false
        },
        "lake_allocated_loss": {
          "type": "string"
        },
        "lake_amount": {
          "type": "string"
        },
        "marketplace_amount": {
          "type": "string",
          "example": "50.00"
        },
        "partner_id": {
          "type": "string",
          "example": "partner_abc"
        },
        "payment_code": {
          "type": "string",
          "example": "cus_abc123"
        },
        "payment_type": {
          "type": "string",
          "example": "stripe"
        },
        "premium_allocated_loss": {
          "type": "string"
        },
        "premium_amount": {
          "type": "string"
        },
        "prepayment_credits": {
          "type": "string",
          "example": "20.00"
        },
        "raw_dedicated_amount": {
          "type": "string"
        },
        "raw_dedicated_customer_success_amount": {
          "type": "string"
        },
        "raw_dedicated_program_credits_amount": {
          "type": "string"
        },
        "raw_dedicated_redeem_credits_amount": {
          "type": "string"
        },
        "raw_essential_amount": {
          "type": "string"
        },
        "raw_essential_customer_success_amount": {
          "type": "string"
        },
        "raw_essential_program_credits_amount": {
          "type": "string"
        },
        "raw_essential_redeem_credits_amount": {
          "type": "string"
        },
        "raw_lake_amount": {
          "type": "string"
        },
        "raw_lake_customer_success_amount": {
          "type": "string"
        },
        "raw_lake_program_credits_amount": {
          "type": "string"
        },
        "raw_lake_redeem_credits_amount": {
          "type": "string"
        },
        "raw_premium_amount": {
          "type": "string"
        },
        "raw_premium_customer_success_amount": {
          "type": "string"
        },
        "raw_premium_program_credits_amount": {
          "type": "string"
        },
        "raw_premium_redeem_credits_amount": {
          "type": "string"
        },
        "raw_serverless_amount": {
          "type": "string"
        },
        "raw_serverless_customer_success_amount": {
          "type": "string"
        },
        "raw_serverless_program_credits_amount": {
          "type": "string"
        },
        "raw_serverless_redeem_credits_amount": {
          "type": "string"
        },
        "raw_starter_amount": {
          "type": "string"
        },
        "raw_starter_customer_success_amount": {
          "type": "string"
        },
        "raw_starter_program_credits_amount": {
          "type": "string"
        },
        "raw_starter_redeem_credits_amount": {
          "type": "string"
        },
        "raw_support_amount": {
          "type": "string"
        },
        "raw_support_customer_success_amount": {
          "type": "string"
        },
        "raw_support_program_credits_amount": {
          "type": "string"
        },
        "raw_support_redeem_credits_amount": {
          "type": "string"
        },
        "serverless_allocated_loss": {
          "type": "string"
        },
        "serverless_amount": {
          "type": "string"
        },
        "start_date": {
          "type": "string",
          "example": "2025-04-01"
        },
        "starter_allocated_loss": {
          "type": "string"
        },
        "starter_amount": {
          "type": "string"
        },
        "stripe_amount": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_amount_including_tax": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_finalized_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_number": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_tax_rate": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "support_accrual_amount": {
          "type": "string"
        },
        "support_allocated_loss": {
          "type": "string"
        },
        "support_amount": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer",
          "example": 100
        },
        "total_amount": {
          "type": "string",
          "example": "170.00"
        },
        "updated_at": {
          "type": "string",
          "example": "2025-01-01T00:00:00Z"
        },
        "wire_transfer_amount": {
          "type": "string",
          "example": "100.00"
        }
      }
    },
    "forms.ARTableUpdateInput": {
      "type": "object",
      "required": [
        "bill_month",
        "binded_billing_config_id",
        "payment_type",
        "tenant_id"
      ],
      "properties": {
        "bill_month": {
          "type": "string"
        },
        "binded_billing_config_id": {
          "type": "integer"
        },
        "channel_loss_amount": {
          "type": "string"
        },
        "cppo_discountable_product_amount": {
          "type": "string"
        },
        "cppo_non_discountable_product_amount": {
          "type": "string"
        },
        "dedicated_accrual_amount": {
          "type": "string"
        },
        "dedicated_allocated_loss": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "essential_allocated_loss": {
          "type": "string"
        },
        "invoice_amount": {
          "type": "string"
        },
        "is_estimated": {
          "type": "boolean"
        },
        "lake_allocated_loss": {
          "type": "string"
        },
        "marketplace_amount": {
          "type": "string"
        },
        "partner_id": {
          "type": "string"
        },
        "payment_code": {
          "type": "string"
        },
        "payment_type": {
          "type": "string"
        },
        "premium_allocated_loss": {
          "type": "string"
        },
        "prepayment_credits": {
          "type": "string"
        },
        "raw_dedicated_amount": {
          "type": "string"
        },
        "raw_dedicated_customer_success_amount": {
          "type": "string"
        },
        "raw_dedicated_program_credits_amount": {
          "type": "string"
        },
        "raw_dedicated_redeem_credits_amount": {
          "type": "string"
        },
        "raw_essential_amount": {
          "type": "string"
        },
        "raw_essential_customer_success_amount": {
          "type": "string"
        },
        "raw_essential_program_credits_amount": {
          "type": "string"
        },
        "raw_essential_redeem_credits_amount": {
          "type": "string"
        },
        "raw_lake_amount": {
          "type": "string"
        },
        "raw_lake_customer_success_amount": {
          "type": "string"
        },
        "raw_lake_program_credits_amount": {
          "type": "string"
        },
        "raw_lake_redeem_credits_amount": {
          "type": "string"
        },
        "raw_premium_amount": {
          "type": "string"
        },
        "raw_premium_customer_success_amount": {
          "type": "string"
        },
        "raw_premium_program_credits_amount": {
          "type": "string"
        },
        "raw_premium_redeem_credits_amount": {
          "type": "string"
        },
        "raw_serverless_amount": {
          "type": "string"
        },
        "raw_serverless_customer_success_amount": {
          "type": "string"
        },
        "raw_serverless_program_credits_amount": {
          "type": "string"
        },
        "raw_serverless_redeem_credits_amount": {
          "type": "string"
        },
        "raw_starter_amount": {
          "type": "string"
        },
        "raw_starter_customer_success_amount": {
          "type": "string"
        },
        "raw_starter_program_credits_amount": {
          "type": "string"
        },
        "raw_starter_redeem_credits_amount": {
          "type": "string"
        },
        "raw_support_amount": {
          "type": "string"
        },
        "raw_support_customer_success_amount": {
          "type": "string"
        },
        "raw_support_program_credits_amount": {
          "type": "string"
        },
        "raw_support_redeem_credits_amount": {
          "type": "string"
        },
        "serverless_allocated_loss": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "starter_allocated_loss": {
          "type": "string"
        },
        "stripe_amount": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_amount_including_tax": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_finalized_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_number": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_invoice_paid_date": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stripe_tax_rate": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "support_accrual_amount": {
          "type": "string"
        },
        "support_allocated_loss": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "total_amount": {
          "type": "string"
        },
        "wire_transfer_amount": {
          "type": "string"
        }
      }
    },
    "forms.Contract": {
      "type": "object",
      "properties": {
        "contact_email": {
          "type": "string"
        },
        "contract_id": {
          "type": "string"
        },
        "contract_type": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "last_operator_id": {
          "type": "integer"
        },
        "reason_for_last_operation": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "updated_at": {
          "type": "string"
        },
        "operated_at": {
          "type": "string"
        }
      },
      "required": ["contract_id"]
    },
    "forms.ContractInput": {
      "type": "object",
      "required": ["contact_email", "file_path"],
      "properties": {
        "contact_email": {
          "type": "string"
        },
        "contract_type": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        }
      }
    },
    "forms.ContractsResponse": {
      "type": "object",
      "properties": {
        "contracts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Contract"
          }
        },
        "page": {
          "type": "integer"
        },
        "page_size": {
          "type": "integer"
        },
        "total_results": {
          "type": "integer"
        }
      }
    },
    "forms.CreditTypeSlim": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "parent_id": {
          "type": "integer"
        },
        "type_id": {
          "type": "integer"
        }
      }
    },
    "forms.CreditType": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "general": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "parent_id": {
          "type": "integer"
        },
        "provider": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "type_id": {
          "type": "integer"
        },
        "unit_key_pattern": {
          "type": "string"
        }
      }
    },
    "forms.CreditTypeNode": {
      "type": "object",
      "properties": {
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CreditTypeNode"
          }
        },
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type_id": {
          "type": "integer"
        }
      }
    },
    "forms.CreateCreditsPackageReq": {
      "type": "object",
      "properties": {
        "bind_types": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitFilterSlim"
          }
        },
        "clusters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "discount_enabled": {
          "type": "boolean"
        },
        "expired_date": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "provider": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "total_credits": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "unit_filters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitFilterSlim"
          }
        },
        "usage": {
          "type": "string"
        },
        "usage_extend": {
          "type": "string"
        }
      }
    },
    "forms.CreditsPackage": {
      "type": "object",
      "properties": {
        "bind_types": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitFilterSlim"
          }
        },
        "binded_billing_config_id": {
          "type": "integer"
        },
        "binded_package_id": {
          "type": "integer"
        },
        "closed_date": {
          "type": "string"
        },
        "closed_reason": {
          "type": "string"
        },
        "clusters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "credits_code": {
          "type": "string"
        },
        "credits_package_id": {
          "type": "integer"
        },
        "customers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "discount_enabled": {
          "type": "boolean"
        },
        "expired_date": {
          "type": "string"
        },
        "internal": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "provider": {
          "type": "string"
        },
        "remaining_credits": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "total_credits": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "unit_filters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitFilterSlim"
          }
        },
        "usage": {
          "type": "string"
        },
        "usage_extend": {
          "type": "string"
        }
      }
    },
    "forms.CreditsSummary": {
      "type": "object",
      "properties": {
        "available_costed_credits": {
          "type": "string"
        },
        "available_credits": {
          "type": "string"
        },
        "available_remaining_credits": {
          "type": "string"
        },
        "last_credits_closed_date": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "total_costed_credits": {
          "type": "string"
        },
        "total_credits": {
          "type": "string"
        }
      }
    },
    "forms.Currency": {
      "type": "string",
      "enum": [
        "aed",
        "afn",
        "all",
        "amd",
        "ang",
        "aoa",
        "ars",
        "aud",
        "awg",
        "azn",
        "bam",
        "bbd",
        "bdt",
        "bgn",
        "bif",
        "bmd",
        "bnd",
        "bob",
        "brl",
        "bsd",
        "bwp",
        "bzd",
        "cad",
        "cdf",
        "chf",
        "clp",
        "cny",
        "cop",
        "crc",
        "cve",
        "czk",
        "djf",
        "dkk",
        "dop",
        "dzd",
        "eek",
        "egp",
        "etb",
        "eur",
        "fjd",
        "fkp",
        "gbp",
        "gel",
        "gip",
        "gmd",
        "gnf",
        "gtq",
        "gyd",
        "hkd",
        "hnl",
        "hrk",
        "htg",
        "huf",
        "idr",
        "ils",
        "inr",
        "isk",
        "jmd",
        "jpy",
        "kes",
        "kgs",
        "khr",
        "kmf",
        "krw",
        "kyd",
        "kzt",
        "lak",
        "lbp",
        "lkr",
        "lrd",
        "lsl",
        "ltl",
        "lvl",
        "mad",
        "mdl",
        "mga",
        "mkd",
        "mnt",
        "mop",
        "mro",
        "mur",
        "mvr",
        "mwk",
        "mxn",
        "myr",
        "mzn",
        "nad",
        "ngn",
        "nio",
        "nok",
        "npr",
        "nzd",
        "pab",
        "pen",
        "pgk",
        "php",
        "pkr",
        "pln",
        "pyg",
        "qar",
        "ron",
        "rsd",
        "rub",
        "rwf",
        "sar",
        "sbd",
        "scr",
        "sek",
        "sgd",
        "shp",
        "sll",
        "sos",
        "srd",
        "std",
        "svc",
        "szl",
        "thb",
        "tjs",
        "top",
        "try",
        "ttd",
        "twd",
        "tzs",
        "uah",
        "ugx",
        "usd",
        "uyu",
        "uzs",
        "vef",
        "vnd",
        "vuv",
        "wst",
        "xaf",
        "xcd",
        "xof",
        "xpf",
        "yer",
        "zar",
        "zmw"
      ],
      "x-enum-comments": {
        "CurrencyAED": "United Arab Emirates Dirham",
        "CurrencyAFN": "Afghan Afghani",
        "CurrencyALL": "Albanian Lek",
        "CurrencyAMD": "Armenian Dram",
        "CurrencyANG": "Netherlands Antillean Gulden",
        "CurrencyAOA": "Angolan Kwanza",
        "CurrencyARS": "Argentine Peso",
        "CurrencyAUD": "Australian Dollar",
        "CurrencyAWG": "Aruban Florin",
        "CurrencyAZN": "Azerbaijani Manat",
        "CurrencyBAM": "Bosnia \u0026 Herzegovina Convertible Mark",
        "CurrencyBBD": "Barbadian Dollar",
        "CurrencyBDT": "Bangladeshi Taka",
        "CurrencyBGN": "Bulgarian Lev",
        "CurrencyBIF": "Burundian Franc",
        "CurrencyBMD": "Bermudian Dollar",
        "CurrencyBND": "Brunei Dollar",
        "CurrencyBOB": "Bolivian Boliviano",
        "CurrencyBRL": "Brazilian Real",
        "CurrencyBSD": "Bahamian Dollar",
        "CurrencyBWP": "Botswana Pula",
        "CurrencyBZD": "Belize Dollar",
        "CurrencyCAD": "Canadian Dollar",
        "CurrencyCDF": "Congolese Franc",
        "CurrencyCHF": "Swiss Franc",
        "CurrencyCLP": "Chilean Peso",
        "CurrencyCNY": "Chinese Renminbi Yuan",
        "CurrencyCOP": "Colombian Peso",
        "CurrencyCRC": "Costa Rican Colón",
        "CurrencyCVE": "Cape Verdean Escudo",
        "CurrencyCZK": "Czech Koruna",
        "CurrencyDJF": "Djiboutian Franc",
        "CurrencyDKK": "Danish Krone",
        "CurrencyDOP": "Dominican Peso",
        "CurrencyDZD": "Algerian Dinar",
        "CurrencyEEK": "Estonian Kroon",
        "CurrencyEGP": "Egyptian Pound",
        "CurrencyETB": "Ethiopian Birr",
        "CurrencyEUR": "Euro",
        "CurrencyFJD": "Fijian Dollar",
        "CurrencyFKP": "Falkland Islands Pound",
        "CurrencyGBP": "British Pound",
        "CurrencyGEL": "Georgian Lari",
        "CurrencyGIP": "Gibraltar Pound",
        "CurrencyGMD": "Gambian Dalasi",
        "CurrencyGNF": "Guinean Franc",
        "CurrencyGTQ": "Guatemalan Quetzal",
        "CurrencyGYD": "Guyanese Dollar",
        "CurrencyHKD": "Hong Kong Dollar",
        "CurrencyHNL": "Honduran Lempira",
        "CurrencyHRK": "Croatian Kuna",
        "CurrencyHTG": "Haitian Gourde",
        "CurrencyHUF": "Hungarian Forint",
        "CurrencyIDR": "Indonesian Rupiah",
        "CurrencyILS": "Israeli New Sheqel",
        "CurrencyINR": "Indian Rupee",
        "CurrencyISK": "Icelandic Króna",
        "CurrencyJMD": "Jamaican Dollar",
        "CurrencyJPY": "Japanese Yen",
        "CurrencyKES": "Kenyan Shilling",
        "CurrencyKGS": "Kyrgyzstani Som",
        "CurrencyKHR": "Cambodian Riel",
        "CurrencyKMF": "Comorian Franc",
        "CurrencyKRW": "South Korean Won",
        "CurrencyKYD": "Cayman Islands Dollar",
        "CurrencyKZT": "Kazakhstani Tenge",
        "CurrencyLAK": "Lao Kip",
        "CurrencyLBP": "Lebanese Pound",
        "CurrencyLKR": "Sri Lankan Rupee",
        "CurrencyLRD": "Liberian Dollar",
        "CurrencyLSL": "Lesotho Loti",
        "CurrencyLTL": "Lithuanian Litas",
        "CurrencyLVL": "Latvian Lats",
        "CurrencyMAD": "Moroccan Dirham",
        "CurrencyMDL": "Moldovan Leu",
        "CurrencyMGA": "Malagasy Ariary",
        "CurrencyMKD": "Macedonian Denar",
        "CurrencyMNT": "Mongolian Tögrög",
        "CurrencyMOP": "Macanese Pataca",
        "CurrencyMRO": "Mauritanian Ouguiya",
        "CurrencyMUR": "Mauritian Rupee",
        "CurrencyMVR": "Maldivian Rufiyaa",
        "CurrencyMWK": "Malawian Kwacha",
        "CurrencyMXN": "Mexican Peso",
        "CurrencyMYR": "Malaysian Ringgit",
        "CurrencyMZN": "Mozambican Metical",
        "CurrencyNAD": "Namibian Dollar",
        "CurrencyNGN": "Nigerian Naira",
        "CurrencyNIO": "Nicaraguan Córdoba",
        "CurrencyNOK": "Norwegian Krone",
        "CurrencyNPR": "Nepalese Rupee",
        "CurrencyNZD": "New Zealand Dollar",
        "CurrencyPAB": "Panamanian Balboa",
        "CurrencyPEN": "Peruvian Nuevo Sol",
        "CurrencyPGK": "Papua New Guinean Kina",
        "CurrencyPHP": "Philippine Peso",
        "CurrencyPKR": "Pakistani Rupee",
        "CurrencyPLN": "Polish Złoty",
        "CurrencyPYG": "Paraguayan Guaraní",
        "CurrencyQAR": "Qatari Riyal",
        "CurrencyRON": "Romanian Leu",
        "CurrencyRSD": "Serbian Dinar",
        "CurrencyRUB": "Russian Ruble",
        "CurrencyRWF": "Rwandan Franc",
        "CurrencySAR": "Saudi Riyal",
        "CurrencySBD": "Solomon Islands Dollar",
        "CurrencySCR": "Seychellois Rupee",
        "CurrencySEK": "Swedish Krona",
        "CurrencySGD": "Singapore Dollar",
        "CurrencySHP": "Saint Helenian Pound",
        "CurrencySLL": "Sierra Leonean Leone",
        "CurrencySOS": "Somali Shilling",
        "CurrencySRD": "Surinamese Dollar",
        "CurrencySTD": "São Tomé and Príncipe Dobra",
        "CurrencySVC": "Salvadoran Colón",
        "CurrencySZL": "Swazi Lilangeni",
        "CurrencyTHB": "Thai Baht",
        "CurrencyTJS": "Tajikistani Somoni",
        "CurrencyTOP": "Tongan Paʻanga",
        "CurrencyTRY": "Turkish Lira",
        "CurrencyTTD": "Trinidad and Tobago Dollar",
        "CurrencyTWD": "New Taiwan Dollar",
        "CurrencyTZS": "Tanzanian Shilling",
        "CurrencyUAH": "Ukrainian Hryvnia",
        "CurrencyUGX": "Ugandan Shilling",
        "CurrencyUSD": "United States Dollar",
        "CurrencyUYU": "Uruguayan Peso",
        "CurrencyUZS": "Uzbekistani Som",
        "CurrencyVEF": "Venezuelan Bolívar",
        "CurrencyVND": "Vietnamese Đồng",
        "CurrencyVUV": "Vanuatu Vatu",
        "CurrencyWST": "Samoan Tala",
        "CurrencyXAF": "Central African Cfa Franc",
        "CurrencyXCD": "East Caribbean Dollar",
        "CurrencyXOF": "West African Cfa Franc",
        "CurrencyXPF": "Cfp Franc",
        "CurrencyYER": "Yemeni Rial",
        "CurrencyZAR": "South African Rand",
        "CurrencyZMW": "Zambian Kwacha"
      },
      "x-enum-varnames": [
        "CurrencyAED",
        "CurrencyAFN",
        "CurrencyALL",
        "CurrencyAMD",
        "CurrencyANG",
        "CurrencyAOA",
        "CurrencyARS",
        "CurrencyAUD",
        "CurrencyAWG",
        "CurrencyAZN",
        "CurrencyBAM",
        "CurrencyBBD",
        "CurrencyBDT",
        "CurrencyBGN",
        "CurrencyBIF",
        "CurrencyBMD",
        "CurrencyBND",
        "CurrencyBOB",
        "CurrencyBRL",
        "CurrencyBSD",
        "CurrencyBWP",
        "CurrencyBZD",
        "CurrencyCAD",
        "CurrencyCDF",
        "CurrencyCHF",
        "CurrencyCLP",
        "CurrencyCNY",
        "CurrencyCOP",
        "CurrencyCRC",
        "CurrencyCVE",
        "CurrencyCZK",
        "CurrencyDJF",
        "CurrencyDKK",
        "CurrencyDOP",
        "CurrencyDZD",
        "CurrencyEEK",
        "CurrencyEGP",
        "CurrencyETB",
        "CurrencyEUR",
        "CurrencyFJD",
        "CurrencyFKP",
        "CurrencyGBP",
        "CurrencyGEL",
        "CurrencyGIP",
        "CurrencyGMD",
        "CurrencyGNF",
        "CurrencyGTQ",
        "CurrencyGYD",
        "CurrencyHKD",
        "CurrencyHNL",
        "CurrencyHRK",
        "CurrencyHTG",
        "CurrencyHUF",
        "CurrencyIDR",
        "CurrencyILS",
        "CurrencyINR",
        "CurrencyISK",
        "CurrencyJMD",
        "CurrencyJPY",
        "CurrencyKES",
        "CurrencyKGS",
        "CurrencyKHR",
        "CurrencyKMF",
        "CurrencyKRW",
        "CurrencyKYD",
        "CurrencyKZT",
        "CurrencyLAK",
        "CurrencyLBP",
        "CurrencyLKR",
        "CurrencyLRD",
        "CurrencyLSL",
        "CurrencyLTL",
        "CurrencyLVL",
        "CurrencyMAD",
        "CurrencyMDL",
        "CurrencyMGA",
        "CurrencyMKD",
        "CurrencyMNT",
        "CurrencyMOP",
        "CurrencyMRO",
        "CurrencyMUR",
        "CurrencyMVR",
        "CurrencyMWK",
        "CurrencyMXN",
        "CurrencyMYR",
        "CurrencyMZN",
        "CurrencyNAD",
        "CurrencyNGN",
        "CurrencyNIO",
        "CurrencyNOK",
        "CurrencyNPR",
        "CurrencyNZD",
        "CurrencyPAB",
        "CurrencyPEN",
        "CurrencyPGK",
        "CurrencyPHP",
        "CurrencyPKR",
        "CurrencyPLN",
        "CurrencyPYG",
        "CurrencyQAR",
        "CurrencyRON",
        "CurrencyRSD",
        "CurrencyRUB",
        "CurrencyRWF",
        "CurrencySAR",
        "CurrencySBD",
        "CurrencySCR",
        "CurrencySEK",
        "CurrencySGD",
        "CurrencySHP",
        "CurrencySLL",
        "CurrencySOS",
        "CurrencySRD",
        "CurrencySTD",
        "CurrencySVC",
        "CurrencySZL",
        "CurrencyTHB",
        "CurrencyTJS",
        "CurrencyTOP",
        "CurrencyTRY",
        "CurrencyTTD",
        "CurrencyTWD",
        "CurrencyTZS",
        "CurrencyUAH",
        "CurrencyUGX",
        "CurrencyUSD",
        "CurrencyUYU",
        "CurrencyUZS",
        "CurrencyVEF",
        "CurrencyVND",
        "CurrencyVUV",
        "CurrencyWST",
        "CurrencyXAF",
        "CurrencyXCD",
        "CurrencyXOF",
        "CurrencyXPF",
        "CurrencyYER",
        "CurrencyZAR",
        "CurrencyZMW"
      ]
    },
    "forms.Card": {
      "type": "object",
      "properties": {
        "brand": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "exp_month": {
          "type": "string",
          "example": "0"
        },
        "exp_year": {
          "type": "string",
          "example": "0"
        },
        "fingerprint": {
          "type": "string"
        },
        "funding": {
          "type": "string"
        },
        "last4": {
          "type": "string"
        }
      }
    },
    "forms.StripePaymentMethod": {
      "type": "object",
      "properties": {
        "billing_details": {
          "$ref": "#/definitions/forms.BillingDetails"
        },
        "card": {
          "$ref": "#/definitions/forms.Card"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "forms.Address": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "state": {
          "type": "string"
        }
      }
    },
    "forms.BillingDetails": {
      "type": "object",
      "properties": {
        "address": {
          "$ref": "#/definitions/forms.Address"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      }
    },
    "forms.PaymentMethod": {
      "type": "object",
      "properties": {
        "binded_billing_config_id": {
          "type": "integer"
        },
        "invoiceable": {
          "type": "boolean"
        },
        "managed_by_sales": {
          "type": "boolean"
        },
        "payable": {
          "type": "boolean"
        },
        "payment_code": {
          "type": "string"
        },
        "payment_method_id": {
          "type": "integer"
        },
        "payment_method_meta": {
          "$ref": "#/definitions/forms.PaymentMeta"
        },
        "payment_sub_code": {
          "type": "string"
        },
        "payment_type": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "unpayable_at": {
          "type": "string"
        }
      }
    },
    "forms.PaymentMethodType": {
      "type": "object",
      "properties": {
        "payable": {
          "type": "boolean"
        },
        "payment_type": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        }
      }
    },
    "forms.UnitCostsInput": {
      "type": "object",
      "properties": {
        "cost": {
          "type": "integer"
        },
        "cost_id": {
          "description": "optional",
          "type": "string"
        },
        "cost_time_stamp": {
          "type": "integer"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "forms.Cluster": {
      "type": "object",
      "properties": {
        "cloud_provider_name": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "infra_provider_type": {
          "type": "string"
        },
        "is_dev_tier": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "project_id": {
          "type": "integer"
        },
        "region_display_name": {
          "type": "string"
        },
        "region_name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        }
      }
    },
    "forms.CostExploreTrendsInput": {
      "type": "object",
      "properties": {
        "breakdown_by": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExplorerTrendsBreakdownKey"
          }
        },
        "clusters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "consumed_source": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "ignore_beta": {
          "type": "boolean"
        },
        "invoices": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExplorerProvider"
          }
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExplorerService"
          }
        },
        "start_date": {
          "type": "string"
        },
        "time_group": {
          "$ref": "#/definitions/forms.CostExplorerTrendsTimeGroup"
        }
      }
    },
    "forms.CostExploreTrendsOutput": {
      "type": "object",
      "properties": {
        "cost_price": {
          "type": "string"
        },
        "credits_usage": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExploreTrendsOutputElement"
          }
        },
        "raw_price": {
          "type": "string"
        }
      }
    },
    "forms.CostExploreTrendsOutputBreakdownDetail": {
      "type": "object",
      "properties": {
        "billing_date": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "cluster_id": {
          "type": "integer"
        },
        "cluster_name": {
          "type": "string"
        },
        "component": {
          "type": "string"
        },
        "cost_price": {
          "type": "string"
        },
        "credits_usage": {
          "type": "string"
        },
        "detail_name": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "product": {
          "type": "string"
        },
        "project_id": {
          "type": "integer"
        },
        "project_name": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "raw_price": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "service": {
          "type": "string"
        }
      }
    },
    "forms.CostExploreTrendsOutputElement": {
      "type": "object",
      "properties": {
        "billing_date": {
          "type": "string"
        },
        "breakdown": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExploreTrendsOutputBreakdownDetail"
          }
        },
        "cost_price": {
          "type": "string"
        },
        "credits_usage": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "prediction": {
          "type": "boolean"
        },
        "raw_price": {
          "type": "string"
        }
      }
    },
    "forms.CostExplorerArgs": {
      "type": "object",
      "properties": {
        "clusters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Cluster"
          }
        },
        "products": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Project"
          }
        },
        "providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Provider"
          }
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CostExplorerService"
          }
        }
      }
    },
    "forms.CostExplorerProvider": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "forms.CostExplorerService": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "component": {
          "type": "string"
        },
        "product": {
          "type": "string"
        },
        "service": {
          "type": "string"
        }
      }
    },
    "forms.CostExplorerTrendsBreakdownKey": {
      "type": "string",
      "enum": [
        "service",
        "product",
        "project",
        "cluster",
        "provider",
        "region"
      ],
      "x-enum-varnames": [
        "CostExploreTrendsBreakdownKeyService",
        "CostExploreTrendsBreakdownKeyProduct",
        "CostExploreTrendsBreakdownKeyProject",
        "CostExploreTrendsBreakdownKeyCluster",
        "CostExploreTrendsBreakdownKeyProvider",
        "CostExploreTrendsBreakdownKeyRegion"
      ]
    },
    "forms.CostExplorerTrendsTimeGroup": {
      "type": "string",
      "enum": ["day", "month"],
      "x-enum-varnames": [
        "CostExploreTrendsTimeGroupDay",
        "CostExploreTrendsTimeGroupMonth"
      ]
    },
    "forms.Project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        }
      }
    },
    "forms.Provider": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "forms.OKType": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "example": "ok"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "type_url": {
          "type": "string",
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `http`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `http` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `http` (or the empty scheme) might be\nused with implementation specific semantics."
        },
        "value": {
          "type": "string",
          "format": "byte",
          "description": "Must be a valid serialized protocol buffer of the above specified type."
        }
      },
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(\u0026foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := \u0026pb.Foo{...}\n     any, err := ptypes.MarshalAny(foo)\n     ...\n     foo := \u0026pb.Foo{}\n     if err := ptypes.UnmarshalAny(any, foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    },
    "apiHttpBody": {
      "type": "object",
      "properties": {
        "content_type": {
          "type": "string",
          "description": "The HTTP Content-Type header value specifying the content type of the body."
        },
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The HTTP request/response body as raw binary."
        },
        "extensions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          },
          "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs."
        }
      },
      "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n    message GetResourceRequest {\n      // A unique request id.\n      string request_id = 1;\n\n      // The raw HTTP body is bound to this field.\n      google.api.HttpBody http_body = 2;\n    }\n\n    service ResourceService {\n      rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n      rpc UpdateResource(google.api.HttpBody) returns\n      (google.protobuf.Empty);\n    }\n\nExample with streaming methods:\n\n    service CaldavService {\n      rpc GetCalendar(stream google.api.HttpBody)\n        returns (stream google.api.HttpBody);\n      rpc UpdateCalendar(stream google.api.HttpBody)\n        returns (stream google.api.HttpBody);\n    }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
    },
    "forms.Costs": {
      "type": "object",
      "properties": {
        "category_item_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryCosts"
          }
        },
        "kind_category_units_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryCosts"
          }
        },
        "category_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.Price"
          }
        },
        "category_use_item": {
          "type": "boolean"
        },
        "cost_price": {
          "type": "string"
        },
        "label_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.LabelCosts"
          }
        },
        "raw_price": {
          "type": "string"
        },
        "service_plan": {
          "type": "string"
        },
        "discount_price": {
          "type": "string"
        },
        "unit_costs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitCosts"
          }
        }
      },
      "required": ["cost_price", "raw_price"]
    },
    "forms.UsageDetails": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string"
        },
        "billable_cost": {
          "type": "string"
        },
        "billed_date": {
          "type": "string"
        },
        "cluster_name": {
          "type": "string"
        },
        "credit_usage": {
          "type": "string"
        },
        "discount_cost": {
          "type": "string"
        },
        "project_name": {
          "type": "string"
        },
        "service": {
          "type": "string"
        }
      }
    },
    "forms.CostExplorerDetailsResult": {
      "type": "object",
      "properties": {
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UsageDetails"
          }
        }
      }
    },
    "forms.MonthlycostExplorerResult": {
      "type": "object",
      "properties": {
        "binded_invoice_costs": {
          "$ref": "#/definitions/forms.Costs"
        },
        "credits_costs": {
          "$ref": "#/definitions/forms.Costs"
        },
        "invoice_costs": {
          "$ref": "#/definitions/forms.Costs"
        },
        "invoice_generated": {
          "type": "boolean"
        },
        "unbind_invoice_costs": {
          "$ref": "#/definitions/forms.Costs"
        },
        "total_costs": {
          "$ref": "#/definitions/forms.Costs"
        }
      },
      "required": [
        "credits_costs",
        "invoice_costs",
        "invoice_generated",
        "unbind_invoice_costs"
      ]
    },
    "forms.StripeInvoice": {
      "type": "object",
      "properties": {
        "amount_due": {
          "type": "string",
          "example": "0"
        },
        "amount_paid": {
          "type": "string",
          "example": "0"
        },
        "created": {
          "type": "string",
          "example": "0"
        },
        "credit_used": {
          "type": "string",
          "example": "0"
        },
        "currency": {
          "type": "string"
        },
        "due_date": {
          "type": "string",
          "example": "0"
        },
        "id": {
          "type": "string"
        },
        "invoice_pdf": {
          "type": "string"
        },
        "number": {
          "type": "string"
        },
        "paid": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "total": {
          "type": "string",
          "example": "0"
        }
      }
    },
    "forms.CategoryItemShow": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "commodity_code": {
          "type": "string"
        },
        "edition_code": {
          "type": "string"
        },
        "label_key": {
          "type": "string"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "measure_unit": {
          "type": "string"
        },
        "order_map": {
          "type": "object",
          "additionalProperties": {
            "type": "integer",
            "format": "int32"
          }
        },
        "parent_key": {
          "type": "string"
        },
        "show_category_name": {
          "type": "string"
        },
        "show_kind_name": {
          "type": "string"
        },
        "show_service_prefix": {
          "type": "string"
        },
        "use_cate_gory": {
          "type": "boolean"
        }
      }
    },
    "forms.CategoryNode": {
      "type": "object",
      "properties": {
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "category": {
          "type": "string"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.CategoryNode"
          }
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "order": {
          "type": "integer"
        },
        "parent_key": {
          "type": "string"
        }
      }
    },
    "forms.SKUGroup": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "created_at": {
          "description": "optional",
          "type": "string"
        },
        "group_id": {
          "description": "optional",
          "type": "integer"
        },
        "measure_unit": {
          "description": "optional",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "price_expression": {
          "description": "optional",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "price_formula": {
          "type": "string"
        },
        "price_type": {
          "type": "string"
        },
        "sku_group_type": {
          "type": "string"
        },
        "unit_key_pattern": {
          "type": "string",
          "minLength": 1
        },
        "updated_at": {
          "description": "optional",
          "type": "string"
        }
      }
    },
    "forms.UnitByGroup": {
      "type": "object",
      "properties": {
        "beta_end_time": {
          "type": "string"
        },
        "group_id": {
          "type": "integer"
        },
        "group_labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "price": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "unit_key_parameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "forms.UnitInfo": {
      "type": "object",
      "properties": {
        "beta_end_time": {
          "description": "optional",
          "type": "string"
        },
        "category": {
          "description": "optional",
          "type": "string"
        },
        "commodity_code": {
          "description": "optional",
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "edition_code": {
          "description": "optional",
          "type": "string"
        },
        "group_id": {
          "description": "optional",
          "type": "integer"
        },
        "measure_unit": {
          "description": "optional",
          "type": "string"
        },
        "price": {
          "description": "optional",
          "type": "string"
        },
        "price_expression": {
          "description": "optional",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "price_type": {
          "description": "optional",
          "type": "string"
        },
        "provider": {
          "description": "optional",
          "type": "string"
        },
        "region": {
          "description": "optional",
          "type": "string"
        },
        "sku_template_id": {
          "description": "optional",
          "type": "integer"
        },
        "sku_type": {
          "description": "optional",
          "type": "string"
        },
        "unit": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "description": "optional",
          "type": "integer"
        }
      }
    },
    "forms.UnitPatch": {
      "type": "object",
      "properties": {
        "price": {
          "type": "string"
        },
        "price_expression": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "price_type": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "forms.CreateInvoiceReq": {
      "type": "object",
      "properties": {
        "start_date": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "forms.InvoiceAppliedFXRate": {
      "type": "object",
      "properties": {
        "base": {
          "$ref": "#/definitions/forms.Currency"
        },
        "date": {
          "type": "string"
        },
        "target": {
          "$ref": "#/definitions/forms.Currency"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "forms.InvoiceForOpsList": {
      "type": "object",
      "properties": {
        "binded_billing_config_id": {
          "type": "string",
          "example": "0"
        },
        "brief": {
          "type": "boolean"
        },
        "category_item_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryCosts"
          }
        },
        "category_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.Price"
          }
        },
        "category_use_item": {
          "type": "boolean"
        },
        "cost_price": {
          "type": "string"
        },
        "discount_price": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "from": {
          "type": "string"
        },
        "invoice_id": {
          "type": "string",
          "example": "0"
        },
        "kind_category_units_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryItemCosts"
          }
        },
        "label_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.LabelCosts"
          }
        },
        "order": {
          "type": "integer"
        },
        "parent_invoice_id": {
          "type": "integer"
        },
        "payment_code": {
          "type": "string"
        },
        "payment_type": {
          "type": "string"
        },
        "raw_price": {
          "type": "string"
        },
        "service_plan": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tax_rate": {
          "$ref": "#/definitions/forms.TaxRate"
        },
        "tenant_id": {
          "type": "string",
          "example": "0"
        },
        "tenant_name": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "unit_costs": {
          "description": "unused?",
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitCosts"
          }
        }
      }
    },
    "forms.PaymentMeta": {
      "type": "object",
      "properties": {
        "aws_cppo_discount": {
          "type": "string"
        },
        "is_aws_cppo_payment": {
          "type": "boolean"
        },
        "is_third_party": {
          "type": "boolean"
        }
      }
    },
    "forms.CategoryItemCosts": {
      "type": "object",
      "properties": {
        "category_item_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryCosts"
          }
        },
        "cost_price": {
          "type": "string"
        },
        "discount_price": {
          "type": "string"
        },
        "order": {
          "type": "integer"
        },
        "raw_price": {
          "type": "string"
        },
        "unit_costs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitCosts"
          }
        }
      }
    },
    "forms.LabelCosts": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/forms.CategoryCosts"
      }
    },
    "forms.UnitCSVImportResult": {
      "type": "object",
      "properties": {
        "imported_rows": {
          "type": "integer"
        }
      }
    },
    "forms.UnitCosts": {
      "type": "object",
      "properties": {
        "binded_package_id": {
          "type": "integer"
        },
        "consumed_source": {
          "type": "string"
        },
        "cost": {
          "type": "integer"
        },
        "cost_id": {
          "type": "string"
        },
        "cost_time_stamp": {
          "type": "integer"
        },
        "invoice_id": {
          "type": "integer"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "package_id": {
          "type": "integer"
        },
        "package_version": {
          "type": "integer"
        },
        "price": {
          "type": "string"
        },
        "raw_price": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "forms.SupportPlan": {
      "type": "object",
      "properties": {
        "fixed_charge_price": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "public": {
          "type": "boolean"
        },
        "support_plan_id": {
          "type": "integer"
        },
        "support_price_percentage": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "tiered_price_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.TieredPriceRule"
          }
        }
      }
    },
    "forms.SupportPlanInput": {
      "type": "object",
      "properties": {
        "active_date": {
          "type": "string"
        },
        "expired_date": {
          "type": "string"
        },
        "fixed_charge_price": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "public": {
          "type": "boolean"
        },
        "support_plan_id": {
          "type": "integer"
        },
        "support_price_percentage": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "tiered_price_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.TieredPriceRule"
          }
        }
      }
    },
    "forms.BindedSupportPlan": {
      "type": "object",
      "properties": {
        "active_date": {
          "type": "string"
        },
        "binded_support_plan_id": {
          "type": "integer"
        },
        "closed_date": {
          "type": "string"
        },
        "expired_date": {
          "type": "string"
        },
        "fixed_charge_price": {
          "type": "string"
        },
        "level": {
          "type": "string"
        },
        "public": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "support_plan_id": {
          "type": "integer"
        },
        "support_price_percentage": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "type": {
          "type": "string"
        },
        "tiered_price_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.TieredPriceRule"
          }
        }
      }
    },
    "forms.TieredPriceRule": {
      "type": "object",
      "properties": {
        "lower_bound": {
          "type": "string"
        },
        "support_price_percentage": {
          "type": "string"
        },
        "upper_bound": {
          "type": "string"
        }
      }
    },
    "forms.MCPOBillingConfig": {
      "type": "object",
      "properties": {
        "discounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Discount"
          }
        },
        "effective_date": {
          "type": "string"
        },
        "payment_code": {
          "type": "string"
        },
        "reseller_id": {
          "type": "string",
          "example": "0"
        },
        "support_plan": {
          "$ref": "#/definitions/forms.SupportPlanInput"
        },
        "tenant_id": {
          "type": "string",
          "example": "0"
        }
      }
    },
    "forms.CPPOBillingConfig": {
      "type": "object",
      "properties": {
        "discounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.Discount"
          }
        },
        "effective_date": {
          "type": "string"
        },
        "payment_code": {
          "type": "string"
        },
        "payment_sub_code": {
          "type": "string"
        },
        "reseller_id": {
          "type": "string"
        },
        "support_plan": {
          "$ref": "#/definitions/forms.SupportPlanInput"
        },
        "tenant_id": {
          "type": "string"
        }
      }
    },
    "forms.PaymentCodeUpdateQuery": {
      "type": "object",
      "properties": {
        "payment_code": {
          "type": "string"
        },
        "payment_sub_code": {
          "type": "string"
        }
      }
    },
    "forms.Discount": {
      "type": "object",
      "properties": {
        "binded_billing_config_id": {
          "type": "integer"
        },
        "closed_at": {
          "type": "string"
        },
        "clusters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "discount_code": {
          "type": "string"
        },
        "discount_id": {
          "type": "integer"
        },
        "discount_sid": {
          "type": "string"
        },
        "expired_at": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "provider": {
          "type": "string"
        },
        "started_at": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        },
        "unit_filters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitFilterSlim"
          }
        },
        "usage": {
          "type": "string"
        }
      }
    },
    "forms.UnitFilterSlim": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "filter_id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "parent_id": {
          "type": "integer"
        },
        "type_id": {
          "description": "this field is a deprecated",
          "type": "integer"
        }
      }
    },
    "forms.CategoryCosts": {
      "type": "object",
      "properties": {
        "category_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.Price"
          }
        },
        "cost_price": {
          "type": "string"
        },
        "raw_price": {
          "type": "string"
        },
        "service_plan": {
          "type": "string"
        },
        "unit_costs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitCosts"
          }
        },
        "order": {
          "type": "number"
        }
      },
      "required": ["cost_price"]
    },
    "forms.Price": {
      "type": "object",
      "properties": {
        "cost_price": {
          "type": "string"
        },
        "raw_price": {
          "type": "string"
        },
        "discount_price": {
          "type": "string"
        },
        "order": {
          "type": "number"
        }
      },
      "required": ["cost_price"]
    },
    "forms.Invoice": {
      "type": "object",
      "properties": {
        "binded_billing_config_id": {
          "type": "string",
          "example": "0"
        },
        "brief": {
          "type": "boolean"
        },
        "category_item_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.CategoryCosts"
          }
        },
        "category_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.Price"
          }
        },
        "category_use_item": {
          "type": "boolean"
        },
        "cost_price": {
          "type": "string"
        },
        "end_date": {
          "type": "string"
        },
        "invoice_id": {
          "type": "string",
          "example": "0"
        },
        "label_unit_costs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/forms.LabelCosts"
          }
        },
        "raw_price": {
          "type": "string"
        },
        "service_plan": {
          "type": "string"
        },
        "start_date": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tax_rate": {
          "$ref": "#/definitions/forms.TaxRate"
        },
        "tenant_id": {
          "type": "string",
          "example": "0"
        },
        "type": {
          "type": "string"
        },
        "unit_costs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.UnitCosts"
          }
        }
      },
      "required": [
        "invoice_id",
        "category_unit_costs",
        "label_unit_costs",
        "cost_price"
      ]
    },
    "forms.CommitmentInvoiceInput": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string"
        },
        "binded_billing_config_id": {
          "type": "integer"
        },
        "payment_code": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "time": {
          "type": "string"
        }
      }
    },
    "forms.Budget": {
      "type": "object",
      "properties": {
        "biz_data": {
          "type": "string"
        },
        "biz_type": {
          "type": "string"
        },
        "meta": {
          "type": "object"
        },
        "cost_type": {
          "type": "string"
        },
        "costs": {
          "type": "string"
        },
        "interval": {
          "type": "string"
        },
        "limit": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "range_id": {
          "type": "integer"
        },
        "range_id_str": {
          "type": "string",
          "example": "0"
        },
        "range_type": {
          "type": "string"
        },
        "spendlimit_setting_id": {
          "type": "integer"
        },
        "start_date": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "tenant_id": {
          "type": "string"
        },
        "thresholds": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.SpendLimitThreshold"
          }
        }
      }
    },
    "forms.SpendLimitThreshold": {
      "type": "object",
      "properties": {
        "bizType": {
          "type": "string"
        },
        "proportion": {
          "type": "string"
        },
        "spend_limit_id": {
          "type": "integer"
        },
        "tenant_id": {
          "type": "integer"
        },
        "threshold_id": {
          "type": "integer"
        }
      }
    },
    "forms.TaxRate": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "inclusive": {
          "type": "boolean"
        },
        "rate": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "stripe_tax_rate_id": {
          "type": "string"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_type": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        }
      }
    },
    "forms.BillingInformation": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "tax_id_type": {
          "type": "string"
        },
        "tax_rate": {
          "$ref": "#/definitions/forms.TaxRate"
        },
        "tax_vat": {
          "type": "string"
        },
        "tenant_id": {
          "type": "integer"
        }
      }
    },
    "forms.BillingInformationInput": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "tax_id_type": {
          "type": "string"
        },
        "tax_rate": {
          "$ref": "#/definitions/forms.TaxRate"
        },
        "tax_vat": {
          "type": "string"
        }
      }
    },
    "forms.BillingConfig": {
      "type": "object",
      "properties": {
        "billing_config_id": {
          "type": "integer"
        },
        "created_at": {
          "type": "string"
        },
        "end_active_time": {
          "type": "string"
        },
        "managed_tenant_id": {
          "type": "integer"
        },
        "start_active_time": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": ["Active", "Closing", "Closed", "Scheduled"]
        },
        "tenant_id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": ["billing_config_id"]
    },
    "forms.SubscriptionList": {
      "type": "object",
      "properties": {
        "@nextLink": {
          "type": "string"
        },
        "subscriptions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/forms.SubscriptionDetails"
          }
        }
      }
    },
    "forms.SubscriptionDetails": {
      "type": "object",
      "properties": {
        "allowedCustomerOperations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoRenew": {
          "type": "boolean"
        },
        "beneficiary": {
          "$ref": "#/definitions/forms.Beneficiary"
        },
        "created": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "isFreeTrial": {
          "type": "boolean"
        },
        "isTest": {
          "type": "boolean"
        },
        "lastModified": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "offerId": {
          "type": "string"
        },
        "planId": {
          "type": "string"
        },
        "publisherId": {
          "type": "string"
        },
        "purchaser": {
          "$ref": "#/definitions/forms.Purchaser"
        },
        "quantity": {
          "type": "integer"
        },
        "saasSubscriptionStatus": {
          "type": "string"
        },
        "sandboxType": {
          "type": "string"
        },
        "sessionMode": {
          "type": "string"
        },
        "term": {
          "type": "object",
          "properties": {
            "endDate": {
              "type": "string"
            },
            "startDate": {
              "type": "string"
            },
            "termUnit": {
              "type": "string"
            }
          }
        }
      }
    },
    "forms.Purchaser": {
      "type": "object",
      "properties": {
        "emailId": {
          "type": "string"
        },
        "objectId": {
          "type": "string"
        },
        "puid": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        }
      }
    },
    "forms.Beneficiary": {
      "type": "object",
      "properties": {
        "emailId": {
          "type": "string"
        },
        "objectId": {
          "type": "string"
        },
        "puid": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        }
      }
    }
  }
}
