Foundations Apex API Developer Reference

fferpcore.GatewayService

global with sharing class GatewayService

Service for handling outbound requests to Certinia web services from other Certinia products. The gateway validates whether the request is from a licensed org.

Methods

get

global static fferpcore.GatewayService.Response get(fferpcore.GatewayService.Request request)

This method is used to send a get request to the specified endpoint.

Input Parameters

Name Type Description
request fferpcore.GatewayService.Request An object that specifies the callout to the Certinia web service.

Return Value

The wrapped response from the Certinia web service.

post

global static fferpcore.GatewayService.Response post(fferpcore.GatewayService.Request request)

This method is used to send a post request to the specified endpoint.

Input Parameters

Name Type Description
request fferpcore.GatewayService.Request The request body and endpoint along with authorization information.

Return Value

A response that contains a status code and boolean value.

fferpcore.GatewayService.Request

global with sharing class Request

This class is used to formulate a request that is sent using the post or get methods.

Methods

Request

global Request()

withEndpoint

global fferpcore.GatewayService.Request withEndpoint(String endpoint)

This method is used to set an endpoint value.

Input Parameters

Name Type Description
endpoint String Endpoint of the request.

Return Value

A request object with the endpoint specified.

withBody

global fferpcore.GatewayService.Request withBody(String body)

This method is used to set a body value.

Input Parameters

Name Type Description
body String Body of the request.

Return Value

A request object with the body specified.

withSecret1

global fferpcore.GatewayService.Request withSecret1(String secret1)

This method is used to set a secret value.

Input Parameters

Name Type Description
secret1 String First secret value used for the authentication process.

Return Value

A request object with secret1 specified.

withSecret2

global fferpcore.GatewayService.Request withSecret2(String secret2)

This method is used to set a secret value.

Input Parameters

Name Type Description
secret2 String Second secret value used for the authentication process.

Return Value

A request object with secret2 specified.

fferpcore.GatewayService.Response

global with sharing class Response

This class is used to return the response that is received from the post or get methods.

Properties

Name Type Description
Response HttpResponse
Success Boolean

Methods

Response

global Response(Boolean Success, HttpResponse Response)

This constructor is used to set the values for the response.

Input Parameters

Name Type Description
Success Boolean Boolean to determine whether the request succeeds.
Response HttpResponse The HTTP status code.

Return Value

A request object with Success and Response specified.

© Copyright 2009–2023 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.