Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
curl https://api.stripe.com/v1/refunds/re_1BnETKGswQrCoh0XT2qLx7S0 \
-u STRIPE_SECRET_KEY:
-X POST
integer li_rc
oleobject loo_Rest
integer li_Success
integer li_BTls
integer li_Port
integer li_BAutoReconnect
oleobject loo_SbResponseBody
oleobject loo_JsonResponse
string ls_Id
string ls_Object
integer li_Amount
string ls_Balance_transaction
string ls_Charge
integer li_Created
string ls_Currency
string ls_MetadataKey
integer li_Reason
integer li_Receipt_number
string ls_Status
loo_Rest = create oleobject
li_rc = loo_Rest.ConnectToNewObject("Chilkat_9_5_0.Rest")
if li_rc < 0 then
destroy loo_Rest
MessageBox("Error","Connecting to COM object failed")
return
end if
// URL: https://api.stripe.com/v1/refunds/re_1BnETKGswQrCoh0XT2qLx7S0
li_BTls = 1
li_Port = 443
li_BAutoReconnect = 1
li_Success = loo_Rest.Connect("api.stripe.com",li_Port,li_BTls,li_BAutoReconnect)
if li_Success <> 1 then
Write-Debug "ConnectFailReason: " + string(loo_Rest.ConnectFailReason)
Write-Debug loo_Rest.LastErrorText
destroy loo_Rest
return
end if
loo_Rest.SetAuthBasic("STRIPE_SECRET_KEY","")
loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")
li_Success = loo_Rest.FullRequestNoBodySb("POST","/v1/refunds/re_1BnETKGswQrCoh0XT2qLx7S0",loo_SbResponseBody)
if li_Success <> 1 then
Write-Debug loo_Rest.LastErrorText
destroy loo_Rest
destroy loo_SbResponseBody
return
end if
loo_JsonResponse = create oleobject
li_rc = loo_JsonResponse.ConnectToNewObject("Chilkat_9_5_0.JsonObject")
loo_JsonResponse.LoadSb(loo_SbResponseBody)
ls_Id = loo_JsonResponse.StringOf("id")
ls_Object = loo_JsonResponse.StringOf("object")
li_Amount = loo_JsonResponse.IntOf("amount")
ls_Balance_transaction = loo_JsonResponse.StringOf("balance_transaction")
ls_Charge = loo_JsonResponse.StringOf("charge")
li_Created = loo_JsonResponse.IntOf("created")
ls_Currency = loo_JsonResponse.StringOf("currency")
ls_MetadataKey = loo_JsonResponse.StringOf("metadata.key")
li_Reason = loo_JsonResponse.IsNullOf("reason")
li_Receipt_number = loo_JsonResponse.IsNullOf("receipt_number")
ls_Status = loo_JsonResponse.StringOf("status")
destroy loo_Rest
destroy loo_SbResponseBody
destroy loo_JsonResponse
{
"id": "re_1BnETKGswQrCoh0XT2qLx7S0",
"object": "refund",
"amount": 100,
"balance_transaction": "txn_1BnETKGswQrCoh0X762wrMpF",
"charge": "ch_1BnETKGswQrCoh0XE7kJI2wj",
"created": 1516662782,
"currency": "usd",
"metadata": {
"key": "value"
},
"reason": null,
"receipt_number": null,
"status": "succeeded"
}