ffbc.ProductsService
global with sharing class ProductsService
This class provides service functionality for the Product standard object.
Methods
getSummariesForPriceBook
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
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
|