createBond()

ItemisedTransactionDetail createBond(BondRequest bondRequest)

This method creates a bond associated with the given account or subscription.

Parameters

bondRequest
Format: BondRequest XML
Purpose: Defines a BondRequest XML document that specifies the bond type to apply to an account or subscription USN.

Example: A BondRequest XML document

This example shows a BondRequest XML document.

The value in the <BondType> element is a bond type key returned by getBondTypes(). The value in the <Amount> element will override the amount associated with the bond type.
<BondRequest xmlns="http://xml.inomial.com/smile/2.xsd">
  <USN>2142422829</USN>
  <BondType>6aecbd7b-cfe4-4b79-9af4-92f5e70564d9</BondType>
  <EffectiveDate>2015-01-12+10:00</EffectiveDate>
  <Amount>50.00</Amount>
</BondRequest>

Results

This method returns an ItemisedTransactionDetail XML document that contains information about the bond applied to an account.

Smile emits a TransactionClosed message when the bond is applied.

Example: A returned ItemisedTransactionDetail XML document

This example shows an ItemisedTransactionDetail XML document.

<ItemisedTransactionDetail xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <version>2.0</version>
  <transactionType>Bond</transactionType>
  <company>1</company>
  <usn>2142422829</usn>
  <transactionNumber>21431465</transactionNumber>
  <currency>AUD</currency>
  <amount>50.00</amount>
  <accountType>1</accountType>
  <gstAmount>0.00</gstAmount>
  <entryTimestamp>2015-01-12T09:20:01.191+11:00</entryTimestamp>
  <salesReportCategory>bond</salesReportCategory>
  <formattedAmount currency="AUD" formatted="$50.00">50.00</formattedAmount>
  <formattedGstAmount currency="AUD" formatted="$0.00">0.00</formattedGstAmount>
  <unallocatedAmount>50.00</unallocatedAmount>
  <enteredByUsn>2142420815</enteredByUsn>
  <logTimestamp>2015-01-13T09:20:01.195+11:00</logTimestamp>
  <formattedUnallocatedAmount currency="AUD" formatted="$50.00">50.00</formattedUnallocatedAmount>
  <transactionDate>2015-01-12+11:00</transactionDate>
  <openDate>2015-01-13+11:00</openDate>
  <closeDate>2015-01-13+11:00</closeDate>
  <quoteNumber>21431465</quoteNumber>
  <createdByUsn>2142420815</createdByUsn>
  <discount>0.00</discount>
  <transactionSource>Bond</transactionSource>
  <transactionItem>
    <usn>2142422829</usn>
    <lineNumber>0</lineNumber>
    <itemCode>002103</itemCode>
    <chargeFrom>2015-01-12+11:00</chargeFrom>
    <chargeTo>2015-01-12+11:00</chargeTo>
    <description>ADSL modem</description>
    <quantity>1.000</quantity>
    <currency>AUD</currency>
    <amount>50.00</amount>
    <isGst>false</isGst>
    <chargeGst>false</chargeGst>
    <discount>0.00</discount>
    <count>0</count>
    <gstAmount>0.000000</gstAmount>
    <salesReportCategory>bond</salesReportCategory>
  </transactionItem>
</ItemisedTransactionDetail>

Faults

NoSuchItemException

This fault is returned when the USN or bond type in the bond request does not exist.

InvalidRequestException

This fault is returned when the account USN is not provided in the bond request.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.CreateBond filename
filename
Purpose: Defines the filename of the BondRequest XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.