{
  "repo": "tidbcloud/dbaas",
  "binary": "server",
  "binary_path": "billing2/cmd/server/main.go",
  "surface_kind": "http_service",
  "type": "http_service",
  "services": [
    {
      "name": "HTTPService",
      "base_path": "/",
      "methods": [
        {"name": "GET /version", "name_key": "HTTP GET /version", "description": "Get service version"},
        {"name": "GET /metrics", "name_key": "HTTP GET /metrics", "description": "Built-in Prometheus metrics exposed by gin-prometheus"},
        {"name": "POST /tenants/:tenant_id/measures", "name_key": "HTTP POST /tenants/:tenant_id/measures", "description": "Calculate cost units"},
        {"name": "POST /tenants/:tenant_id/measures/dryrun", "name_key": "HTTP POST /tenants/:tenant_id/measures/dryrun", "description": "Dry run cost calculation"},
        {"name": "GET /units", "name_key": "HTTP GET /units", "description": "List billing units"},
        {"name": "POST /units", "name_key": "HTTP POST /units", "description": "Create billing unit"},
        {"name": "POST /units/_bulk", "name_key": "HTTP POST /units/_bulk", "description": "Bulk create/update units"},
        {"name": "GET /units/:unit_key", "name_key": "HTTP GET /units/:unit_key", "description": "Get billing unit"},
        {"name": "PUT /units/:unit_key", "name_key": "HTTP PUT /units/:unit_key", "description": "Update billing unit"},
        {"name": "DELETE /units/:unit_key", "name_key": "HTTP DELETE /units/:unit_key", "description": "Delete billing unit"},
        {"name": "GET /packages", "name_key": "HTTP GET /packages", "description": "List packages"},
        {"name": "POST /packages", "name_key": "HTTP POST /packages", "description": "Create package"},
        {"name": "GET /packages/:package_id", "name_key": "HTTP GET /packages/:package_id", "description": "Get package"},
        {"name": "PUT /packages/:package_id", "name_key": "HTTP PUT /packages/:package_id", "description": "Update package"},
        {"name": "PATCH /packages/:package_id", "name_key": "HTTP PATCH /packages/:package_id", "description": "Patch package"},
        {"name": "DELETE /packages/:package_id", "name_key": "HTTP DELETE /packages/:package_id", "description": "Delete package"},
        {"name": "GET /tenants/:tenant_id/binded_packages", "name_key": "HTTP GET /tenants/:tenant_id/binded_packages", "description": "List binded packages"},
        {"name": "POST /tenants/:tenant_id/binded_packages", "name_key": "HTTP POST /tenants/:tenant_id/binded_packages", "description": "Bind package to tenant"},
        {"name": "GET /tenants/:tenant_id/binded_packages/:binded_package_id", "name_key": "HTTP GET /tenants/:tenant_id/binded_packages/:binded_package_id", "description": "Get binded package"},
        {"name": "DELETE /tenants/:tenant_id/binded_packages/:binded_package_id", "name_key": "HTTP DELETE /tenants/:tenant_id/binded_packages/:binded_package_id", "description": "Unbind package"},
        {"name": "POST /tenants/:tenant_id/binded_packages/:binded_package_id/charge_credits", "name_key": "HTTP POST /tenants/:tenant_id/binded_packages/:binded_package_id/charge_credits", "description": "Charge credits"},
        {"name": "GET /tenants/:tenant_id/binded_packages/:binded_package_id/charge_credits", "name_key": "HTTP GET /tenants/:tenant_id/binded_packages/:binded_package_id/charge_credits", "description": "Get charge credits history"},
        {"name": "PUT /tenants/:tenant_id/binded_packages/:binded_package_id/discount", "name_key": "HTTP PUT /tenants/:tenant_id/binded_packages/:binded_package_id/discount", "description": "Change discount"},
        {"name": "GET /tenants/:tenant_id/payments", "name_key": "HTTP GET /tenants/:tenant_id/payments", "description": "List payment methods"},
        {"name": "POST /tenants/:tenant_id/payments", "name_key": "HTTP POST /tenants/:tenant_id/payments", "description": "Create payment method"},
        {"name": "POST /tenants/:tenant_id/payments/stripe/setup_intent", "name_key": "HTTP POST /tenants/:tenant_id/payments/stripe/setup_intent", "description": "Create Stripe setup intent"},
        {"name": "PUT /tenants/:tenant_id/payments/stripe/setup_intent/confirm", "name_key": "HTTP PUT /tenants/:tenant_id/payments/stripe/setup_intent/confirm", "description": "Confirm Stripe intent"},
        {"name": "GET /tenants/:tenant_id/payments/stripe/customer", "name_key": "HTTP GET /tenants/:tenant_id/payments/stripe/customer", "description": "Get Stripe customer"},
        {"name": "GET /tenants/:tenant_id/payments/stripe/payment_methods", "name_key": "HTTP GET /tenants/:tenant_id/payments/stripe/payment_methods", "description": "List Stripe payment methods"},
        {"name": "PUT /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id", "name_key": "HTTP PUT /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id", "description": "Update Stripe payment method"},
        {"name": "DELETE /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id", "name_key": "HTTP DELETE /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id", "description": "Delete Stripe payment method"},
        {"name": "PUT /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id/default", "name_key": "HTTP PUT /tenants/:tenant_id/payments/stripe/payment_methods/:payment_method_id/default", "description": "Set default payment method"},
        {"name": "GET /tenants/:tenant_id/payments/stripe/invoices", "name_key": "HTTP GET /tenants/:tenant_id/payments/stripe/invoices", "description": "List Stripe invoices"},
        {"name": "GET /tenants/:tenant_id/invoices", "name_key": "HTTP GET /tenants/:tenant_id/invoices", "description": "List all invoices"},
        {"name": "POST /tenants/:tenant_id/invoices", "name_key": "HTTP POST /tenants/:tenant_id/invoices", "description": "Create invoice"},
        {"name": "POST /tenants/:tenant_id/commitment_invoices", "name_key": "HTTP POST /tenants/:tenant_id/commitment_invoices", "description": "Create commitment invoice"},
        {"name": "GET /tenants/:tenant_id/invoices/:invoice_id", "name_key": "HTTP GET /tenants/:tenant_id/invoices/:invoice_id", "description": "Get invoice"},
        {"name": "PUT /tenants/:tenant_id/invoices/:invoice_id/confirm", "name_key": "HTTP PUT /tenants/:tenant_id/invoices/:invoice_id/confirm", "description": "Confirm invoice"},
        {"name": "PUT /tenants/:tenant_id/invoices/:invoice_id/send", "name_key": "HTTP PUT /tenants/:tenant_id/invoices/:invoice_id/send", "description": "Send invoice"},
        {"name": "DELETE /tenants/:tenant_id/invoices/:invoice_id", "name_key": "HTTP DELETE /tenants/:tenant_id/invoices/:invoice_id", "description": "Delete invoice"},
        {"name": "POST /tenants/:tenant_id/costexplorer", "name_key": "HTTP POST /tenants/:tenant_id/costexplorer", "description": "Query cost explorer"},
        {"name": "GET /tenants/:tenant_id/costexplorer/monthly_cost/year/:year/month/:month", "name_key": "HTTP GET /tenants/:tenant_id/costexplorer/monthly_cost/year/:year/month/:month", "description": "Get monthly cost"},
        {"name": "POST /tenants/:tenant_id/costexplorer/monthly_cost/year/:year/month/:month/export", "name_key": "HTTP POST /tenants/:tenant_id/costexplorer/monthly_cost/year/:year/month/:month/export", "description": "Export monthly cost"},
        {"name": "GET /tenants/:tenant_id/subscriptions", "name_key": "HTTP GET /tenants/:tenant_id/subscriptions", "description": "List subscriptions"},
        {"name": "GET /tenants/:tenant_id/submited_subscriptions", "name_key": "HTTP GET /tenants/:tenant_id/submited_subscriptions", "description": "List submitted subscriptions"},
        {"name": "POST /tenants/:tenant_id/subscriptions", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions", "description": "Create subscription"},
        {"name": "GET /tenants/:tenant_id/subscriptions/:subscription_id", "name_key": "HTTP GET /tenants/:tenant_id/subscriptions/:subscription_id", "description": "Get subscription"},
        {"name": "PUT /tenants/:tenant_id/subscriptions/:subscription_id", "name_key": "HTTP PUT /tenants/:tenant_id/subscriptions/:subscription_id", "description": "Update subscription"},
        {"name": "POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/reject", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/reject", "description": "Reject subscription"},
        {"name": "POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/accept", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/accept", "description": "Accept subscription"},
        {"name": "POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/suspend", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/suspend", "description": "Suspend subscription"},
        {"name": "POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/submit", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/submit", "description": "Submit subscription"},
        {"name": "POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/download", "name_key": "HTTP POST /tenants/:tenant_id/subscriptions/:subscription_id/actions/download", "description": "Download subscription"}
      ]
    }
  ],
  "extensions": {
    "notes": [
      "Billing System HTTP API Server."
    ]
  }
}
