OSID Logo
OSID Specifications
ordering batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ordering.batch.PriceScheduleBatchAdminSession
Implementsosid.ordering.PriceScheduleAdminSession
Description

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

The PriceScheduleForms returned from getPriceScheduleFormsForCreate() may be linked to the originating request through the peer Ids of the PriceScheduleForm. In the case where there may be duplicates, any PriceScheduleForm of the same peer Ids may be used for a create operation.

Once a batch of PriceScheduleForms are submitted for create, a CreateResponse is returned for each PriceScheduleForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createPriceSchedules(), errors specific to an individual PriceScheduleForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating PriceScheduleForm through the PriceScheduleForm Id .

For updates, PriceScheduleForms are requested to the PriceSchedule Id that is to be updated using getPriceScheduleFormsForUpdate() where the reference Id in the PriceScheduleForm may be used to link the request. Similarly, the PriceScheduleForm has metadata about the data that can be updated and it can perform validation before submitting the update. The PriceScheduleForm can only be used once for a successful update and cannot be reused.

Once a batch of PriceScheduleForms are submitted for update, an UpdateResponse is returned for each PriceScheduleForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updatePriceSchedules(), errors specific to an individual PriceScheduleForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating PriceScheduleForm through the PriceScheduleForm Id.

The delete operations delete PriceSchedules in bulk. To unmap a PriceSchedule from the current Store, the PriceScheduleStoreAssignmentSession should be used. These delete operations attempt to remove the PriceSchedule itself thus removing it from all known Store catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetPriceScheduleFormsForCreate
Description

Gets the price schedule forms for creating a bunch of new price schedules.

Parameterscardinalnumberthe number of forms to retrieve
osid.type.Type[]priceScheduleRecordTypesarray of price schedule record types to be included in each create operation or an empty list if none
Returnosid.ordering.batch.PriceScheduleBatchFormListthe price schedule forms
ErrorsNULL_ARGUMENT priceScheduleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreatePriceSchedules
Description

Creates a new set of PriceSchedules. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.ordering.batch.PriceScheduleBatchFormListpriceScheduleFormsthe price schedule forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT priceScheduleForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPriceScheduleFormsForUpdate
Description

Gets the price schedule forms for updating an existing set of price schedules. A new price schedule form should be requested for each update transaction.

Parametersosid.id.IdListpriceScheduleIdsthe Ids of the PriceSchedules
Returnosid.ordering.batch.PriceScheduleBatchFormListthe price schedule form
ErrorsNOT_FOUNDa priceScheduleId is not found
NULL_ARGUMENT priceScheduleIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePriceSchedules
Description

Updates existing price schedules. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.ordering.batch.PriceScheduleBatchFormListpriceScheduleFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT priceScheduleForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllPriceSchedules
Description

Deletes all PriceSchedules in this Store .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeletePriceSchedules
Description

Deletes price schedules for the given Ids.

Parametersosid.id.IdListpriceScheduleIdsthe Ids of the price schedules to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT priceScheduleIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasPriceSchedules
Description

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

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPriceFormsForCreate
Description

Gets the price forms for creating a bunch of new prices. A form is returned for each supplied price schedule.

Parametersosid.id.IdListpriceScheduleIdsa list of price schedule Ids
osid.type.Type[]priceScheduleRecordTypesarray of price schedule record types to be included in each create operation or an empty list if none
Returnosid.ordering.batch.PriceBatchFormListthe price schedule forms
ErrorsNOT_FOUNDa priceScheduleId is not found
NULL_ARGUMENT priceScheduleId or priceScheduleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreatePrices
Description

Creates a new set of Prices. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.ordering.batch.PriceBatchFormListpriceFormsthe price forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT priceForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPriceFormsForUpdate
Description

Gets the price forms for updating an existing set of prices. A new price form should be requested for each update transaction.

Parametersosid.id.IdListpriceIdsthe Ids of the Prices
Returnosid.ordering.batch.PriceBatchFormListthe price forms
ErrorsNOT_FOUNDa priceId is not found
NULL_ARGUMENT priceIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePrices
Description

Updates existing prices. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.ordering.batch.PriceBatchFormListpriceFormsthe forms containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT priceForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllPrices
Description

Deletes all Prices in this Store .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeletePrices
Description

Deletes prices for the given Ids.

Parametersosid.id.IdListpriceIdsthe Ids of the price to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT priceIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeletePricesForPriceSchedule
Description

Deletes prices for the given price schedule.

Parametersosid.id.IdpriceScheduleIdthe Id ofa price schedule
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT priceScheduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasPrices
Description

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

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.