Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

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

idType

ID of the payment method type.

Signature

public commercepayments.PaymentMethodIdType idType {get; set;}

Property Value

Type: commercepayments.PaymentMethodIdType

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