---
schema_version: "1"
id: 4d76e2e065c78c2eb1c1be0142ecc690c33fae0bcdbad9e180069f3a53540015
title: BasePaymentMethodRequest Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_BasePaymentMethodRequest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BasePaymentMethodRequest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5d3f0d67b89a3a01710331b606d0539b166331312c571feac5955fed46d5b6e3
description: Abstract class for storing information about payment methods.Maintains the integrity of lists of type BasePaymentMethodRequest by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.Maintains the integrity of lists of type BasePaymentMethodRequest by determining the uniqueness of the external object records in a list.Converts a date to a string.
---
# BasePaymentMethodRequest Class

Abstract class for storing information about payment methods.

## Namespace

[CommercePayments](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercepayments.htm "Use the CommercePayments namespace to provide a safe and customizable platform for managing customer payments and refunds.")

## Usage

The BasePaymentMethodRequest class contains fields common to [CardPaymentMethodRequest](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_CardPaymentMethodRequest.htm#apex_class_commercepayments_CardPaymentMethodRequest "Sends data related to a card payment method to a gateway adapter during a service call.")

.

- **[BasePaymentMethodRequest Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BasePaymentMethodRequest.htm#apex_commercepayments_BasePaymentMethodRequest_methods)**

## BasePaymentMethodRequest Methods

The following are methods for BasePaymentMethodRequest.

- **[equals(obj)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BasePaymentMethodRequest.htm#apex_commercepayments_BasePaymentMethodRequest_equals)**  
    Maintains the integrity of lists of type BasePaymentMethodRequest by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.
- **[hashCode()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BasePaymentMethodRequest.htm#apex_commercepayments_BasePaymentMethodRequest_hashCode)**  
    Maintains the integrity of lists of type BasePaymentMethodRequest by determining the uniqueness of the external object records in a list.
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_BasePaymentMethodRequest.htm#apex_commercepayments_BasePaymentMethodRequest_toString)**  
    Converts a date to a string.

### equals(obj)

Maintains the integrity of lists of type BasePaymentMethodRequest by determining the equality of external objects in a list. This method is dynamic and 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](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### hashCode()

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

#### Signature

global Integer hashCode()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### toString()

Converts a date to a string.

#### Signature

global String toString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")