OSID Logo
OSID Specifications
acknowledgement package
Version 3.0.0
Release Candidate Preview
Interfaceosid.acknowledgement.BillingAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Billings. 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 Billing, a BillingForm is requested using getBillingFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned BillingForm 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 BillingForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each BillingForm corresponds to an attempted transaction.

For updates, BillingForms are requested to the Billing Id that is to be updated using getBillingFormForUpdate(). Similarly, the BillingForm has metadata about the data that can be updated and it can perform validation before submitting the update. The BillingForm can only be used once for a successful update and cannot be reused.

The delete operations delete Billings. It is safer to remove all mappings to the Billing catalogs before deletion.

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

MethodcanCreateBillings
Description

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

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

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

Parametersosid.type.Type[]billingRecordTypesarray of types
Returnboolean true if Billing creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT billingRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBillingFormForCreate
Description

Gets the billing form for creating new billings. A new form should be requested for each create transaction.

Parametersosid.type.Type[]billingRecordTypesarray of types
Returnosid.acknowledgement.BillingFormthe billing form
ErrorsNULL_ARGUMENT billingRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBilling
Description

Creates a new Billing.

Parametersosid.acknowledgement.BillingFormbillingFormthe form for this Billing
Returnosid.acknowledgement.Billingthe new Billing
ErrorsILLEGAL_STATE billingForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT billingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED billingForm did not originate from getBillingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBillings
Description

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

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

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

Parametersosid.id.IdbillingIdthe Id of the Billing
Returnosid.acknowledgement.BillingFormthe billing form
ErrorsNOT_FOUND billingId is not found
NULL_ARGUMENT billingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBilling
Description

Updates an existing billing.

Parametersosid.acknowledgement.BillingFormbillingFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE billingForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT billingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED billingForm did not originate from getBillingFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteBillings
Description

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

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

Deletes a Billing.

Parametersosid.id.IdbillingIdthe Id of the Billing to remove
ErrorsNOT_FOUND billingId not found
NULL_ARGUMENT billingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBillingAliases
Description

Tests if this user can manage Id aliases for Billings. 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 Billing aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasBilling
Description

Adds an Id to a Billing for the purpose of creating compatibility. The primary Id of the Item is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another billing, it is reassigned to the given billing Id.

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