Billing Central Apex API Developer Reference

ffbc.OpportunitiesService

global with sharing class OpportunitiesService

This class provides service functionality for the Salesforce opportunity to Billing Central contract integration.

Methods

addPlan

global static ffbc.OpportunitiesService.AddPlanResponse addPlan(ffbc.OpportunitiesService.AddPlanRequest request)

Creates new contract line items from plans.

Input Parameters

Name Type Description
request ffbc.OpportunitiesService.AddPlanRequest A request object containing a map of the Plan IDs to apply to Opportunity IDs.

Return Value

OpportunitiesService.AddPlanResponse An AddPlan response object containing the errors that occurred.

validateForAddPlan

global static ffbc.Response validateForAddPlan(ffbc.OpportunitiesService.ValidateForAddPlanRequest request)

Checks the opportunity information provided and determines whether a plan can be added to the opportunity.

Input Parameters

Name Type Description
request ffbc.OpportunitiesService.ValidateForAddPlanRequest Request object containing the information needed for validation.

Return Value

A Response containing errors that occurred during validation.

ffbc.OpportunitiesService.AddPlanRequest

global with sharing class AddPlanRequest

The request object that is used to provide inputs to the AddPlan service.

Methods

add

global void add(Id opportunityId, Id planId)

Adds a request to add a plan to an opportunity ID. Calling this method several times does not overwrite previous calls. This enables you to:
- Add several plans to an opportunity. For example, calling add(Opp1.Id, Plan1.Id) then add(Opp1.Id, Plan2.Id) adds Plan1 and Plan2 to Opp1.
- Add one plan to several opportunities. For example, calling add(Opp1.Id, Plan1.Id) then add(Opp2.Id, Plan1.Id) adds Plan1 to Opp1 and Opp2.

Input Parameters

Name Type Description
opportunityId Id ID of the opportunity to which the plan is to be added.
planId Id ID of the plan to add.

AddPlanRequest

global AddPlanRequest()

The default constructor for an AddPlanRequest.

ffbc.OpportunitiesService.AddPlanResponse

global with sharing class AddPlanResponse extends Response

The response object returned by the addPlan service. This contains errors for the plans that could not be applied.

This class extends ffbc.Response

Properties

Name Type Description
CreatedLinesByOpportunity Map<Id, List<OpportunityLineItem>> A map containing a key of Opportunity IDs mapped to the opportunity lines created from the plan.

ffbc.OpportunitiesService.ValidateForAddPlanRequest

global with sharing class ValidateForAddPlanRequest

A Request object for the validateForAddPlan method.

Properties

Name Type Description
OpportunityId Id The ID of the opportunity to be validated.

Methods

validateForAddPlanRequest

global validateForAddPlanRequest()

The default constructor for this object.

© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.