c2g.PaymentsPlusServiceglobal with sharing class PaymentsPlusService the service class relating to payments plus. EnumsCheckStatusIndicates the status of the check you want to create.
Methods
addToProposalglobal static List<Id> addToProposal(Id paymentId, List<Id> transactionLineIds) This method adds the selected transactions to the payment proposal. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns a list containing all new log IDs generated during the Add to Proposal process. 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. Id paymentId = 'a2R0O000005ddmY'; List<Id> transactionLineIds = new List<Id>{'a2n0O000000YWVb', 'a2n0O000000YWVg'}; List<Id> logIds = c2g.PaymentsPlusService.addToProposal(paymentId, transactionLineIds); addToProposalglobal static List<Id> addToProposal(Id paymentId, List<c2g.PaymentsPlusService.ProposalLine> proposalLines) This method adds part payment transactions to the payment proposal. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns a list containing all new log IDs generated during the Add to Proposal process. 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. Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.ProposalLine proposalLine = new c2g.PaymentsPlusService.ProposalLine(); proposalLine.TransactionLineItemId = 'a2n0O000000YWVb'; proposalLine.PaymentValue = -45; List<c2g.PaymentsPlusService.ProposalLine> proposalLines = new List<c2g.PaymentsPlusService.ProposalLine>{proposalLine}; List<Id> logIds = c2g.PaymentsPlusService.addToProposal(paymentId, proposalLines); removeFromProposalglobal static List<Id> removeFromProposal(Id paymentId, List<Id> transactionLineIds) This method removes the selected transactions from the payment proposal. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns a list containing all new Log IDs generated during the Remove from Proposal process. 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. Id paymentId = 'a2R0O000005ddmY'; List<Id> transactionLineIds = new List<Id>{'a2n0O000000YWVb', 'a2n0O000000YWVg'}; List<Id> logIds = c2g.PaymentsPlusService.removeFromProposal(paymentId, transactionLineIds); createMediaDataglobal static Id createMediaData(Id paymentId) This method generates the payment information needed for bank files or to print checks. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns the ID of the payment media control related to the selected payment Id. 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. Id paymentId = 'a2R0O000005ddmY'; Id paymentMediaControlId = c2g.PaymentsPlusService.createMediaData(paymentId); createMediaDataAsyncglobal static Id createMediaDataAsync(Id paymentId) This method generates the payment information needed for bank files or to print checks. It runs in the background and you will be notified when it finishes. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; Id batchProcessId = c2g.PaymentsPlusService.createMediaDataAsync(paymentId); updateCheckNumbersglobal static void updateCheckNumbers(Id paymentId, List<c2g.PaymentsPlusService.Check> checks) This method updates the check numbers associated with the selected payment. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service does not return a value. 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. // Check per account Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.Check check1 = new c2g.PaymentsPlusService.Check(); check1.AccountId = '0010O00001qWdCD'; check1.CheckNumber = 1; check1.Status = c2g.PaymentsPlusService.CheckStatus.StatusValid; c2g.PaymentsPlusService.Check check2 = new c2g.PaymentsPlusService.Check(); check2.CheckNumber = 2; check2.Status = c2g.PaymentsPlusService.CheckStatus.StatusManual; c2g.PaymentsPlusService.Check check3 = new c2g.PaymentsPlusService.Check(); check3.CheckNumber = 3; check3.Status = c2g.PaymentsPlusService.CheckStatus.StatusVoid; List<c2g.PaymentsPlusService.Check> checks = new List<c2g.PaymentsPlusService.Check>{check1, check2, check3}; c2g.PaymentsPlusService.updateCheckNumbers(paymentId, checks); // Select invoice for separate payment Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.Check check1 = new c2g.PaymentsPlusService.Check(); check1.TransactionLineItemId = 'a5K2D000000O03DUAS'; check1.CheckNumber = 1; check1.Status = c2g.PaymentsPlusService.CheckStatus.StatusValid; c2g.PaymentsPlusService.Check check2 = new c2g.PaymentsPlusService.Check(); check2.CheckNumber = 2; check2.Status = c2g.PaymentsPlusService.CheckStatus.StatusManual; c2g.PaymentsPlusService.Check check3 = new c2g.PaymentsPlusService.Check(); check3.CheckNumber = 3; check3.Status = c2g.PaymentsPlusService.CheckStatus.StatusVoid; List<c2g.PaymentsPlusService.Check> checks = new List<c2g.PaymentsPlusService.Check>{check1, check2, check3}; c2g.PaymentsPlusService.updateCheckNumbers(paymentId, checks); postAndMatchAsyncglobal static Id postAndMatchAsync(Id paymentId) This method does the post and match for the given payment proposal. It runs in the background and you will be notified when it finishes. Use the PostandMatchPayments (Post and Match Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job or null if running off platform. 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. Id paymentId = 'a2R0O000005ddmY'; Id batchProcessId = c2g.PaymentsPlusService.postAndMatchAsync(paymentId); discardAsyncglobal static Id discardAsync(Id paymentId) This method performs the discard for the selected payment proposal. It runs in the background and you will be notified when it finishes. Use the DiscardPayments (Discard Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; Id batchProcessId = c2g.PaymentsPlusService.discardAsync(paymentId); removeAccountsAsyncglobal static Id removeAccountsAsync(Id paymentId, List<Id> accountIds, String removeAccountsReason) This method removes the selected accounts from the selected payment proposal. This method only applies to electronic payments. It runs in the background and you will be notified when it finishes. Use the ManagePayments (Manage Payments) custom permission to grant permissions on this method. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; List<Id> accountIds = new List<Id>{'0011I000008Pt2G', '0011I000008Pt27', '0011I000008Pt26'}; String removeAccountsReason = 'Reason'; Id batchProcessId = c2g.PaymentsPlusService.removeAccountsAsync(paymentId, accountIds, removeAccountsReason); cancelPaymentAsyncglobal static Id cancelPaymentAsync(Id paymentId, c2g.PaymentsPlusService.CancelPaymentCriteria cancelCriteria) This method cancels all the available accounts from a payment proposal using the selected criteria. Use the CancelPayments (Cancel Payments) custom permission to cancel all payments proposals. It runs in the background and you will be notified when it finishes. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.CancelPaymentCriteria cancelPaymentCriteria = new c2g.PaymentsPlusService.CancelPaymentCriteria(); cancelPaymentCriteria.CancelReason = 'Cancel reason'; cancelPaymentCriteria.PaymentRefundDate = System.today(); cancelPaymentCriteria.PaymentRefundPeriod = 'a2S0O00000IKas0'; cancelPaymentCriteria.UndoMatchDate = System.today(); cancelPaymentCriteria.UndoMatchPeriod = 'a2S0O00000IKas0'; Id batchProcessId = c2g.PaymentsPlusService.cancelPaymentAsync(paymentId, cancelPaymentCriteria); cancelPaymentAsyncglobal static Id cancelPaymentAsync(Id paymentId, c2g.PaymentsPlusService.CancelPaymentCriteria cancelCriteria, List<Id> entityIds) This method cancels a list of accounts or payable invoices from a payment proposal using the selected criteria. Use the CancelPayments (Cancel Payments) custom permission to cancel all payments proposals. It runs in the background and you will be notified when it finishes. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.CancelPaymentCriteria cancelPaymentCriteria = new c2g.PaymentsPlusService.CancelPaymentCriteria(); cancelPaymentCriteria.CancelReason = 'Cancel reason'; cancelPaymentCriteria.PaymentRefundDate = System.today(); cancelPaymentCriteria.PaymentRefundPeriod = 'a2S0O00000IKas0'; cancelPaymentCriteria.UndoMatchDate = System.today(); cancelPaymentCriteria.UndoMatchPeriod = 'a2S0O00000IKas0'; List<Id> accountIds = new List<Id>{'0010O00001qWdC3', '0010O00001qWdC6'}; Id batchProcessId = c2g.PaymentsPlusService.cancelPaymentAsync(paymentId, cancelPaymentCriteria, accountIds); 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. Id paymentId = 'a2R0O000005ddmY'; c2g.PaymentsPlusService.CancelPaymentCriteria cancelPaymentCriteria = new c2g.PaymentsPlusService.CancelPaymentCriteria(); cancelPaymentCriteria.CancelReason = 'Cancel reason'; cancelPaymentCriteria.PaymentRefundDate = System.today(); cancelPaymentCriteria.PaymentRefundPeriod = 'a2S0O00000IKas0'; cancelPaymentCriteria.UndoMatchDate = System.today(); cancelPaymentCriteria.UndoMatchPeriod = 'a2S0O00000IKas0'; List<Id> tliIds = new List<Id>{'a5O1F000000Lr7SUAS', 'a5O1F000000Lr7UUAS'}; Id batchProcessId = c2g.PaymentsPlusService.cancelPaymentAsync(paymentId, cancelPaymentCriteria, tliIds); resubmitCancelPaymentAsyncglobal static Id resubmitCancelPaymentAsync(Id paymentId) This method resubmits the cancel process to cancel all remaining accounts from a previously canceled payment proposal. Use the CancelPayments (Cancel Payments) custom permission to resubmit all payments proposals to cancel. It runs in the background and you will be notified when it finishes. Input Parameters
Return ValueThis service returns the ID of the batch process record for the job. 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. Id paymentId = 'a2R0O000005ddmY'; Id batchProcessId = c2g.PaymentsPlusService.resubmitCancelPaymentAsync(paymentId); c2g.PaymentsPlusService.Checkglobal virtual class Check implements Comparable holds the information needed to create checks through the updatechecknumbers api. 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. // Check per account c2g.PaymentsPlusService.Check check = new c2g.PaymentsPlusService.Check(); check.AccountId = '0010O00001qWdCD'; check.CheckNumber = 42; check.Status = c2g.PaymentsPlusService.CheckStatus.StatusValid; // Select invoice for separate payment c2g.PaymentsPlusService.Check check = new c2g.PaymentsPlusService.Check(); check.TransactionLineItemId = 'a5K2D000000O03DUAS'; check.CheckNumber = 42; check.Status = c2g.PaymentsPlusService.CheckStatus.StatusValid; Properties
MethodsCheckglobal Check() Holds the API representation of a check. Return ValueThis constructor does not return a value. c2g.PaymentsPlusService.CancelPaymentCriteriaglobal class CancelPaymentCriteria holds the canceling information needed to perform a cancel payment operation. 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. c2g.PaymentsPlusService.CancelPaymentCriteria cancelPaymentCriteria = new c2g.PaymentsPlusService.CancelPaymentCriteria(); cancelPaymentCriteria.CancelReason = 'Cancel reason'; cancelPaymentCriteria.PaymentRefundDate = System.today(); cancelPaymentCriteria.PaymentRefundPeriod = 'a2S0O00000IKas0'; cancelPaymentCriteria.UndoMatchDate = System.today(); cancelPaymentCriteria.UndoMatchPeriod = 'a2S0O00000IKas0'; Properties
MethodsCancelPaymentCriteriaglobal CancelPaymentCriteria() Holds the criteria used for the Cancel Payment operation. Return ValueThis constructor does not return a value. c2g.PaymentsPlusService.ProposalLineglobal class ProposalLine Batch Control Log Message field Properties
MethodsProposalLineglobal ProposalLine() Holds the API representation of the transaction line to be added to the payment proposal. Return ValueThis constructor does not return a value. |