pse.BillingDocumentServiceglobal with sharing class BillingDocumentService Methods
BillingDocumentServiceglobal BillingDocumentService() validateBillingEventsglobal static Map<ID, String> validateBillingEvents(pse.BillingDocumentService.CreateBillingDocumentRequest integrationRequest) Validate billing events for billing document creation. Return any invalid billing events in a map with the relevant error message. Input Parameters
Return ValueThis method returns a map containing the IDs of invalid billing events with their validation error messages. If all the billing events are valid, this method returns an empty map. 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. Set<Id> billingEventIds; //The IDs of the billing events to use BillingDocumentService.CreateBillingDocumentRequest integrationRequest = new BillingDocumentService.CreateBillingDocumentRequest(billingEventIds); Map<Id, String> validationErrors = BillingDocumentService.validateBillingEvents(integrationRequest); createglobal static List<ID> create(pse.BillingDocumentService.CreateBillingDocumentRequest integrationRequest) This method creates billing documents for specified billing events synchronously. Input Parameters
Return ValueThis method returns a List of billing document IDs that were created for the specified billing events. 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. Set<Id> billingEventIds; //The IDs of the eligible billing events to use BillingDocumentService.CreateBillingDocumentRequest integrationRequest = new BillingDocumentService.CreateBillingDocumentRequest(billingEventIds); List<Id> billingDocumentList = BillingDocumentService.create(integrationRequest); createAsyncglobal static Set<ID> createAsync(pse.BillingDocumentService.CreateBillingDocumentRequest integrationRequest) This method creates billing documents for specified billing events asynchronously. Input Parameters
Return ValueThis method returns the IDs of the batch jobs that will create the billing documents. 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. Set<Id> billingEventIds; //The IDs of the eligible billing events to use BillingDocumentService.CreateBillingDocumentRequest integrationRequest = new BillingDocumentService.CreateBillingDocumentRequest(billingEventIds); Set<Id> apexJobIdSet = BillingDocumentService.createAsync(integrationRequest); pse.BillingDocumentService.CreateBillingDocumentRequestglobal inherited sharing class CreateBillingDocumentRequest A structure containing the criteria on which to generate billing documents from billing events. Properties
MethodsCreateBillingDocumentRequestglobal CreateBillingDocumentRequest(Set<ID> BillingEventIds) CreateBillingDocumentRequestglobal CreateBillingDocumentRequest() |