Billing Central API Developer Reference

ffbc.ContractsService

global with sharing class ContractsService

This class provides service functionality for Billing Central contracts.

Enums

Status

An enum that represents the valid options for the status of contracts.

Value Description
Draft Option to set the status of the contract to Draft.
Active Option to set the status of the contract to Active.
Superseded Option to set the status of the contract to Superseded.
Expired Option to set the status of the contract to Expired.

Type

An enum that represents the valid options for the contract type.

Value Description
Contract Option that shows the object represented is a Contract.
ChangeRequest Option that shows the object represented is a Change Request.
Renewal Option that shows the object represented is a Renewal.

RenewalLineDurationOption

An enum that represents the valid options for the duration of line items when creating a renewal.

Value Description
KeepSame Option to keep the same duration for the line item in the renewed contract.
ExtendToMatchContractDuration Option to extend the duration for the line item in the renewed contract to the same duration as the contract.

Methods

activate

global static void activate(ffbc.ContractsService.ActivationRequest request)

Activates the contracts provided by changing their status to Active and starting an asynchronous process to create the first billing schedules for them.

Input Parameters

Name Type Description
request ffbc.ContractsService.ActivationRequest Wrapper containing the contracts to be activated and the criteria for which to create billing schedules.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the number of months for which to generate schedules is negative or is greater than the maximum allowed.

load

global static List<ffbc.ContractsService.Contract> load(Set<Id> contractIds)

Returns all contracts and contract line items based on the Ids of the contract.

Input Parameters

Name Type Description
contractIds Set<Id> Set of contract Ids for which to return contract and contract line item information.

Return Value

A list of contracts and their corresponding line items. The line items for a contract will be ordered by their Contract Line Item Number.

save

global static Set<Id> save(List<ffbc.ContractsService.Contract> contractsToSave)

Converts the Contract objects provided into Contract__c SObjects and then inserts or updates them as necessary. This method cannot be used to insert change requests. To insert a change request call saveNewChangeRequest.

Input Parameters

Name Type Description
contractsToSave List<ffbc.ContractsService.Contract> The Contract objects to convert and save.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if any of the records have invalid data.
BillingCentralException An exception is thrown if this method is used to insert a change request.

Return Value

The set of Ids of the inserted/updated Contract__c objects.

deleteContracts

global static void deleteContracts(Set<Id> contractsToDelete)

Deletes the contracts with the IDs provided.

Input Parameters

Name Type Description
contractsToDelete Set<Id> The IDs of the Contracts to delete.

calculateTotalValues

This method has been deprecated and always throws an exception to indicate that it cannot be invoked.

global static ffbc.Response calculateTotalValues(Set<Id> contractsToCalculateTotalValue)

Input Parameters

Name Type Description
contractsToCalculateTotalValue Set<Id> The IDs of the Contracts to be processed.

Exceptions Thrown

Value Description
An exception to inform that the method has been deprecated

Return Value

Null.

calculateFields

global static ffbc.ContractsService.CalculateFieldsResponse calculateFields(ffbc.ContractsService.CalculateFieldsRequest calculateRequest)

Calculates the projected value and totals for the specified contracts over their lifetime. The total value fields of the contracts are updated. To achieve this, the SalesPriceOverride__c field is calculated to ensure that the Monthly Recurring Revenue and Annual Recurring Revenue values are correct.

Input Parameters

Name Type Description
calculateRequest ffbc.ContractsService.CalculateFieldsRequest The request containing the Contracts to be processed.

Return Value

A CalculateFieldsResponse containing the errors that occurred for each contract.

getContractSummariesForAccount

global static List<ffbc.ContractsService.ContractSummary> getContractSummariesForAccount(Set<Id> accountIds)

Retrieves the contracts associated with the account using the account IDs provided and returns summary wrappers for them.

Input Parameters

Name Type Description
accountIds Set<Id> The IDs of the accounts on which to filter.

Return Value

A list of wrappers of the contract summary information for each contract retrieved.

getContractSummariesForBillingDocumentRelation

global static List<ffbc.ContractsService.ContractSummary> getContractSummariesForBillingDocumentRelation(ffbc.ContractsService.ContractSummaryRequest request)

