com.ibm.soa.parlayx21.payment
Class VolumeChargingProxy

java.lang.Object
  extended by com.ibm.soa.parlayx21.payment.VolumeChargingProxy
All Implemented Interfaces:
VolumeCharging, java.rmi.Remote

public class VolumeChargingProxy
extends java.lang.Object
implements VolumeCharging


Constructor Summary
VolumeChargingProxy()
           
 
Method Summary
 void chargeVolume(java.net.URI endUserIdentifier, long volume, java.lang.String billingText, java.lang.String referenceCode, Property[] parameters)
          This operation results in directly charging to the account indicated by the end user identifier.
 ChargingInformation getAmount(java.net.URI endUserIdentifier, long volume, Property[] parameters)
          This operation results in converting the given volume to a currency amount.
 java.lang.String getEndpoint()
           
 VolumeCharging getVolumeCharging()
           
 void refundVolume(java.net.URI endUserIdentifier, long volume, java.lang.String billingText, java.lang.String referenceCode, Property[] parameters)
          This operation results in directly applying a refund to the account indicated by the end user identifier.
 void setEndpoint(java.lang.String endpoint)
           
 void useJNDI(boolean useJNDI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VolumeChargingProxy

public VolumeChargingProxy()
Method Detail

useJNDI

public void useJNDI(boolean useJNDI)

getEndpoint

public java.lang.String getEndpoint()

setEndpoint

public void setEndpoint(java.lang.String endpoint)

getVolumeCharging

public VolumeCharging getVolumeCharging()

chargeVolume

public void chargeVolume(java.net.URI endUserIdentifier,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         Property[] parameters)
                  throws java.rmi.RemoteException,
                         PolicyException,
                         ServiceException
Description copied from interface: VolumeCharging

This operation results in directly charging to the account indicated by the end user identifier. The charge is specified as a volume. The billing text field is used for textual information to appear on the bill. The reference code is used to uniquely identify the request; it is the application's responsibility to provide a unique reference code within the scope of the application.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.
  * SVC0270 - Charge failed.

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
chargeVolume in interface VolumeCharging
Parameters:
endUserIdentifier - xsd:anyURI The end user's account to be charged
volume - xsd:long The volume to be charged
billingText - xsd:string Textual information to appear on the bill
referenceCode - xsd:string Textual information to uniquely identify the request, for example, in case of disputes
parameters - Property [0..unbounded] Parameters to use to perform rating (“unit”, “contract”, “service”, “operation”)
Throws:
java.rmi.RemoteException
PolicyException
ServiceException

getAmount

public ChargingInformation getAmount(java.net.URI endUserIdentifier,
                                     long volume,
                                     Property[] parameters)
                              throws java.rmi.RemoteException,
                                     PolicyException,
                                     ServiceException
Description copied from interface: VolumeCharging

This operation results in converting the given volume to a currency amount. The end user identifier is given to indicate the subscriber for whom this conversion calculation must be made. The message returns a currency amount if successful.

The following properties may be provided:
  * unit, specifying the unit used for measuring volume (for example, bytes);
  * contract, number of a contract that may govern the use;
  * service, name of the service to be used (for example, SendMessageService);
  * operation, name of the operation to be used (for example, sendMessage).

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
getAmount in interface VolumeCharging
Parameters:
endUserIdentifier - xsd:anyURI The end user's account to be charged
volume - xsd:long The volume to be converted
parameters - Property [0..unbounded] Parameters to use to perform rating ('unit', 'contract', 'service', 'operation')
Returns:
amountresult common:ChargingInformation

The conversion process results in the return of a ChargingInformation structure, where the description, amount and currency elements must be non-null.

Throws:
java.rmi.RemoteException
PolicyException
ServiceException

refundVolume

public void refundVolume(java.net.URI endUserIdentifier,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         Property[] parameters)
                  throws java.rmi.RemoteException,
                         PolicyException,
                         ServiceException
Description copied from interface: VolumeCharging

This operation results in directly applying a refund to the account indicated by the end user identifier. The refund is specified as a volume. The billing text field is used for textual information to appear on the bill. The reference code is used to uniquely identify the request; it is the application's responsibility to provide a unique reference code within the scope of the application.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.
  * SVC0270 - Charge failed.

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
refundVolume in interface VolumeCharging
Parameters:
endUserIdentifier - xsd:anyURI The end user's account to be refunded
volume - xsd:long The volume to be refunded
billingText - xsd:string Textual information to appear on the bill
referenceCode - xsd:string Textual information to uniquely identify the request, for example, in case of disputes
parameters - Property [0..unbounded] Parameters to use to perform rating (“unit”, “contract”, “service”, “operation”)
Throws:
java.rmi.RemoteException
PolicyException
ServiceException


Copyright © 2003 IBM Corp. All Rights Reserved.