public interface CreditBillingAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignCreditToBilling(Id creditId,
Id billingId)
Adds an existing
Credit to a Billing. |
boolean |
canAssignCredits()
Tests if this user can alter credit/billing mappings.
|
boolean |
canAssignCreditsToBilling(Id billingId)
Tests if this user can alter credit/billing mappings.
|
IdList |
getAssignableBillingIds(Id billingId)
Gets a list of billings including and under the given billing node in
which any credit can be assigned.
|
IdList |
getAssignableBillingIdsForCredit(Id billingId,
Id creditId)
Gets a list of billings including and under the given billing node in
which a specific credit can be assigned.
|
void |
unassignCreditFromBilling(Id creditId,
Id billingId)
Removes a
Credit from a Billing. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCredits()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignCreditsToBilling(Id billingId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.billingId
- the Id
of the Billing
false
if mapping is not authorized, true
otherwiseNullArgumentException
- billingId
is
null
mandatory
- This method must be implemented. IdList getAssignableBillingIds(Id billingId) throws OperationFailedException
billingId
- the Id
of the Billing
Ids
NullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableBillingIdsForCredit(Id billingId, Id creditId) throws OperationFailedException
billingId
- the Id
of the Billing
creditId
- the Id
of the Credit
Ids
NullArgumentException
- billingId
or
creditId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCreditToBilling(Id creditId, Id billingId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Credit
to a Billing.
creditId
- the Id
of the Credit
billingId
- the Id
of the Billing
AlreadyExistsException
- creditId
already assigned to billingId
NotFoundException
- creditId
or
billingId
not foundNullArgumentException
- creditId
or
billingId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCreditFromBilling(Id creditId, Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Credit
from a Billing.
creditId
- the Id
of the Credit
billingId
- the Id
of the Billing
NotFoundException
- creditId
or
billingId
not found or creditId
not
mapped to billingId
NullArgumentException
- creditId
or
billingId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.