| Interface | osid.billing.CustomerBusinessAssignmentSession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Description | 
                 This session provides methods to re-assign   Adding a reference of a   | ||
| Method | canAssignCustomers | ||
| Description | 
                     Tests if this user can alter customer/business 
                    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 
                      | ||
| Return | boolean |  false  if mapping is not authorized,  true  
otherwise  | |
| Compliance | mandatory | This method must be implemented. | |
| Method | canAssignCustomerToBusiness | ||
| Description | 
                     Tests if this user can alter customer/business 
                    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 
                      | ||
| Parameters | osid.id.Id | businessId | the  Id  of the  Business   | 
| Return | boolean |  false  if mapping is not authorized,  true  
otherwise  | |
| Errors | NULL_ARGUMENT |  businessId  is  null   |                 |
| Compliance | mandatory | This method must be implemented. | |
| Method | getAssignableBusinessIds | ||
| Description | 
                     Gets a list of businesses including and under the given business node in which any customer can be assigned.  | ||
| Parameters | osid.id.Id | businessId | the  Id  of the  Business   | 
| Return | osid.id.IdList | list of assignable business  Ids   | |
| Errors | NULL_ARGUMENT |  businessId  is  null   |                 |
| OPERATION_FAILED | unable to complete request | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | getAssignableBusinessIdsForCustomer | ||
| Description | 
                     Gets a list of businesses including and under the given business node in which a specific customer can be assigned.  | ||
| Parameters | osid.id.Id | businessId | the  Id  of the  Business   | 
osid.id.Id | customerId | the  Id  of the  Customer   | |
| Return | osid.id.IdList | list of assignable business  Ids   | |
| Errors | NULL_ARGUMENT |  businessId  or  customerId  is  null 
  |                 |
| OPERATION_FAILED | unable to complete request | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | assignCustomerToBusiness | ||
| Description | 
                     Adds an existing   | ||
| Parameters | osid.id.Id | customerId | the  Id  of the  Customer   | 
osid.id.Id | businessId | the  Id  of the  Business   | |
| Errors | ALREADY_EXISTS |  customerId  is already assigned to  businessId   |                 |
| NOT_FOUND |  customerId  or  businessId  not found  |                 ||
| NULL_ARGUMENT |  customerId  or  businessId  is  null 
  |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | unassignCustomerFromBusiness | ||
| Description | 
                     Removes a   | ||
| Parameters | osid.id.Id | customerId | the  Id  of the  Customer   | 
osid.id.Id | businessId | the  Id  of the  Business   | |
| Errors | NOT_FOUND |  customerId  or  businessId  not found or  
customerId  not assigned to  businessId   |                 |
| NULL_ARGUMENT |  customerId  or  businessId  is  null 
  |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | reassignCustomerToBusiness | ||
| Description | 
                     Moves a   | ||
| Parameters | osid.id.Id | customerId | the  Id  of the  Customer   | 
osid.id.Id | fromBusinessId | the  Id  of the current  Business   | |
osid.id.Id | toBusinessId | the  Id  of the destination  Business   | |
| Errors | NOT_FOUND |  customerId, fromBusinessId,  or  toBusinessId  
not found or  customerId  not mapped to  fromBusinessId 
  |                 |
| NULL_ARGUMENT |  customerId, fromBusinessId,  or  toBusinessId  
is  null   |                 ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |