Chilkat Online Tools

Ruby / Belvo API Docs / Destroy

Back to Collection Items

require 'chilkat'

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = Chilkat::CkHttp.new()

http.put_BasicAuth(true)
http.put_Login("{{secretId}}")
http.put_Password("{{secretPassword}}")

# resp is a CkHttpResponse
resp = http.QuickRequest("DELETE","https://domain.com/investments/portfolios/:id/")
if (http.get_LastMethodSuccess() == false)
    print http.lastErrorText() + "\n";
    exit
end

print resp.get_StatusCode().to_s() + "\n";
print resp.bodyStr() + "\n";

Curl Command

curl -X DELETE
	-u '{{secretId}}:{{secretPassword}}'
https://domain.com/investments/portfolios/:id/

Postman Collection Item JSON

{
  "name": "Destroy",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/investments/portfolios/:id/",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "investments",
        "portfolios",
        ":id",
        ""
      ],
      "variable": [
        {
          "key": "id",
          "value": null
        }
      ]
    }
  },
  "response": [
  ]
}