An operation changeMonexAtBnode does a money redemption-change at the bank.
The redemption-change can be did in one of three types. Appropriate parameters of the change must also be provided depending on the chosen type.
- AMOUNT: The money is to be distributed so that an amount given in milibillons can be created.
- HISTOGRAM: The money is to be distributed so that it corresponds to a given coins distribution. The possible distributions are:
- DEFAULT_ISSUANCE_CURVE
- GROSZY_ISSUANCE_CURVE
- ZLOTY_ISSUANCE_CURVE
- TENS_ISSUANCE_CURVE
- HUNDREDS_ISSUANCE_CURVE
- FACE_VALUE: The money is to be distributed according to a list of coins. The list must consist of a maximum of 21 integers, separated by newlines; each of them corresponds to a number of the coins that you want to get of the given denomination (according to the list of denominations, from the smallest to the largest)
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:changeMonexAtBnode> <amountToChange> <amount>1000</amount> <currency>PLN</currency> <colour>0</colour> </amountToChange> <changeMonexType>HISTOGRAM</changeMonexType> <value>HUNDREDS_ISSUANCE_CURVE</value> </ns:changeMonexAtBnode> </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:changeMonexAtBnodeResponse> <return> <taskId>0B3LCA6254A12E5GEB0MF4F6LH</taskId> <requestStatus>SUCCESS</requestStatus> <requestStatusDescription>Request succeeded.</requestStatusDescription> </return> </ns:changeMonexAtBnodeResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Request parameters:
Parameter | Type | Description | Required? | Specification |
changeMonexType | string | The type of coin change | Yes | One from among AMOUNT, HISTOGRAM, FACE_VALUE |
value | string | The parameter of change, depended on changeMonexType | Yes | See the description |
amountToChange | billonAmount | The amount that is to be distributed | Yes | The amount must be between 0 and 25 000 miliBillons inclusive |
Response parameters:
Name | Type | Description |
taskId | string | the identifier of the created 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/not supported colour of money |
ERR_INVALID_CHANGE_MONEY_PARAMS | |
ERR_NOT_ENOUGH_MONEY | not enought amount of money |
FINISHED_ERR | an unknown error occurred |
FINISHED_ERR_CANCELLED_DUE_TO_PREVIOUS_ERROR | restart CNode |
An example of JSON in a parameter ‘additionalInfo’ in the response of the operation ‘getTaskStatus’:
{ "amount": 5000, "actual_amount": 0, "restart_amount": 0 }