AddPackageToUserWithExtendedAttributesWithBulkQuantity( username, packageID, chargeCreditCard, IsChildUser, billNow extAttributesXML, BulkQuanity ) : Integer
Since: EngageIP v25.2
Assigns a package to a user and returns the ID of the UserPackage record or throws an exception if the addition of the package fails or if the user or package does not exist
The UserPackage will not include any Optional Services that might be configured on the Package. This method also allows one to bill now or later as well as set any extended attributes on the UserPackage. The number of user packages will be billed based on the Bulk Quantity.
When providing a user package's extended attributes (custom fields) you must supply a formatted XML string for the extAttributesXML parameter. This is an XML description of both the field name and the value to update for the specified field.
Example extAttributesXML value:
<?xml version='1.0' standalone='yes'?> <Extended> <Attribute Name='DeviceID' Value='12:A3:98'/> </Extended>
Parameters:
username (String) - The name of the user to add the package to. An exception will be thrown if the username does not exist.
packageID (Integer) - The ID of the package to assign to the user. An exception will be thrown if the package does not exist.
chargeCreditCard (Boolean) - Whether or not to immediately charge the user's credit card
IscChildUser (Boolean) - Whether or not this is a child user. See IsChild
extAttributesXML (String) - XML string that represents the extended attributes
BulkQuantity (Integer) - The number of packages that billing will calculate charges for. See Bulk Package Component for more details.
Returns:
The new user package ID
Possible Exceptions:
INVALID USER
INVALID PACKAGE
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /AdminPortal/webservice.asmx HTTP/1.1 Host: localhost Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <AuthHeader xmlns="Logisense_EngageIP"> <Username>string</Username> <Password>string</Password> </AuthHeader> </soap12:Header> <soap12:Body> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantity xmlns="Logisense_EngageIP"> <username>string</username> <packageID>int</packageID> <chargeCreditCard>boolean</chargeCreditCard> <IsChildUser>boolean</IsChildUser> <billNow>boolean</billNow> <extAttributesXML>string</extAttributesXML> <BulkQuantity>int</BulkQuantity> </AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantity> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResponse xmlns="Logisense_EngageIP"> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResult>int</AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResult> </AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResponse> </soap12:Body> </soap12:Envelope>
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /AdminPortal/webservice.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "Logisense_EngageIP/AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantity" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeader xmlns="Logisense_EngageIP"> <Username>string</Username> <Password>string</Password> </AuthHeader> </soap:Header> <soap:Body> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantity xmlns="Logisense_EngageIP"> <username>string</username> <packageID>int</packageID> <chargeCreditCard>boolean</chargeCreditCard> <IsChildUser>boolean</IsChildUser> <billNow>boolean</billNow> <extAttributesXML>string</extAttributesXML> <BulkQuantity>int</BulkQuantity> </AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantity> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResponse xmlns="Logisense_EngageIP"> <AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResult>int</AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResult> </AddPackageToUserWithBillNowWithExtendedAttributesWithBulkQuantityResponse> </soap:Body> </soap:Envelope>