raiseReimbursement()
TransactionDetail raiseReimbursement(string usn, ReimbursementRequest reimbursementRequest)
This method raises a reimbursement receipt to an account. A reimbursement is an amount refunded to an account or subscription that has already been paid.
Parameters
- usn
- Format: string
- reimbursementRequest
- Format: ReimbursementRequest XML
Example: A ReimbursementRequest XML document
This example shows a ReimbursementRequest XML document containing information about the reimbursement to raise.
<ReimbursementRequest xmlns="http://xml.inomial.com/smile/2.xsd">
<Amount>50.0</Amount>
<Comment>Return of bond</Comment>
<EffectiveDate>2015-01-01+10:00</EffectiveDate>
</ReimbursementRequest>
Results
This method returns a TransactionDetail XML document containing details about the reimbursement.
Smile emits the TransactionClosed message when the reimbursement transaction is closed.
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>Reimbursement</transactionType>
<company>1</company>
<usn>1000000008</usn>
<transactionNumber>21441035</transactionNumber>
<currency>AUD</currency>
<amount>50.0</amount>
<accountType>1</accountType>
<gstAmount>0</gstAmount>
<entryTimestamp>2015-01-01T01:00:00.000+11:00</entryTimestamp>
<salesReportCategory>reibt</salesReportCategory>
<formattedAmount currency="AUD" formatted="$50.00">50.0</formattedAmount>
<formattedGstAmount currency="AUD" formatted="$0.00">0</formattedGstAmount>
<unallocatedAmount>50.0</unallocatedAmount>
<enteredByUsn>2142421276</enteredByUsn>
<logTimestamp>2015-01-19T10:52:36.911+11:00</logTimestamp>
<description>Return of bond</description>
<formattedUnallocatedAmount currency="AUD" formatted="$50.00">50.0</formattedUnallocatedAmount>
</TransactionDetail>
Faults
NoSuchItemExceptionThis fault is returned when the account does not exist.
InvalidRequestExceptionThis fault is returned when the USN is not provided, the amount specified is invalid or the effective date is not provided.
Java client syntax
java -cp build/smilewsv2-client.jar [options]
com.inomial.smile.client.v2.examples.RaiseReimbursement usn filename
- usn
- Purpose: Specifies the USN of the account for which to raise the reimbursement.
- filename
- Purpose: Define the name of the ReimbursementRequest XML document.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.