Interface PayerBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, PayerAdminSession
This session creates, updates, and deletes Payers in bulk. The
data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update and may
not be reused.
Create and update operations differ in their usage. To create a
Payer , a PayerForm is requested using
getPayerFormsForCreate() specifying the desired resources and record
Types or none if no record Types are needed. Each of the
returned PayerForms will indicate that it is to be used with a
create operation and can be used to examine metdata or validate data prior
to creation. Once a PayerForm is submiited to a create operation,
it cannot be reused with another create operation unless the first
operation was unsuccessful. Each PayerForm corresponds to an
attempted transaction.
The PayerForms returned from getPayerFormsForCreate()
may be linked to the originating request through the peer Ids of
the PayerForm . In the case where there may be duplicates, any
PayerForm of the same peer Ids may be used for a create
operation.
Once a batch of PayerForms are submitted for create, a
CreateResponse is returned for each PayerForm , although the
ordering is not defined. Only errors that pertain to the entire create
operation are returned from createPayers() , errors specific to an
individual PayerForm are indicated in the corresponding
CreateResponse . CreateResponses may be linked to the originating
PayerForm through the PayerForm Id .
For updates, PayerForms are requested to the Payer
Id that is to be updated using getPayerFormsForUpdate()
where the reference Id in the PayerForm may be used to
link the request. Similarly, the PayerForm has metadata about the
data that can be updated and it can perform validation before submitting
the update. The PayerForm can only be used once for a successful
update and cannot be reused.
Once a batch of PayerForms are submitted for update, an
UpdateResponse is returned for each PayerForm , although the
ordering is not defined. Only errors that pertain to the entire update
operation are returned from updatePayers() , errors specific to an
individual PayerForm are indicated in the corresponding
UpdateResponse . UpdateResponses may be linked to the originating
PayerForm through the PayerForm Id .
The delete operations delete Payers in bulk. To unmap a
Payer from the current Business , the
PayerBusinessAssignmentSession should be used. These delete operations
attempt to remove the Payer itself thus removing it from all known
Business catalogs. Bulk delete operations return the results in
DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasPayers(AliasRequestList aliasRequests) Adds anIdto aPayerfor the purpose of creating compatibility.createPayers(PayerBatchFormList payerForms) Creates a new set ofPayers.Deletes allPayersin thisBusiness.Deletes payers ineffective before the given date.deletePayers(IdList payerIds) Deletes payers for the givenIds.deletePayersForResource(Id resourceId) Deletes payers for the given resource.getPayerFormsForCreate(IdList resourceIds, Type[] payerRecordTypes) Gets the payer forms for creating a bunch of new payers.getPayerFormsForUpdate(IdList payerIds) Gets the payer forms for updating an existing set of payers.updatePayers(PayerBatchFormList payerForms) Updates existing payers.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface PayerAdminSession
aliasPayer, canCreatePayers, canCreatePayerWithRecordTypes, canDeletePayers, canManagePayerAliases, canUpdatePayers, createPayer, deletePayer, getBusiness, getBusinessId, getPayerFormForCreate, getPayerFormForUpdate, updatePayerModifier and TypeMethodDescriptionvoidaliasPayer(Id payerId, Id aliasId) Adds anIdto aPayerfor the purpose of creating compatibility.booleanTests if this user can createPayers.booleancanCreatePayerWithRecordTypes(Type[] payerRecordTypes) Tests if this user can create a singlePayerusing the desired record types.booleanTests if this user can deletePayers.booleanTests if this user can manageIdaliases forPayers.booleanTests if this user can updatePayers.createPayer(PayerForm payerForm) Creates a newPayer.voiddeletePayer(Id payerId) Deletes aPayer.Gets theBusinessassociated with this session.Gets theBusinessIdassociated with this session.getPayerFormForCreate(Id resourceId, Type[] payerRecordTypes) Gets the payer form for creating new payers.getPayerFormForUpdate(Id payerId) Gets the payer form for updating an existing payer.voidupdatePayer(PayerForm payerForm) Updates an existing payer.
-
Method Details
-
getPayerFormsForCreate
PayerBatchFormList getPayerFormsForCreate(IdList resourceIds, Type[] payerRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the payer forms for creating a bunch of new payers. A form is returned for each supplied resource.- Parameters:
resourceIds- a list of resourcespayerRecordTypes- array of payer record types to be included in each create operation or an empty list if none- Returns:
- the payer forms
- Throws:
NotFoundException- a resource is not foundNullArgumentException-resourceIdsorpayerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createPayers
CreateResponseList createPayers(PayerBatchFormList payerForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofPayers. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
payerForms- the payer forms- Returns:
- the create responses
- Throws:
NullArgumentException-payerFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getPayerFormsForUpdate
PayerBatchFormList getPayerFormsForUpdate(IdList payerIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the payer forms for updating an existing set of payers. A new payer form should be requested for each update transaction.- Parameters:
payerIds- theIdsof thePayer- Returns:
- the payer form
- Throws:
NotFoundException- apayerIdis not foundNullArgumentException-payerIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updatePayers
UpdateResponseList updatePayers(PayerBatchFormList payerForms) throws OperationFailedException, PermissionDeniedException Updates existing payers. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
payerForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-payerFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllPayers
Deletes allPayersin thisBusiness.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deletePayers
DeleteResponseList deletePayers(IdList payerIds) throws OperationFailedException, PermissionDeniedException Deletes payers for the givenIds.- Parameters:
payerIds- theIdsof the payers to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-payerIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deletePayersForResource
DeleteResponseList deletePayersForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes payers for the given resource.- Parameters:
resourceId- theIdof a resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectivePayersByDate
DeleteResponseList deleteIneffectivePayersByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes payers ineffective before the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasPayers
AliasResponseList aliasPayers(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aPayerfor the purpose of creating compatibility. The primaryIdof thePayeris determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another payer, it is reassigned to the given payerId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-