RevokeParentCurrency
Revoke the specified amount of currency from the parent user. Parent user's balance can go negative
Service | Operation |
---|---|
virtualCurrency | REVOKE_PARENT_VC |
Method Parameters
Parameter | Description |
---|---|
vcId | The currency type to revoke. |
vcAmount | The amount of currency to revoke. |
levelName | The name of the parent level. |
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 levelName = "master";
var virtualCurrencyProxy = bridge.getVirtualcurrencyServiceProxy();
var postResult = virtualCurrencyProxy.RevokeParentCurrency(vcId, vcAmount, levelName);
{
"service":"virtualCurrency",
"operation":"REVOKE_PARENT_VC",
"data":{
"vcId":"coins",
"vcAmount":1,
"levelName":"master"
}
}
JSON Response
{
"data": {
"currencyMap": {
"parent2VC1": {
"consumed": 0,
"balance": 9,
"purchased": 0,
"awarded": 10,
"revoked": 1
},
"parent2VC2": {
"consumed": 0,
"balance": 0,
"purchased": 0,
"awarded": 0,
"revoked": 0
}
}
},
"status": 200
}