Retrieves summaries of contracts that can be associated with billing documents. This only includes contracts with the status Draft, Active or Expired.

Input Parameters

Name Type Description
request ffbc.ContractsService.ContractSummaryRequest The object containing the parameters for which to retrieve contracts.

Return Value

A list of summaries for the contracts.

createChangeRequest

global static Id createChangeRequest(Id contractId)

Creates a change request for the contract ID provided. This creates the change request and returns its ID. All values of custom fields on the active contract are copied to the change request. When a change request is created from a contract, pricing structures on the active contract line items are copied and the copies are applied to the change request line items. Pricing structures on active contract line items are unaffected by changes made to pricing structures on change request line items.

Input Parameters

Name Type Description
contractId Id The ID of the contract for which to create a change request.

Return Value

The ID of the change request record created.

createChangeRequestObject

global static ffbc.ContractsService.Contract createChangeRequestObject(Id contractId)

Creates a change request for the contract provided. This copies the contract and returns a populated ffbc.ContractsService.Contract DTO that represents the new change request. This does not insert the new record into the database. The ID properties of the returned contract and its lines are null. When a change request is created from a contract, pricing structures on the active contract line items are copied and the copies are applied to the change request line items. Pricing structures on active contract line items are unaffected by changes made to pricing structures on change request line items.

Input Parameters

Name Type Description
contractId Id The ID of the contract for which to create a change request.

Return Value

The ContractsService.Contract DTO for the change request created.

saveNewChangeRequest

global static Id saveNewChangeRequest(ffbc.ContractsService.Contract changeRequest)

Saves a new change request to the database. All custom fields that are not included in the object provided are copied from the existing active contract to which the new change request relates.

Input Parameters

Name Type Description
changeRequest ffbc.ContractsService.Contract The change request object to be saved.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the contract provided is not of type ChangeRequest or it already has an ID.

Return Value

ID of the inserted Contract__c object for the change request.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

/**
 * Example of creating a Change Request, where the change is adding a new line to the Contract.
 * Variables marked by asterisks need to be queried from your organisation's data.
 */

ContractsService.Contract changeRequest = ContractsService.createChangeRequestObject(*contractId*);

//Lines on a Change Request must always be ready for billing, so Billing Term, Billing Type and First Bill Date must be set.
//If the EndDate is not specified then it will be copied from the header.
ContractsService.ContractLineItem newLineItem = new ContractsService.ContractLineItem();
newLineItem.ProductService = *productId*;
newLineItem.BillingTerm = *billingTermId*;
newLineItem.StartDate = System.today();
newLineItem.FirstBillDate = System.today();
newLineItem.UnitPrice = 50;
newLineItem.Quantity = 1;
newLineItem.BillingType = BillingService.BillingType.RecurringFixed;
changeRequest.addLineItem(newLineItem);

ContractsService.saveNewChangeRequest(changeRequest);

applyChangeRequests

global static ffbc.ContractsService.ApplyChangeRequestsResponse applyChangeRequests(ffbc.ContractsService.ApplyChangeRequestsRequest request)

Applies each change request specified in the request object to the active contract to which it belongs. This also generates billing schedules for the number of months specifed in the request.

Input Parameters

Name Type Description
request ffbc.ContractsService.ApplyChangeRequestsRequest Wrapper containing the change request to be applied and the criteria for generating billing schedules.

Return Value

The Response object containing errors that occurred or the active contract IDs of the change requests that were applied.

createRenewalsWithNoPriceChange

global static ffbc.ContractsService.CreateRenewalResponse createRenewalsWithNoPriceChange(ffbc.ContractsService.CreateRenewalRequest request)

Creates renewals for the contract IDs provided without pricing changes. This creates renewals and returns their IDs. All values of custom fields on the active contracts are copied to the renewals.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.

Return Value

The Response object containing errors that occurred and the IDs of the renewals that were created.

createRenewalsWithPercentageAdjustment

global static ffbc.ContractsService.CreateRenewalResponse createRenewalsWithPercentageAdjustment(ffbc.ContractsService.CreateRenewalWithPercentageAdjustmentRequest request)

