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
// Important: Don't forget to include the call to System.loadLibrary
// as shown at the bottom of this code sample.
package com.test;
import android.app.Activity;
import com.chilkatsoft.*;
import android.widget.TextView;
import android.os.Bundle;
public class SimpleActivity extends Activity {
private static final String TAG = "Chilkat";
// Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CkRest rest = new CkRest();
boolean success;
// URL: https://api.stripe.com/v1/refunds/re_1BnETKGswQrCoh0XT2qLx7S0
boolean bTls = true;
int port = 443;
boolean bAutoReconnect = true;
success = rest.Connect("api.stripe.com",port,bTls,bAutoReconnect);
if (success != true) {
Log.i(TAG, "ConnectFailReason: " + String.valueOf(rest.get_ConnectFailReason()));
Log.i(TAG, rest.lastErrorText());
return;
}
rest.SetAuthBasic("STRIPE_SECRET_KEY","");
CkStringBuilder sbResponseBody = new CkStringBuilder();
success = rest.FullRequestNoBodySb("POST","/v1/refunds/re_1BnETKGswQrCoh0XT2qLx7S0",sbResponseBody);
if (success != true) {
Log.i(TAG, rest.lastErrorText());
return;
}
CkJsonObject jsonResponse = new CkJsonObject();
jsonResponse.LoadSb(sbResponseBody);
String id;
String object;
int amount;
String balance_transaction;
String charge;
int created;
String currency;
String metadataKey;
boolean reason;
boolean receipt_number;
String status;
id = jsonResponse.stringOf("id");
object = jsonResponse.stringOf("object");
amount = jsonResponse.IntOf("amount");
balance_transaction = jsonResponse.stringOf("balance_transaction");
charge = jsonResponse.stringOf("charge");
created = jsonResponse.IntOf("created");
currency = jsonResponse.stringOf("currency");
metadataKey = jsonResponse.stringOf("metadata.key");
reason = jsonResponse.IsNullOf("reason");
receipt_number = jsonResponse.IsNullOf("receipt_number");
status = jsonResponse.stringOf("status");
}
static {
System.loadLibrary("chilkat");
// Note: If the incorrect library name is passed to System.loadLibrary,
// then you will see the following error message at application startup:
//"The application <your-application-name> has stopped unexpectedly. Please try again."
}
}
{
"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"
}