Global API
Introduction
Breadwinner for NetSuite Global API is part of the Breadwinner for NetSuite managed package. A Global class is exposed as an API to allow our Breadwinner for NetSuite customers to make calls to NetSuite via Breadwinner, in addition to the Breadwinner’s functionality.
BreadwinnerNetSuiteAPI Class
BreadwinnerNetSuiteAPI is a global class that can be used to make requests to NetSuite via Breadwinner. As it is a part of the managed package, you must prepend the namespace “breadwinner_ns”
Methods
A method call(Map<String, Object> request) is a static global method within the BreadwinnerNetSuiteAPI class, which can be used to make an API request.
breadwinner_ns.BreadwinnerNetSuiteAPI.call(Map<String, Object> request);
Breadwinner accepts the request data in the form of Map<String, Object>, and even returns the response data as a Map<String, Object>, thus making the requests and responses dynamic.
For more information, please refer to the Sample Requests and Responses section.
Note: This is a synchronous method, it will make http callouts. So, to access “BreadwinnerNetSuiteAPI.Call()” method please enable callouts by annotating the future method, or use Queueable Apex.
eg: @Future(callout=true)