Creates renewals for the contract IDs provided with pricing changes based on the percentage adjustment. This creates renewals and returns their IDs. All values of custom fields on the active contracts are copied to the renewals.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalWithPercentageAdjustmentRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.
- A decimal that determines how much the value of all unit prices is to be increased or decreased by.

Return Value

The Response object containing errors that occurred and the IDs of the renewals that were created.

createRenewalsFromPricebook

global static ffbc.ContractsService.CreateRenewalResponse createRenewalsFromPricebook(ffbc.ContractsService.CreateRenewalWithPricebookRequest request)

Creates renewals for the contract IDs provided with pricing changes from the price book provided. This creates renewals and returns their IDs. All values of custom fields on the active contracts are copied to the renewals.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalWithPricebookRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.
- The ID of the price book from which to get the unit prices to be applied to the renewal.

Return Value

The Response object containing errors that occurred and the IDs of the renewals that were created.

createRenewalsWithNoPriceChangeAsync

global static Id createRenewalsWithNoPriceChangeAsync(ffbc.ContractsService.CreateRenewalRequest request)

Creates renewals for the contract IDs provided using a batch or queueable background process. This creates the renewals without pricing changes and returns the ID of the batch or queueable process used. All values of custom fields on the active contracts are copied to the renewals. The start, end and first bill dates are set depending on the RenewalLineDurationOption value.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.

Return Value

The ID of the asynchronous process that is to create the renewals.

createRenewalsWithPercentageAdjustmentAsync

global static Id createRenewalsWithPercentageAdjustmentAsync(ffbc.ContractsService.CreateRenewalWithPercentageAdjustmentRequest request)

Creates renewals for the contract IDs provided using a batch or queueable background process. This creates the renewals with pricing changes based on the percentage adjustment and returns the ID of the batch or queueable process used. All values of custom fields on the active contracts are copied to the renewals. The start, end and first bill dates are set depending on the RenewalLineDurationOption value.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalWithPercentageAdjustmentRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.
- A decimal that determines how much the value of all unit prices is to be increased or decreased by.

Return Value

The ID of the asynchronous process that is to create the renewals.

createRenewalsFromPriceBookAsync

global static Id createRenewalsFromPriceBookAsync(ffbc.ContractsService.CreateRenewalWithPricebookRequest request)

Creates renewals for the contract IDs provided using a batch or queueable background process. This creates the renewals with pricing changes from the price book provided and returns the ID of the batch or queueable process used. All values of custom fields on the active contracts are copied to the renewals. The start, end and first bill dates are set depending on the RenewalLineDurationOption value.

Input Parameters

Name Type Description
request ffbc.ContractsService.CreateRenewalWithPricebookRequest Wrapper class implementation containing:
- The ID of the contract for which to create a renewal.
- A RenewalLineDurationOption that indicates whether to extend the start, end and first bill dates of the renewal.
- The ID of the price book from which to get the unit prices to be applied to the renewal.

Return Value

The ID of the asynchronous process that is to create the renewals.

getAdditionalFieldMetadata

global static List<ffbc.FieldMetadata> getAdditionalFieldMetadata()

Retrieves metadata for additional contract and contract line item fields that are visible when viewing, creating and editing a contract.

Return Value

A list of metadata wrappers for additional fields.

expire

global static ffbc.ContractsService.ExpireResponse expire(ffbc.ContractsService.ExpireRequest request)

Expires active contracts using the contract IDs provided.

Input Parameters

Name Type Description
request ffbc.ContractsService.ExpireRequest Wrapper containing the contract IDs for which to expire active contracts.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown when a valid active contract cannot be expired.

Return Value

An ExpireResponse object containing the errors that occurred and the IDs of the contracts that were expired.

expireAsync

global static Id expireAsync(ffbc.ContractsService.ExpireRequest request)

Expires active contracts for the contract IDs provided using a batch or queueable background process. If no IDs are provided all valid active contracts are expired.

Input Parameters

Name Type Description
request ffbc.ContractsService.ExpireRequest Wrapper containing the contract IDs for which to expire active contracts.

Return Value

