releaseBond()
TransactionDetail releaseBond(string usn, string bondNumber)
This method creates a BondRelease transaction to record the release of the bond provided.
Parameters
- usn
- Format: string
- bondNumber
- Format: string
Results
This method returns a TransactionDetail XML document containing information about the bond release.
Smile emits a TransactionClosed message when the bond release is created. A TransactionAllocated message is emitted when the bond release is allocated to the bond. A TransactionAllocated message is emitted with the <allocationType> element value of Deallocation when previous allocations to the bond are deallocated.
Example: A returned TransactionDetail XML document
This example shows a TransactionDetail XML document.
<TransactionDetail xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
<version>2.0</version>
<transactionType>BondRelease</transactionType>
<company>1</company>
<usn>2142422829</usn>
<transactionNumber>21431473</transactionNumber>
<currency>AUD</currency>
<amount>-50.00</amount>
<accountType>1</accountType>
<gstAmount>0.00</gstAmount>
<entryTimestamp>2015-01-13T09:33:30.081+11:00</entryTimestamp>
<salesReportCategory>bondrel</salesReportCategory>
<formattedAmount currency="AUD" formatted="$(50.00)">-50.00</formattedAmount>
<formattedGstAmount currency="AUD" formatted="$0.00">0.00</formattedGstAmount>
<unallocatedAmount>0.00</unallocatedAmount>
<enteredByUsn>2142420815</enteredByUsn>
<logTimestamp>2015-01-13T09:33:30.082+11:00</logTimestamp>
<referencedNumber>21431465</referencedNumber>
<formattedUnallocatedAmount currency="AUD" formatted="$0.00">0.00</formattedUnallocatedAmount>
</TransactionDetail>
Faults
NoSuchItemExceptionThis fault is returned when the provided USN or bond number does not exist.
InvalidRequestExceptionThis fault is returned when the account USN is not provided, or the USN and bond number do not correspond.
Java client syntax
java -cp build/smilewsv2-client.jar [options]
com.inomial.smile.client.v2.examples.ReleaseBond usn bondNumber
- usn
- Purpose: Specifies the USN of the account to release the bond from.
- bondNumber
- Purpose: Specifies the number of the bond to release.