An operation changeMoney allows to change money of a user whoCanChange (or in the system if blank) so that user can obtain amountToAchieve.
Example SOAP request:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="ns1"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <ns:changeMoney> <amountToAchieve> <amount>1000</amount> <currency>PLN</currency> <colour>0</colour> </amountToAchieve> <whoCanChange>username</whoCanChange> </ns:changeMoney> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Example SOAP response:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="ns1"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <ns:changeMoneyResponse> <return> <taskId>0B3LCA6254A12E5GEB0MF4F6LH</taskId> <requestStatus>SUCCESS</requestStatus> <requestStatusDescription>Request succeeded.</requestStatusDescription> </return> </ns:changeMoneyResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Request parameters:
Parameter | Type | Description | Required? | Specification |
amountToChange | billonAmount | An amount that is to be distributed | Yes | The amount must be greater than zero |
whoCanChange | string | An user for whom the coin change is to be done | No | it must be a valid username |
Reponse parameters:
Name | Type | Description |
taskId | string | the identifier of the crated task |
requestStatusDescription | string | a description of a status |
requestStatus | string | result of request |
Possible errors:
Error | Description |
ERR_INVALID_AMOUNT | invalid amount |
ERR_INVALID_CURRENCY | invalid currency |
ERR_INVALID_MONEY_COLOUR | invalid/unsupported colour of money |
ERR_INVALID_USERNAME | invalid username |
An example of JSON in a parameter ‘additionalInfo’ in the response of the operation ‘getTaskStatus’:
{ "amount": 5000, "actual_amount": 0, "restart_amount": 0 }