The ID of the asynchronous process that is to expire the contracts.

end

global static ffbc.ContractsService.EndingResponse end(Map<Id, ffbc.ContractsService.EndingParameter> endingRequestMap)

Ends active contracts early using the requested new end date, reason for ending the contract and additional notes. An error occurs if the contract is associated with an open change request that has not been rejected or a draft renewal.

Input Parameters

Name Type Description
endingRequestMap Map<Id, ffbc.ContractsService.EndingParameter> Map of Contract IDs to ContractsService.EndingParameter. The ending parameter contains the end date, reason for ending the contract and a note.

Return Value

A response containing the results from the process. The response contains the list of the contracts successfully processed and the errors associated with each Contract ID.

endAndClean

global static ffbc.ContractsService.EndingResponse endAndClean(Map<Id, ffbc.ContractsService.EndingParameter> endingRequestMap)

Ends active contracts using the requested new end date, reason for ending the contract and additional notes. If the contracts are associated with open change requests that have not been rejected or draft renewals, these are automatically deleted.

Input Parameters

Name Type Description
endingRequestMap Map<Id, ffbc.ContractsService.EndingParameter> Map of Contract IDs to ContractsService.EndingParameter. The ending parameter contains the end date, reason for ending the contract and additional notes.

Return Value

A response containing the results from the process. The response contains the list of the contracts successfully processed and the errors associated with each Contract ID.

validateForScheduleGeneration

global static void validateForScheduleGeneration(ffbc.ContractsService.ValidateForScheduleGenerationRequest request)

Checks the contract information provided and determines whether it is valid to generate schedules for that contract.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForScheduleGenerationRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the request contains: A contract type other than Contract. A status other than Active or Expired.

validateForFieldsCalculation

global static void validateForFieldsCalculation(ffbc.ContractsService.ValidateForFieldsCalculationRequest request)

Checks the contract information provided and determines whether it is valid to calculate the total reporting fields of the contract.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForFieldsCalculationRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the request contains: A status other than Draft, Active or Expired.

validateForTotalValueCalculation

This method has been deprecated and always throws an exception to indicate that the new method should be used.

global static void validateForTotalValueCalculation(ffbc.ContractsService.ValidateForTotalValueCalculationRequest request)

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForTotalValueCalculationRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception to inform that the method has been deprecated.

validateForCreatingBillingDocument

global static void validateForCreatingBillingDocument(ffbc.ContractsService.ValidateForCreatingBillingDocumentRequest request)

Checks the contract information provided and determines whether it is valid to create billing documents for that contract.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForCreatingBillingDocumentRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the request contains: A contract type of Change Request. A status other than Active or Expired.

validateForActivation

global static ffbc.Response validateForActivation(ffbc.ContractsService.ValidateForActivationRequest request)

Checks the contracts provided and determines whether they are valid to be activated.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForActivationRequest Wrapper containing the IDs of contracts to be validated.

Return Value

A Response that holds the errors relating to the validated Contracts. Errors are returned if: A contract has a status other than draft. A contract has a type other than Contract. A contract has no related contract lines. Any of the contract line items do not contain a billing type. Any of the contract line items do not contain a billing term. Any of the contract line items do not contain a first bill date.

validateForAddPlan

global static void validateForAddPlan(ffbc.ContractsService.ValidateForAddPlanRequest request)

Checks the contract information provided and determines whether it is valid to add plans to that contract.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForAddPlanRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the request contains a status other than Draft or Active.

validateForEnding

global static void validateForEnding(ffbc.ContractsService.ValidateForEndingRequest request)

Checks the contract information provided and determines whether it is valid to end that contract.

Input Parameters

Name Type Description
request ffbc.ContractsService.ValidateForEndingRequest Wrapper containing the contract information to be validated.

Exceptions Thrown

Value Description
BillingCentralException An exception is thrown if the request contains a status other Active or the type is not Contract.

ffbc.ContractsService.Contract

global class Contract

Represents a Contract SObject including the contract line items and the relevant fields for creating, editing and viewing them.

Properties

