GlobalRestHelper Class

Knowledge Center > Zuora CPQ > Zuora CPQ Development Resources > Order Builder > Order Builder Reference > GlobalRestHelper Class

GlobalRestHelper Class

This article describes the GlobalRestHelper class. This class provides methods to facilitate making REST calls to Zuora using the configuration in 360. 

GlobalRestHelper Methods

The GlobalRestHelper class includes the following methods.

Method Signature Description
global String getServerUrl() Returns a String of the endpoint URL configured in 360.
global static zApi.HttpCalloutMockImplementation mockRestHelper() Returns a zApi.HttpCalloutMockImplementation and mocks out  the sendRequest(). This method allows the exposed REST methods to be mocked out for testing purposes. You can set the body of the zApi.HttpCalloutMockImplementation to get a mocked out response.

Sample Code

zApi.getMockResponseInstance().setMockRestResponseBody(MOCK_RESPONSE.replace('{zuoraId}', TEST_ZUORA_ID + '0'));
Last modified

Tags

Classifications

(not set)