OSID Logo
OSID Specifications
billing payment package
Version 3.0.0
Release Candidate Preview
Interfaceosid.billing.payment.PayerAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Payers. 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 getPayerFormForCreate() specifying the desired resource and record Types or none if no record Types are needed. The returned PayerForm 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 the 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.

For updates, PayerForms are requested to the Payer Id that is to be updated using getPayerFormForUpdate(). 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.

The delete operations delete Payers. 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.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetBusinessId
Description

Gets the Business Id associated with this session.

Returnosid.id.Idthe Business Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBusiness
Description

Gets the Business associated with this session.

Returnosid.billing.Businessthe business
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePayers
Description

Tests if this user can create Payers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Payer will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Payer creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreatePayerWithRecordTypes
Description

Tests if this user can create a single Payer using the desired record types. While BillingPaymentManager.getPayerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Payer. Providing an empty array tests if a Payer can be created with no records.

Parametersosid.type.Type[]payerRecordTypesarray of payer record types
Returnboolean true if Payer creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT payerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPayerFormForCreate
Description

Gets the payer form for creating new payers. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIda resource Id
osid.type.Type[]payerRecordTypesarray of payer record types
Returnosid.billing.payment.PayerFormthe payer form
ErrorsNOT_FOUND resourceId is not found
NULL_ARGUMENT payerRecordTypes or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePayer
Description

Creates a new Payer.

Parametersosid.billing.payment.PayerFormpayerFormthe form for this Payer
Returnosid.billing.payment.Payerthe new Payer
ErrorsILLEGAL_STATE payerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT payerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED payerForm did not originate from getPayerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePayers
Description

Tests if this user can update Payers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Payer will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Payer modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetPayerFormForUpdate
Description

Gets the payer form for updating an existing payer. A new payer form should be requested for each update transaction.

Parametersosid.id.IdpayerIdthe Id of the Payer
Returnosid.billing.payment.PayerFormthe payer form
ErrorsNOT_FOUND payerId is not found
NULL_ARGUMENT payerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePayer
Description

Updates an existing payer.

Parametersosid.billing.payment.PayerFormpayerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE payerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT payerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED payerForm did not originate from getPayerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeletePayers
Description

Tests if this user can delete Payers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Payer will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Payer deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeletePayer
Description

Deletes a Payer.

Parametersosid.id.IdpayerIdthe Id of the Payer to remove
ErrorsNOT_FOUND payerId not found
NULL_ARGUMENT payerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePayerAliases
Description

Tests if this user can manage Id aliases for Payers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Payer aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasPayer
Description

Adds an Id to a Payer for the purpose of creating compatibility. The primary Id of the Payer is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another payer, it is reassigned to the given payer Id.

Parametersosid.id.IdpayerIdthe Id of a Payer
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND payerId not found
NULL_ARGUMENT payerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.