ffbc.BillingDocumentsServiceglobal with sharing class BillingDocumentsService This class provides service functionality for billing documents. This class contains deprecated items. EnumsStatusAn enum that represents the valid statuses of billing documents.
TypeAn enum that represents the valid types of billing documents.
Methods
completeglobal static List<ffbc.BillingDocumentsService.CompleteResponse> complete(Set<Id> billingDocumentIds) Completes the supplied billing documents by changing their status to Complete and updating the billed data in related contract line items. Input Parameters
Return ValueList of results for each billing document provided. completeAsyncglobal static Id completeAsync(Set<Id> billingDocumentIds) Completes the supplied billing documents asynchronously. After completion, a separate asynchronous job is created to update the billing data of contract line items associated with the billing documents that were successfully completed. Input Parameters
Return ValueThe ID of the asynchronous process that will complete the billing documents. convertInvoiceToCreditNoteglobal static ffbc.BillingDocumentsService.CreditingResponse convertInvoiceToCreditNote(ffbc.BillingDocumentsService.CreditingRequest request) Converts the supplied billing documents to credit notes. Only Complete invoices can be converted. An error message is returned for each billing document that could not be converted. Once a billing document is converted, the Billing Document Line Item field on related billing schedules is cleared if the option to allow further billing for that invoice was selected. Input Parameters
Exceptions Thrown
Return ValueObject containing information about the Convert Invoice to Credit Note process including the credit notes created and the errors that occurred. convertInvoiceToCreditNoteAsyncglobal static Id convertInvoiceToCreditNoteAsync(ffbc.BillingDocumentsService.CreditingRequest request) Converts the supplied billing documents to credit notes by copying all the data asynchonously. Only Complete invoices can be converted. An error message is returned for each billing document that could not be converted. Once a billing document is converted, the Billing Document Line Item field on related billing schedules is cleared if the option to allow further billing for that invoice was selected. Input Parameters
Return ValueThe ID of the asynchronous process that is to convert the billing documents. deleteBillingDocumentsglobal static void deleteBillingDocuments(Set<Id> billingDocumentIds) Deletes the billing documents with the IDs provided. Input Parameters
discardglobal static ffbc.BillingDocumentsService.DiscardResponse discard(Set<Id> billingDocumentIds) Discards the billing documents supplied by changing their Document Status to Discarded. The related billing schedules are deleted or their link to the billing document is removed. In addition, the related billing document line items are deleted. Input Parameters
Return ValueResponse containing the IDs of discarded Billing Documents and the errors that occurred. discardAsyncglobal static Id discardAsync(Set<Id> billingDocumentIds) Discards the billing documents supplied by changing their Document Status to Discarded. The related billing schedules are deleted or their link to the billing document is removed. In addition, the related billing document line items are deleted. These actions are carried out by an asynchronous process. Input Parameters
Return ValueThe ID of the asynchronous process that is to discard the billing documents. global static Messaging.SendEmailResult email(Id billingDocumentId, Id billingContactId) Sends the billing document to the billing contact by email using the Messaging.sendEmail method and updates the Date Issued field of the billing document if successful. This method can be called a maximum number of ten times in a single execution context. Input Parameters
Exceptions Thrown
Return ValueThe response from the email service. See Messaging.SendEmailResult for more details. getAdditionalFieldMetadataglobal static List<ffbc.FieldMetadata> getAdditionalFieldMetadata() Retrieves metadata for additional billing document and billing document line item fields that are visible when viewing, creating and editing a billing document. Return ValueObject containing basic field information for the additional fields. getTaxglobal static ffbc.BillingDocumentsService.GetTaxResponse getTax(ffbc.BillingDocumentsService.GetTaxRequest request) Calculates tax for the documents provided and returns the calculated tax data. Input Parameters
Exceptions Thrown
Return ValueA response containing results of calculating tax for each document. getTotalsglobal static List<ffbc.BillingDocumentsService.Total> getTotals(Set<Id> billingDocumentIds) Returns a list of totals for the billing documents supplied. Input Parameters
Return ValueList of Totals that contains the billing document ID and its calculated totals. loadglobal static List<ffbc.BillingDocumentsService.BillingDocument> load(Set<Id> billingDocumentIds) Retrieves the billing documents from the IDs provided and returns a wrapper for each billing document. The additional fields to be shown on the enhanced Billing Document page are retrieved. Input Parameters
Return ValueThe wrappers for the billing documents. saveglobal static Set<Id> save(List<ffbc.BillingDocumentsService.BillingDocument> documentsToSave) Saves new or existing billing documents and billing document line items. Billing document line items that belong to the billing documents provided but are not included in the wrapper objects provided are deleted. Input Parameters
Exceptions Thrown
Return ValueThe set of IDs of billing documents that have been saved. updateBilledDataOnRelatedContractLinesglobal static void updateBilledDataOnRelatedContractLines(Set<Id> billingDocumentIds) Updates the total billed value on the related contract line items. You can use this method to update the Total Billed and Billed To fields of related contract line items for complete billing documents. Billing documents are ignored if they are already complete and the billed data in related contract line items is up to date. Input Parameters
validateForCompleteglobal static ffbc.BillingDocumentsService.ValidateCompleteResponse validateForComplete(ffbc.BillingDocumentsService.ValidateCompleteRequest request) Validates that the billing documents supplied can be completed. Input Parameters
Return ValueObject containing information about the Validate for Complete process including valid billing documents and the errors that occurred. DeprecatedThe following items are deprecated and not supported for use. We recommend that you stop using these items to avoid exceptions. Properties
Methods
completeAndUpdateBilledDataDeprecated: The functionality of this service has been moved into the complete service. global static List<ffbc.BillingDocumentsService.CompleteResponse> completeAndUpdateBilledData(Set<Id> billingDocumentIds) Completes the supplied billing documents by changing their status to Complete and updating the billed data in related contract line items. Input Parameters
Return ValueList of results for each billing document provided. convertInvoiceToCreditNoteAndUpdateBilledDataDeprecated: This method has been deprecated, use the convertInvoiceToCreditNote instead. global static ffbc.BillingDocumentsService.CreditingResponse convertInvoiceToCreditNoteAndUpdateBilledData(ffbc.BillingDocumentsService.CreditingRequest request) Converts the supplied billing documents to credit notes by copying all the data. Only Complete invoices can be converted. An error message is returned for each billing document that could not be converted. Once a billing document is converted, the Billing Document Line Item field on related schedules is cleared if the option to allow further billing for that invoice was selected. In addition, an asynchronous process is started to update the billed data in related contract line items. Input Parameters
Exceptions Thrown
Return ValueObject containing information about the Convert Invoice to Credit Note process including the credit notes created and the errors that occurred. ffbc.BillingDocumentsService.BillingDocumentglobal with sharing class BillingDocument This models a billing document, including fields that are relevant to creating, viewing and editing. This class is marked as serializable and deserializable to work around an issue in enforcing JsonAccess for Visualforce remoting requests. Warning: Do not rely on any behavior available via serializing as or deserializing from JSON that is not part of the global API because it might be subject to change. Properties
Methodsffbc.BillingDocumentsService.BillingDocumentLineItemglobal with sharing class BillingDocumentLineItem This models a billing document line item, including fields that are relevant to creating, viewing and editing. This class is marked as serializable and deserializable to work around an issue in enforcing JsonAccess for Visualforce remoting requests. Warning: Do not rely on any behavior available via serializing as or deserializing from JSON that is not part of the global API because it might be subject to change. Properties
MethodsBillingDocumentLineItemglobal BillingDocumentLineItem() The default constructor for a billing document line item object. ffbc.BillingDocumentsService.CompleteResponseglobal with sharing class CompleteResponse This class wraps a response for a request to complete a billing document. Properties
ffbc.BillingDocumentsService.CreditingRequestglobal with sharing class CreditingRequest This class provides the parameters for converting invoices to credit notes. Methods
addBillingDocumentglobal void addBillingDocument(Id billDocId, Boolean allowConvertedInvoiceToBeRebilled) Adds a billing document to be processed. Input Parameters
addCreditingRequestItemglobal void addCreditingRequestItem(ffbc.BillingDocumentsService.CreditingRequestItem document) Adds a billing document to be processed. This method supports changing the values of custom fields on the credit note. Input Parameters
ffbc.BillingDocumentsService.CreditingRequestItemglobal with sharing class CreditingRequestItem This class contains the information required to credit one billing document. Properties
Methods
CreditingRequestItemglobal CreditingRequestItem(Id DocumentId, Boolean AllowRebilling) The constructor for a CreditingRequestItem object. addFieldOverridesglobal void addFieldOverrides(List<ffbc.CustomFieldsService.Field> fieldOverrides) Adds a list of custom fields to the crediting request item. Input Parameters
ffbc.BillingDocumentsService.CreditingResponseglobal with sharing class CreditingResponse extends Response This class is returned by methods which convert invoices to credit notes. You can use this class to discover if there were any errors when converting invoice billing documents to credit notes and to get a list of the IDs of documents that were converted to a credit note. This class extends ffbc.Response Properties
ffbc.BillingDocumentsService.DiscardResponseglobal with sharing class DiscardResponse extends Response This class is returned by the discard method. You can use this class to discover if there were any errors when discarding billing documents, and to get a list of the IDs of the billing documents that were discarded. This class extends ffbc.Response Properties
ffbc.BillingDocumentsService.GetTaxRequestglobal with sharing class GetTaxRequest Contains the parameters required for calculating tax on multiple documents. Properties
Methodsffbc.BillingDocumentsService.GetTaxResponseglobal with sharing class GetTaxResponse The response returned when calculating tax on a document. Properties
ffbc.BillingDocumentsService.GetTaxResultglobal with sharing class GetTaxResult A result from the tax calculation process for a taxable document. This class is marked as serializable and deserializable to work around an issue in enforcing JsonAccess for Visualforce remoting requests. Warning: Do not rely on any behavior available via serializing as or deserializing from JSON that is not part of the global API because it might be subject to change. Properties
ffbc.BillingDocumentsService.GetTaxLineResultglobal with sharing class GetTaxLineResult Contains the calculated tax codes, rates, and values for a document line. This class is marked as serializable and deserializable to work around an issue in enforcing JsonAccess for Visualforce remoting requests. Warning: Do not rely on any behavior available via serializing as or deserializing from JSON that is not part of the global API because it might be subject to change. Properties
ffbc.BillingDocumentsService.TaxDocumentglobal with sharing class TaxDocument A document for which you can calculate tax. Properties
Methodsffbc.BillingDocumentsService.TaxDocumentLineglobal with sharing class TaxDocumentLine A line on a taxable document. Properties
Methodsffbc.BillingDocumentsService.Totalglobal with sharing class Total This class contains the totals for the billing document. Properties
ffbc.BillingDocumentsService.ValidateCompleteRequestglobal with sharing class ValidateCompleteRequest This class wraps a request to validate the completion of billing documents. Properties
MethodsValidateCompleteRequestglobal ValidateCompleteRequest() The default constructor for a ValidateCompleteRequest object. ffbc.BillingDocumentsService.ValidateCompleteResponseglobal with sharing class ValidateCompleteResponse extends Response This class wraps a response for a request to validate the completion of a billing document. This class extends ffbc.Response Properties
|