RevokeCurrency
Revoke the specified amount of currency from the user. User's balance can go negative.
Service | Operation |
---|---|
virtualCurrency | REVOKE_VC |
Method Parameters
Parameter | Description |
---|---|
vcId | The currency type to revoke. |
vcAmount | The amount of currency to revoke. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var vcId = "coins";
var vcAmount = 1;
var virtualCurrencyProxy = bridge.getVirtualcurrencyServiceProxy();
var postResult = virtualCurrencyProxy.RevokeCurrency(vcId, vcAmount);
{
"service":"virtualCurrency",
"operation":"REVOKE_VC",
"data":{
"vcId":"coins",
"vcAmount":1
}
}
JSON Response
{
"data": {
"currencyMap": {
"bar": {
"consumed": 0,
"balance": 32,
"purchased": 0,
"awarded": 32,
"revoked": 0
},
"coins": {
"consumed": 0,
"balance": 101,
"purchased": 0,
"awarded": 120,
"revoked": 19
}
}
},
"status": 200
}