website logo
Product Overview
NetSuite
Payments
QuickBooks
Xero
Navigate through spaces
⌘K
Guided Wizard
Guided Wizard Settings
Bill Configuration
Custom Guided Wizard
Button URL Structure
Button URL Generator
Support
Global API
API Overview
Request
Response
Code Examples
Technical Resources
Breadwinner Setup
Requirements
ERD / Object Structure
Getting Help
Version History
Docs powered by archbee 

Update

1min

The following is an example of update Payment. The Payment Id (Id) and Customer Id (Id) are required to update the payment (See Payment for the available fields).

Request
Response
|
//  Create a Map to store all the data of a Customer
Map<String, Object> paymentMap = new Map<String, Object>(); 
    paymentMap.put('Id','889');
    paymentMap.put('TotalAmt','200');
    paymentMap.put('CustomerRef' , new Map<String, Object>{'value' => '226'});
	paymentMap.put('SyncToken','0');
	paymentMap.put('PrivateNote','Memo field updated');

//  Initializing the RequestJSON Data to be passed.
Map<String, Object> requestJSONMap = new Map<String, Object>();
    requestJSONMap.put('payments', new List<Object>{paymentMap});
    String reqJSON = JSON.serialize(requestJSONMap);

Map<String, Object> reqObj = new Map<String, Object>();
    reqObj.put('version', '1.0');
    reqObj.put('action', 'updatePayment');
    reqObj.put('requestJSON', reqJSON);
    //Required, if QuickBooks Multi-Org is enabled in Breadwinner. 
    reqObj.put('qbOrgId', '!aa00TM');

//  Placing a request to Breadwinner Global API
Map<String, Object> respMap = breadwinner_qbo.BreadwinnerQBAPI.call(reqObj);
System.debug(respMap);




Updated 02 Jun 2023
Did this page help you?
Yes
No
PREVIOUS
Create
NEXT
Common Data Types
Docs powered by archbee