ffbc.ProductsService
global with sharing class ProductsService
This class provides service functionality for the Product standard object.
This class contains deprecated items.
Deprecated
The following items are deprecated and not supported for use. We recommend that you stop using these items to avoid exceptions.
Methods
getSummariesForPriceBook
Deprecated: This method has been deprecated. Use a standard Salesforce query instead.
global static List<ffbc.ProductsService.ProductSummary> getSummariesForPriceBook(ffbc.ProductsService.ProductSummaryRequest request)
Queries all active products for their ID, name and pricing information for the price book and currency provided. This may optionally be further filtered using a collection of ffbc__Filter__mdt records - see the documentation on the request for more details.
Input Parameters
Return Value
The list of product summaries.
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /**
* This sample shows an example of using the ffbc.ProductsService.getSummariesForPriceBook method to retrieve
* product summaries as would be shown on the Billing Central Enhanced UIs.
*/
Id pricebookId;
ffbc.ProductsService.ProductSummaryRequest request = new ffbc.ProductsService.ProductSummaryRequest( 'USD' , pricebookId);
request.WithPricingStructures = true ;
request.FilterPurpose = 'Enhanced UI Add Product Drop-Down' ;
return ffbc.ProductsService.getSummariesForPriceBook(request);
|
load
Deprecated: This method has been deprecated. Use a standard Salesforce query instead.
global static List<ffbc.ProductsService.Product> load(Set<Id> productIds)
Queries products with the IDs provided, including fields that are related to Billing Central.
Input Parameters
productIds |
Set<Id> |
The products to query. |
Return Value
The list of products.
ffbc.ProductsService.Product
global with sharing class Product
This class models a product, including fields that are related to creating and editing Billing Central object types.
Properties
Id |
Id |
Read only. The Salesforce Id of the Product SObject being represented.
|
Description |
String |
Read only. The Description of the Product SObject being represented.
|
Name |
String |
Read only. The Name of the Product SObject being represented.
|
BillingType |
ffbc.BillingService.BillingType |
Read only. The Billing Type of the Product SObject being represented.
|
ffbc.ProductsService.ProductSummary
global with sharing class ProductSummary
This class models a product, including the ID, name, unit price, and pricing structure for a specific price book and currency.
Properties
Id |
Id |
Read only. The Salesforce Id of the Product being summarised
|
UnitPrice |
Decimal |
Read only. The Unit Price of the Product being summarised
|
Name |
String |
Read only. The Name of the Product being summarised
|
PricingStructure |
ffbc.ProductsService.PricingStructureSummary |
Read only. A summary of the pricing structure associated with the product by a price book structure entry.
|
ffbc.ProductsService.PricingStructureSummary
global with sharing class PricingStructureSummary
This class is a wrapper for summarised pricing structure information.
Properties
Id |
Id |
Read only. The ID of the Pricing Structure. |
MinimumUnitPrice |
Decimal |
Read only. The minimum unit price of the Pricing Structure's Quantity Breaks. |
MaximumUnitPrice |
Decimal |
Read only. The maximum unit price of the Pricing Structure's Quantity Breaks. |
PricingType |
ffbc.PricingStructuresService.Type |
Read only. The type of pricing to be used in billing. |
ffbc.ProductsService.ProductSummaryRequest
global with sharing class ProductSummaryRequest
This class provides the parameters that determine the product summary information to be retrieved.
Properties
CurrencyIsoCode |
String |
The ISO code of the currency for which the product summary information will be returned. In single currency Salesforce orgs this is ignored.
|
PriceBookId |
Id |
The ID of the price book from which to retrieve the unit price and pricing structure.
|
WithPricingStructures |
Boolean |
The flag that determines whether pricing structure information is retrieved for each product. If false, the pricing structure summaries on the products are null.
|
FilterPurpose |
String |
An optional key that can be used to apply additional filters to the products returned. This will be used to find ffbc__Filter__mdt records for Product2 where the ffbc__Purpose__c fields match the given value. If not specified, no additional filtering will be applied.
|
Methods
|