Name Type Description
Id Id The ID of the Contract SObject being represented.
Name String The Name of the Contract SObject being represented.
Account Id The Account Id of the Contract SObject being represented.
ApprovalStatus String The Approval Status of the contract change request.
Description String The Description of the Contract SObject being represented.
FirstBillDate Date The First Bill Date of the Contract SObject being represented.
StartDate Date The Start Date of the Contract SObject being represented.
EndDate Date The End Date of the Contract SObject being represented.
RenewalReminder Date The Renewal Reminder of the Contract SObject being represented.
ContractName String The Contract Name of the Contract SObject being represented.
Status ffbc.ContractsService.Status Read only. The Status of the Contract SObject being represented.
CurrencyIsoCode String The CurrencyIsoCode of the Contract SObject being represented.
TotalContractValue Decimal The Total Value of the Contract SObject being represented.
LineItems List<ffbc.ContractsService.ContractLineItem> The Contract Line Items related to the Contract SObject being represented. See ContractLineItem for details of that object.
CompanyId Id The Company ID of the Contract SObject being represented.
ActiveContract Id Read only. The Active Contract ID of the Contract SObject being represented.
PreviousContract Id The Contract ID of the previous version of the Contract.
Type ffbc.ContractsService.Type Read only. The Type of the Contract SObject being represented.
OpenChangeRequest Id Read only. The ID of the open change request for this contract.
OpenRenewal Id Read only. The ID of the current renewal for this contract.
SubmittedForApproval Boolean Read only. Indicates whether the Contract has ever been submitted for approval.
OriginalEndDate Date Read only. The Original End Date of the Contract SObject being represented.
ReasonForEndingContract String Read only. The ReasonForEndingContract of the Contract SObject being represented.
EndContractNotes String Read only. The EndContractNotes of the Contract SObject being represented.
CustomFields List<ffbc.CustomFieldsService.Field> The additional fields to be displayed on the enhanced Contract Detail page. The fields and their order are defined by the field set specified in the 'Enhanced Contract Field Set' setting of the Billing Central Settings custom setting. Read-only fields such as formulas, roll up summaries and system fields, as well as field paths which traverse related objects, are treated as read-only and should not be included in a call to save. When specifying custom fields from packages other than Billing Central, the namespace prefix must be included.
MajorVersion Integer The Major Version of the contract.

Methods

Contract

global Contract()

Constructs an empty Contract of type Contract. The LineItems list is initialised to an empty list.

addLineItem

global ffbc.ContractsService.Contract addLineItem(ffbc.ContractsService.ContractLineItem lineItem)

This method adds a ContractLineItem to the Contract and links that line to that Contract. If the ContractLineItem is null it is not added.

Input Parameters

Name Type Description
lineItem ffbc.ContractsService.ContractLineItem The ContractLineItem to be added the Contract.

Return Value

The Contract with the new contract line item added.

ffbc.ContractsService.ContractLineItem

global class ContractLineItem

Represents a Contract Line Item, including the fields required to create, edit and view contracts.

Properties

