Chilkat Online Tools

ERROR!

------------------- GenerateCode ----------------------
---- begin chilkat script ----
// This example assumes the Chilkat API to have been previously unlocked.
// See {{-global_unlock:::Global Unlock Sample-}} for sample code.

new Http http;
ckbool success;

http.BasicAuth = cktrue;
http.Login = "username";
http.Password = "password";


new StringBuilder sbResponseBody;
success = http.QuickGetSb("https://api.razorpay.com/v1/payments/downtimes",sbResponseBody);
if (success == ckfalse) {
println http.LastErrorText;
return;
}

println "Response status code = ",http.LastStatus;
println sbResponseBody.GetAsString();

---- end chilkat script ----

Powershell / Razorpay APIs / Fetch Payment Downtime Details

Back to Collection Items

Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"

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

$http = New-Object Chilkat.Http

ERROR: Property not found: Http.BasicAuth
Assignment type mismatch.  ExpressionType=ckbool, atgType=ERROR:

ERROR: Property not found: Http.Login
Assignment type mismatch.  ExpressionType=string, atgType=ERROR:

ERROR: Property not found: Http.Password
Assignment type mismatch.  ExpressionType=string, atgType=ERROR:

$sbResponseBody = New-Object Chilkat.StringBuilder
ERROR: Entry not found: Http.QuickGetSb
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  emitNewObject:
    atgType: StringBuilder
    varName: sbResponseBody
  --emitNewObject
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

ERROR: Non-existent Chilkat method:  Http.QuickGetSb
Assignment type mismatch.  ExpressionType=ERROR:, atgType=ckbool

if ($success -eq $false) {
ERROR: Entry not found: Http.LastErrorText
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  emitNewObject:
    atgType: StringBuilder
    varName: sbResponseBody
  --emitNewObject
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

    $($http.LastErrorText)
    exit
}

ERROR: Entry not found: Http.LastStatus
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  emitNewObject:
    atgType: StringBuilder
    varName: sbResponseBody
  --emitNewObject
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

$("Response status code = " + $http.LastStatus)
$($sbResponseBody.GetAsString())

Curl Command

curl -X GET
	-u 'username:password'
https://api.razorpay.com/v1/payments/downtimes

Postman Collection Item JSON

{
  "name": "Fetch Payment Downtime Details",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.razorpay.com/v1/payments/downtimes",
      "protocol": "https",
      "host": [
        "api",
        "razorpay",
        "com"
      ],
      "path": [
        "v1",
        "payments",
        "downtimes"
      ]
    },
    "description": "Fetch details of all payment downtimes using this API.\n\nKnow more about the <a href=\"https://razorpay.com/docs/api/payments/downtime/#fetch-payment-downtime-details\" target=\"_blank\">Fetch Payment Downtime Details API</a>"
  },
  "response": [
  ]
}