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

This session provides methods to re-assign Credits to Bilings. A Credit may map to multiple Billings and removing the last reference to a Credit is the equivalent of deleting it. Each Billing may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Credit to another Billing is not a copy operation (eg: does not change its Id ).

MethodcanAssignCredits
Description

Tests if this user can alter credit/billing mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignCreditsToBilling
Description

Tests if this user can alter credit/billing mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdbillingIdthe Id of the Billing
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT billingId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBillingIds
Description

Gets a list of billings including and under the given billing node in which any credit can be assigned.

Parametersosid.id.IdbillingIdthe Id of the Billing
Returnosid.id.IdListlist of assignable billing Ids
ErrorsNULL_ARGUMENT billingId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBillingIdsForCredit
Description

Gets a list of billings including and under the given billing node in which a specific credit can be assigned.

Parametersosid.id.IdbillingIdthe Id of the Billing
osid.id.IdcreditIdthe Id of the Credit
Returnosid.id.IdListlist of assignable billing Ids
ErrorsNULL_ARGUMENT billingId or creditId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignCreditToBilling
Description

Adds an existing Credit to a Billing.

Parametersosid.id.IdcreditIdthe Id of the Credit
osid.id.IdbillingIdthe Id of the Billing
ErrorsALREADY_EXISTS creditId already assigned to billingId
NOT_FOUND creditId or billingId not found
NULL_ARGUMENT creditId or billingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignCreditFromBilling
Description

Removes a Credit from a Billing.

Parametersosid.id.IdcreditIdthe Id of the Credit
osid.id.IdbillingIdthe Id of the Billing
ErrorsNOT_FOUND creditId or billingId not found or creditId not mapped to billingId
NULL_ARGUMENT creditId or billingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignCreditToBilling
Description

Moves a Credit from one Billing to another. Mappings to other Billings are unaffected.

Parametersosid.id.IdcreditIdthe Id of the Credit
osid.id.IdfromBillingIdthe Id of the current Billing
osid.id.IdtoBiillingIdthe Id of the destination Billing
ErrorsNOT_FOUND creditId, fromBillingId, or toBillingId not found or creditId not mapped to fromBillingId
NULL_ARGUMENT creditId, billingId, or toBillingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.