Name Type Description
Id Id The ID of the Contract Line Item SObject being represented.
Name String The Name of the Contract Line Item SObject being represented.
BillingTerm Id The Billing Term ID of the Contract Line Item SObject being represented.
BillingType ffbc.BillingService.BillingType The Billing Type of the Contract Line Item SObject being represented.
Description String The Description of the Contract Line Item SObject being represented.
Plan Id The Plan ID of the Contract Line Item SObject being represented.
PlanName String The Plan Name of the Contract Line Item SObject being represented.
ProductService Id The Product ID of the Contract Line Item SObject being represented.
Quantity Decimal The Quantity of the Contract Line Item SObject being represented.
InArrears Boolean The In Arrears status of the Contract Line Item SObject being represented.
SalesPrice Decimal The Sales Price of the Contract Line Item SObject being represented.
FirstBillDate Date The First Bill Date of the Contract Line Item SObject being represented.
StartDate Date The Start Date of the Contract Line Item SObject being represented.
EndDate Date The End Date of the Contract Line Item SObject being represented.
BilledTo Date The Billed To Date of the Contract Line Item SObject being represented.
Contract Id The Contract ID of the Contract Line Item SObject being represented.
UnitOfMeasure Id The Unit of Measure ID of the Contract Line Item SObject being represented.
UnitPrice Decimal The Unit Price of the Contract Line Item SObject being represented.
TotalBilled Decimal The Total Billed value of the Contract Line Item SObject being represented.
ProductName String Read only. The Name of the Product associated with the Contract Line Item SObject being represented.
ActiveLine Id The Active Contract Line Item ID of the Contract Line Item SObject being represented.
PreviousContractLineItem Id The Contract Line Item ID of the previous version of the Contract Line Item.
PricingStructure ffbc.ContractsService.PricingStructure The Pricing Structure of the Contract Line Item SObject being represented.
TotalContractLineValue Decimal The Total Contract Value of the Contract Line Item SObject being represented.
RevenueCategory String The Revenue Category of the Contract Line Item SObject being represented.
SalesPriceOverride Decimal Read only. The SalesPriceOverride of the Contract Line Item SObject being represented.
CustomFields List<ffbc.CustomFieldsService.Field> The additional fields to be displayed on the enhanced Contract Detail page. The fields and their order are defined by the field set specified in the 'Enhanced Contract Line Field Set' setting of the Billing Central Settings custom setting. Read-only fields such as formulas, roll up summaries and system fields, as well as field paths which traverse related objects, are treated as read-only and should not be included in a call to save. When specifying custom fields from packages other than Billing Central, the namespace prefix must be included.

Methods

ContractLineItem

global ContractLineItem()

Constructs an empty ContractLineItem.

ffbc.ContractsService.BillingScheduleGenerationRequest

global abstract class BillingScheduleGenerationRequest

This class cannot be instantiated. It is used as an extension point by other request objects within the ContractsService.

Properties

Name Type Description
MonthsToGenerate Integer The number of future months for which to create billing schedules. If not provided, the default determined by the Billing Schedule Number of Months field of the Billing Central Settings custom setting is used.

ffbc.ContractsService.ActivationRequest

global class ActivationRequest extends BillingScheduleGenerationRequest

This class wraps the criteria to be used when activating contracts.

This class extends ffbc.ContractsService.BillingScheduleGenerationRequest

Properties

Name Type Description
ContractIds Set<Id> A set containing the IDs of all contracts to be activated.

Methods

ActivationRequest

global ActivationRequest()

The default constructor for an ActivationRequest.

ffbc.ContractsService.ApplyChangeRequestsRequest

global class ApplyChangeRequestsRequest extends BillingScheduleGenerationRequest

This class wraps the criteria to be used when applying change requests to contracts.

This class extends ffbc.ContractsService.BillingScheduleGenerationRequest

Properties

Name Type Description
ChangeRequestIds Set<Id> The IDs of the change requests to be applied.

Methods

ApplyChangeRequestsRequest

global ApplyChangeRequestsRequest()

The default constructor for an ApplyChangeRequestsRequest.

ffbc.ContractsService.ApplyChangeRequestsResponse

global class ApplyChangeRequestsResponse extends Response

The response to a request to apply change requests. This contains the errors for the change requests that could not be applied.

This class extends ffbc.Response

ffbc.ContractsService.CreateRenewalBaseRequest

global abstract class CreateRenewalBaseRequest

The base request object used by the createRenewals service. This contains the ContractIds to create renewals for and whether or not to extend the start, end and first bill dates on the renewal created.

Properties

Name Type Description
ContractIds Set<Id> A set containing the IDs of all contracts for which to create renewals.
RenewalLineDurationOption ffbc.ContractsService.RenewalLineDurationOption An enum that determines the options available to extend the start, end and first bill dates when renewing a contract.

ffbc.ContractsService.CreateRenewalRequest

global class CreateRenewalRequest extends CreateRenewalBaseRequest

A request object used by the createRenewals service. This request does not modify unit prices of associated lines and price breaks for the renewal.

This class extends ffbc.ContractsService.CreateRenewalBaseRequest

Methods

CreateRenewalRequest

global CreateRenewalRequest()

The default constructor for a CreateRenewalRequest.

ffbc.ContractsService.CreateRenewalWithPercentageAdjustmentRequest

