public interface PaymentBatchAdminSession extends PaymentAdminSession
This session creates, updates, and deletes Payments 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
Payment, a PaymentForm is requested using
getPaymentFormsForCreate() specifying the desired payer, customer,
and record Types or none if no record Types
are needed. Each of the returned PaymentForms 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 PaymentForm
is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
PaymentForm corresponds to an attempted transaction.
The PaymentForms returned from
getPaymentFormsForCreate() may be linked to the originating
request through the peer Ids of the PaymentForm.
In the case where there may be duplicates, any PaymentForm
of the same peer Ids may be used for a create
operation.
Once a batch of PaymentForms are submitted for create,
a CreateResponse is returned for each PaymentForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createPayments(),
errors specific to an individual PaymentForm are
indicated in the corresponding CreateResponse.
CreateResponses may be linked to the originating
PaymentForm through the PaymentForm Id
.
For updates, PaymentForms are requested to the
Payment Id that is to be updated using
getPaymentFormsForUpdate() where the reference Id
in the PaymentForm may be used to link the request.
Similarly, the PaymentForm has metadata about the data that
can be updated and it can perform validation before submitting the update.
The PaymentForm can only be used once for a successful
update and cannot be reused.
Once a batch of PaymentForms are submitted for update,
an UpdateResponse is returned for each PaymentForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updatePayments(),
errors specific to an individual PaymentForm are
indicated in the corresponding UpdateResponse.
UpdateResponses may be linked to the originating
PaymentForm through the PaymentForm Id.
The delete operations delete Payments in bulk. To unmap
a Payment from the current Business, the
PaymentBusinessAssignmentSession should be used. These
delete operations attempt to remove the Payment itself thus
removing it from all known Business catalogs. Bulk delete
operations return the results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasPayments(AliasRequestList aliasRequests)
Adds an
Id to a Payment for the purpose
of creating compatibility. |
CreateResponseList |
createPayments(PaymentBatchFormList paymentForms)
Creates a new set of
Payments. |
DeleteResponseList |
deleteAllPayments()
Deletes all
Payments in this Business . |
DeleteResponseList |
deletePayments(IdList paymentIds)
Deletes payments for the given
Ids. |
DeleteResponseList |
deletePaymentsForCustomer(Id customerId)
Deletes payments for the given customer.
|
DeleteResponseList |
deletePaymentsForPayer(Id payerId)
Deletes payments for the given payer.
|
PaymentBatchFormList |
getPaymentFormsForCreate(PaymentPeerList peers,
Type[] paymentRecordTypes)
Gets the payment forms for creating a bunch of new payments.
|
PaymentBatchFormList |
getPaymentFormsForUpdate(IdList paymentIds)
Gets the payment forms for updating an existing set of payments.
|
UpdateResponseList |
updatePayments(PaymentBatchFormList paymentForms)
Updates existing payments.
|
aliasPayment, canCreatePayments, canCreatePaymentWithRecordTypes, canDeletePayments, canManagePaymentAliases, canUpdatePayments, createPayment, deletePayment, getBusiness, getBusinessId, getPaymentFormForCreate, getPaymentFormForUpdate, updatePaymentgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsclosePaymentBatchFormList getPaymentFormsForCreate(PaymentPeerList peers, Type[] paymentRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers - a list of payment peerspaymentRecordTypes - array of payment record types to be
included in each create operation or an empty list if noneNotFoundException - a node is not foundNullArgumentException - a payerId, customerId,
or paymentRecordTypes is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createPayments(PaymentBatchFormList paymentForms) throws OperationFailedException, PermissionDeniedException
Payments. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .paymentForms - the payment formsNullArgumentException - paymentForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PaymentBatchFormList getPaymentFormsForUpdate(IdList paymentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
paymentIds - the Ids of the Payment
NotFoundException - a paymentId is not
foundNullArgumentException - paymentIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updatePayments(PaymentBatchFormList paymentForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .paymentForms - the form containing the elements to be updatedNullArgumentException - paymentForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllPayments() throws OperationFailedException, PermissionDeniedException
Payments in this Business .OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deletePayments(IdList paymentIds) throws OperationFailedException, PermissionDeniedException
Ids. paymentIds - the Ids of the payments to deleteNullArgumentException - paymentIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deletePaymentsForPayer(Id payerId) throws OperationFailedException, PermissionDeniedException
payerId - the Id of a payerNullArgumentException - payerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deletePaymentsForCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
customerId - the Id of a customerNullArgumentException - customerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasPayments(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to a Payment for the purpose
of creating compatibility. The primary Id of the
Payment is determined by the provider. The new Id
is an alias to the primary Id. If the alias is
a pointer to another payment, it is reassigned to the given payment
Id. aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.