Chilkat Online Tools

PureBasic / Shopify / Retrieving all one-time charges since a specified ID

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

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

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(queryParams,"since_id","<>")

    CkHttp::ckSetRequestHeader(http,"Content","<>")

    resp.i = CkHttp::ckQuickRequestParams(http,"GET","httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/application_charges.json",queryParams)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        ProcedureReturn
    EndIf

    Debug Str(CkHttpResponse::ckStatusCode(resp))
    Debug CkHttpResponse::ckBodyStr(resp)
    CkHttpResponse::ckDispose(resp)



    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)


    ProcedureReturn
EndProcedure

Curl Command

curl -G -d "since_id=%3C%3E"
	-H "Content: <>"
httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/application_charges.json

Postman Collection Item JSON

{
  "name": "Retrieving all one-time charges since a specified ID",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content",
        "value": "<>"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/admin/application_charges.json?since_id=<>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "admin",
        "application_charges.json"
      ],
      "query": [
        {
          "key": "since_id",
          "value": "<>"
        }
      ]
    },
    "description": "Retrieving all one-time charges since a specified id."
  },
  "response": [
  ]
}