global class CreateRenewalWithPercentageAdjustmentRequest extends CreateRenewalBaseRequest

A request object used by the createRenewals service. This request modifies unit prices of associated lines and price breaks by a percentage for the renewal.

This class extends ffbc.ContractsService.CreateRenewalBaseRequest

Properties

Name Type Description
PercentageAdjustment Decimal A decimal that determines how much the value of all unit prices is to be increased or decreased by.

Methods

CreateRenewalWithPercentageAdjustmentRequest

global CreateRenewalWithPercentageAdjustmentRequest()

The default constructor for a CreateRenewalWithPercentageAdjustmentRequest.

ffbc.ContractsService.CreateRenewalWithPricebookRequest

global class CreateRenewalWithPricebookRequest extends CreateRenewalBaseRequest

A request object used by the createRenewals service. This request modifies unit prices of associated lines and price breaks from a price book for the renewal.

This class extends ffbc.ContractsService.CreateRenewalBaseRequest

Properties

Name Type Description
PricebookId Id The ID of the price book from which to get the unit prices to be applied to the renewal.

Methods

CreateRenewalWithPricebookRequest

global CreateRenewalWithPricebookRequest()

The default constructor for an CreateRenewalWithPricebookRequest.

ffbc.ContractsService.CreateRenewalResponse

global class CreateRenewalResponse extends Response

The ffbc.Response object used by the createRenewals service. This contains the errors for the renewals that could not be created and a set containing the IDs of all the renewals created. This class cannot be instantiated.

This class extends ffbc.Response

Methods

getRenewalsCreated

global List<Id> getRenewalsCreated()

This method is used to access the list of renewals generated by the create response process.

Return Value

A list of IDs of the renewals created.

ffbc.ContractsService.ExpireRequest

global class ExpireRequest

The request object used by the Expire service. This contains the ContractIds to expire.

Properties

Name Type Description
ContractIds Set<Id> A set containing the ID of each contract to be expired.

Methods

ExpireRequest

global ExpireRequest()

The default constructor for an ExpireRequest.

ffbc.ContractsService.ExpireResponse

global class ExpireResponse extends Response

The ffbc.Response object used by the Expire service. This contains the errors for the contracts that could not be expired and a list containing the IDs of all the expired contracts. This class cannot be instantiated.

This class extends ffbc.Response

Properties

Name Type Description
ExpiredContractIds List<Id> Read Only. A list of IDs of the contracts that were expired.

ffbc.ContractsService.ContractSummary

global class ContractSummary

This class wraps the fields that identify a contract.

Properties

Name Type Description
Id Id Read only. The ID of the Contract.
Name String Read only. The Name (Contract Number) of the Contract.
ContractName String Read only. The Contract Name of the Contract.

ffbc.ContractsService.ContractSummaryRequest

global class ContractSummaryRequest

A request object containing criteria for which to retrieve contracts.

Properties

Name Type Description
AccountIds Set<Id> The account IDs for which to include contract summaries.

Methods

ContractSummaryRequest

global ContractSummaryRequest()

The default constructor for this object.

ffbc.ContractsService.QuantityBreak

global class QuantityBreak

This class models a quantity break.

Properties

Name Type Description
Id Id Read only. The ID of the quantity break.
Quantity Decimal The quantity of the quantity break.
UnitPrice Decimal The unit price of the quantity break.

Methods

QuantityBreak

global QuantityBreak()

The default constructor for this object.

ffbc.ContractsService.PricingStructure

global class PricingStructure

This class models a pricing structure with quantity breaks.

Properties

Name Type Description
Id Id The ID of the pricing structure.
Description String The description of the pricing structure.
QuantityBreaks List<ffbc.ContractsService.QuantityBreak> The quantity breaks related to the pricing structure. The initial list of quantity breaks is ordered by ascending quantity.
PricingType ffbc.PricingStructuresService.Type The type of pricing to be used in billing.
UsageBillingType ffbc.PricingStructuresService.UsageBillingType The usage billing type to be used.

Methods

PricingStructure

global PricingStructure()

The default constructor for this object.

ffbc.ContractsService.ValidateForScheduleGenerationRequest

