Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Assigns a package to a user with optional services set in XML and service discounts, returns the ID of the User Package record or throws exception if the addition of the package fails or if the user or package do not exist.

...

Info

Note: The User Package will include default Optional Services that might be configured on the Package.

Parameters:

  • username (String) - The username of the user in which to add the package.  An exception will be thrown if the username does not exist.

  • packageID (Integer)   - The ID of the User Package to add to the user.

  • chargeCreditCard (Integer) - When set to true, if the user's default payment is a credit card then a charge for the package will be incurred.

  • IsChildUser (Boolean) - Indicates if the user is a child account.

  • NextBillDate (DateTime) - Specify the date you wish the package to be billed , otherwise use DateTime.MinValue to set as now.

  • billNow (Boolean) - When set to true, the optional service will be invoiced, otherwise this will occur with the regular bill cycle of the user.

  • xmlOptionalServices (String) -

    Code Block
    languagexml
    <OptionalServices>
        <ServiceID>23</ServiceID>
    </OptionalServices>
  • xmlServiceDiscounts (String) -

    Code Block
    languagexml
    <ServiceDiscounts>
        <ServiceName>My Service</ServiceName>
        <discountType>Fixed</discountType>
        <discountAmount>10.00</discountAmount>
        <discountOccur>0</discountOccur>
        <discountNote>Renewal discount</discountNote>
    </ServiceDiscounts>
    • For details regarding discount please see Applying Discounts at the Package Level

    • For infinitely recurring discount use 0

...