This article presents the overview of the Order Builder classes and methods that are described in the articles following.
The article in this section assume that:
Order Builder supports many of the calls used in the Zuora SOAP API, and exposes them as "Apex wrapper methods". You can access these methods through the zApi class once you've installed the Zuora 360 managed package in your Salesforce org.
All components of the Zuora 360 managed package are prefixed with the "Zuora" namespace qualifier.
Order Builder supports the following Zuora SOAP API calls:
|Zuora SOAP API Call||Order Builder Apex Method||Description|
|login()||Zuora.zApi.zlogin()||Logs in to the API service|
|create()||Zuora.zApi.zcreate()||Creates one or more objects of a specified type|
|update()||Zuora.zApi.zupdate()||Updates the information in one or more objects of the same type|
|query()||Zuora.zApi.zquery()||Executes a ZOQL query|
|queryMore()||Zuora.zApi.zqueryMore()||Retrieves additional results for a ZOQL query|
|delete()||Zuora.zApi.zdelete()||Deletes one or more objects of the same type|
|subscribe()||Zuora.zApi.zsubscribe()||Creates a subscription and, optionally, related objects such as account, invoice|
|amend()||Zuora.zApi.zamend()||Changes a subscription|
|generate()||Zuora.zApi.zgenerate()||Invoices specified account(s) on demand|
Additional non-API methods and classes are also available. See the articles in this section for more information.
subscribeWithExistingAccount() call is not supported.
The Zuora 360 managed package includes the following global classes that you can use to invoke the Order Builder methods.
The following Exception classes are supported in Order Builder:
The above exeption classes have the following attributes of String type:
The Apex code that you develop using the Order Builder must be tested. Salesforce requires the creation and execution of unit tests to facilitate and promote the development of robust, error-free code. In addition, Salesforce also requires that test methods must provide at least 75% code coverage.
Order Builder requires you to declare your test classes and test methods with the following annotation to grant test classes and individual test methods access to all data in the organization:
For more information, see the Salesforce documentation, An Introduction to Apex Code Test Methods.