global class ValidateForScheduleGenerationRequest

A request object for the ValidateForScheduleGeneration method.

Properties

Name Type Description
Status String The status of the contract to be validated.
Type String The type of the contract to be validated.

Methods

ValidateForScheduleGenerationRequest

global ValidateForScheduleGenerationRequest()

The default constructor for this object.

ffbc.ContractsService.ValidateForTotalValueCalculationRequest

global class ValidateForTotalValueCalculationRequest

A request object for the ValidateForTotalValueCalculation method.

Properties

Name Type Description
DEPRECATED: The status of the contract to be validated.
Status
String
DEPRECATED: The end date of the contract to be validated.
EndDate
Date

Methods

ValidateForTotalValueCalculationRequest

The default constructor for this object.

global ValidateForTotalValueCalculationRequest()

ffbc.ContractsService.ValidateForFieldsCalculationRequest

global class ValidateForFieldsCalculationRequest

A request object for the ValidateForFieldsCalculation method.

Properties

Name Type Description
Status String The status of the contract to be validated.

Methods

ValidateForFieldsCalculationRequest

global ValidateForFieldsCalculationRequest()

The default constructor for this object.

ffbc.ContractsService.ValidateForCreatingBillingDocumentRequest

global class ValidateForCreatingBillingDocumentRequest

A request object for the ValidateForCreatingBillingDocument method.

Properties

Name Type Description
Status String The status of the contract to be validated.
Type String The type of the contract to be validated.

Methods

ValidateForCreatingBillingDocumentRequest

global ValidateForCreatingBillingDocumentRequest()

The default constructor for this object.

ffbc.ContractsService.ValidateForActivationRequest

global class ValidateForActivationRequest

A request object for the ValidateForActivation method.

Properties

Name Type Description
ContractIds Set<Id> The IDs of the Contracts to be validated.

Methods

ValidateForActivationRequest

global ValidateForActivationRequest()

The default constructor for this object.

ffbc.ContractsService.ValidateForAddPlanRequest

global class ValidateForAddPlanRequest

A request object for the ValidateForAddPlan method.

Properties

Name Type Description
Status String The status of the contract to be validated.

Methods

ValidateForAddPlanRequest

global ValidateForAddPlanRequest()

The default constructor for this object.

ffbc.ContractsService.ValidateForEndingRequest

global class ValidateForEndingRequest

A request object for the ValidateForEnding method.

Properties

Name Type Description
Status String The status of the contract to be validated.
Type String The type of the contract to be validated.

Methods

ValidateForEndingRequest

global ValidateForEndingRequest()

The default constructor for this object.

ffbc.ContractsService.EndingParameter

global class EndingParameter

This class holds the parameters for the ending a contract early.

Properties

Name Type Description
Reason String The reason for ending the contract.
Notes String Additional notes about the reason for ending the contract early.
NewEndDate Date The new date on which the contract is to end.

Methods

EndingParameter

global EndingParameter()

The default constructor for this object.

ffbc.ContractsService.EndingResponse

global class EndingResponse extends Response

The ffbc.Response object used by the Ending service. This contains the errors for the contracts that could not be ended and a list containing the IDs of all contracts that were ended. This class cannot be instantiated.

This class extends ffbc.Response

Properties

Name Type Description
ContractsEnded List<Id> Read only. The list of contracts that were ended.

ffbc.ContractsService.CalculateFieldsRequest

global class CalculateFieldsRequest

This class holds the parameters to calculate the values of the contract.

Properties

Name Type Description
ContractIds Set<Id> The set of contract ids to calculate for.

Methods

CalculateFieldsRequest

global CalculateFieldsRequest()

The default constructor for this object.

ffbc.ContractsService.CalculateFieldsResponse

global class CalculateFieldsResponse extends Response

The ffbc.Response object used by the Calculate fields service. This contains the errors for the contract fields calculation. This class cannot be instantiated.

This class extends ffbc.Response

Properties

Name Type Description
UpdatedContracts List<Contract__c> The list of contracts that have been updated by the calculation.
UpdatedLineItems List<ContractLineItem__c> The list of contract line items that have been updated by the calculation.