Newer Version Available

This content describes an older version of this product. View Latest

BaseApiPaymentMethodRequest Class

Abstract class used to send information about a payment method to a gateway adapter during a service call.

Namespace

CommercePayments

Usage

BaseApiPaymentMethodRequest is the base class for SaleApiPaymentMethodRequest and AuthApiPaymentMethodRequest.

BaseApiPaymentMethodRequest Constructors

The following are constructors for BaseApiPaymentMethodRequest.

BaseApiPaymentMethodRequest(address, id, saveForFuture)

Constructs a payment method. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

Signature

global BaseApiPaymentMethodRequest(commercepayments.AddressRequest address, String id, Boolean saveForFuture)

Parameters

address
Type: commercepayments.AddressRequest
Sends data related on address request to a gateway adapter during a service call.
id
Type: String
saveForFuture
Type: Boolean
Indicates whether Salesforce saves the payment method for future use.

BaseApiPaymentMethodRequest Properties

The following are properties for BaseApiPaymentMethodRequest.

address

The payment method’s address.

Signature

global commercepayments.AddressRequest address {get; set;}

Property Value

Type: AddressRequest

id

ID of the payment method request.

Signature

global String id {get; set;}

Property Value

Type: String

saveForFuture

Indicates whether the payment method is saved as a record in Salesforce for future use.

Signature

global Boolean saveForFuture {get; set;}

Property Value

Type: Boolean

BaseApiPaymentMethodRequest Methods

The following are methods for BaseApiPaymentMethodRequest.

equals(obj)

Maintains the integrity of lists of type BaseApiPaymentMethodRequest by determining the equality of external objects in a list. This method is dynamic and is based on the equals method in Java.

Signature

global Boolean equals(Object obj)

Parameters

obj
Type: Object
External object whose key is to be validated.

Return Value

Type: Boolean

hashCode()

Maintains the integrity of lists of type BaseApiPaymentMethodRequest by determining the uniqueness of the external object records in a list.

Signature

global Integer hashCode()

Return Value

Type: Integer

toString()

Converts a date to a string.

Signature

global String toString()

Return Value

Type: String