addSimpleRecurringCharges()

SimpleRecurringCharges addSimpleRecurringCharges(string usn, NewSimpleRecurringCharges recurringCharges)

This method is used for adding recurring charges to a specified account or subscription.

Parameters

usn
Format: string
Purpose: Specifies the account or subscription USN.
recurringCharges
Format: NewSimpleRecurringCharges XML
Purpose: Defines a NewSimpleRecurringCharges XML document that specifies the values of recurring charges to be updated.

Example: A NewSimpleRecurringCharges XML document

This example shows a NewSimpleRecurringCharges XML document to add a new recurring charge to the account or subscription USN specified.

<NewSimpleRecurringCharges xmlns="http://xml.inomial.com/smile/2.xsd">
  <SimpleRecurringCharge>
    <RecurringCharge>
      <ChargeQuantity>2</ChargeQuantity>
      <Frequency type="Rating Periods">1</Frequency>
      <WhenToCharge>In Advance</WhenToCharge>
      <AdvancePeriods>1</AdvancePeriods>
      <ProRataAction>Pro-Rata</ProRataAction>
      <MinProRataDays>0</MinProRataDays>
      <LineItemDescription>
        <ItemCode>consult</ItemCode>
        <Name>Consulting and support services</Name>
        <UnitSize>1</UnitSize>
        <ChargeGst>true</ChargeGst>
        <Rate formatted="$200.00" currency="AUD">200</Rate>
        <DisplayRate>$100/hr</DisplayRate>
      </LineItemDescription>
      <ValidFrom>2014-09-01+10:00</ValidFrom>
    </RecurringCharge>
    <Rate formatted="$200.00" currency="AUD">200</Rate>
    <DisplayRate>$100/hr</DisplayRate>
  </SimpleRecurringCharge>
</NewSimpleRecurringCharges>

Results

This method returns a list of new recurring charges added to the account or subscription USN specified.

There are no messages defined by this method.

Example: A returned SimpleRecurringCharges XML document

This example shows a SimpleRecurringCharges XML document containing a new recurring charge that has been added to account USN 2142423447, which is given as a parameter.

<SimpleRecurringCharges xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <USN>2142423447</USN>
  <SimpleRecurringCharge>         
    <RecurringCharge id="518">
      <ChargeQuantity>2</ChargeQuantity>
      <Frequency type="Rating Periods">1</Frequency>
      <WhenToCharge>In Advance</WhenToCharge>
      <AdvancePeriods>1</AdvancePeriods>
      <ProRataAction>Pro-Rata</ProRataAction>
      <MinProRataDays>0</MinProRataDays>
      <LineItemDescription>  
        <ItemCode>consult</ItemCode>
        <Name>Consulting and support services</Name>
        <UnitSize>1</UnitSize>
        <ChargeGst>true</ChargeGst>
        <Rate formatted="$200.00" currency="AUD">200</Rate>
        <DisplayRate>$100/hr</DisplayRate>
      </LineItemDescription>
      <ValidFrom>2014-09-01+10:00</ValidFrom>
    </RecurringCharge>
    <Rate formatted="$200.00" currency="AUD">200</Rate>
    <DisplayRate>$100/hr</DisplayRate>         
  </SimpleRecurringCharge>
</SimpleRecurringCharges>     

Faults

NoSuchItemException

This fault is returned when the specified USN does not match an account or subscription, or the specified <LineItemDescription> in a recurring charge does not match an item description.

RecurringChargeException
This fault is returned when one of the following situations occur:
  • An unrecognised pro-rata action is provided
  • An unrecognised frequency type is provided
  • An unrecognised charging mode is provided

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.AddSimpleRecurringCharges usn filename
usn
Purpose: Specifies the account or subscription USN.
filename
Purpose: Defines the filename of the NewSimpleRecurringCharges XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.