Newer Version Available

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

SaleApiPaymentMethodRequest Class

Sends data related to a card payment method to a gateway adapter during a sale service call.

Namespace

CommercePayments

Usage

This class holds information about a payment method that was used for a Sale request. SaleApiPaymentMethodRequest contains all the possible payment methods as fields, but only one value is populated for a given request. Gateway adapters use this class when constructing a sale request. The object of this class is obtained through the paymentMethod field on the SaleRequest object.

Example

This code sample retrieves the SaleApiPaymentMethodRequest object from the SaleRequest class.
1commercepayments.SaleApiPaymentMethodRequest paymentMethod = saleRequest.paymentMethod;

SaleApiPaymentMethodRequest Constructors

The following are constructors for SaleApiPaymentMethodRequest.

SaleApiPaymentMethodRequest(cardPaymentMethodRequest)

Sends data related to a card payment method to a gateway adapter during a sale service call.

Signature

global SaleApiPaymentMethodRequest(commercepayments.CardPaymentMethodRequest cardPaymentMethodRequest)

Parameters

cardPaymentMethodRequest
Type: CardPaymentMethodRequest

SaleApiPaymentMethodRequest()

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

Signature

global SaleApiPaymentMethodRequest()

SaleApiPaymentMethodRequest Properties

The following are properties for SaleApiPaymentMethodRequest.

cardPaymentMethod

Contains details of the card used in a payment method.

Signature

global commercepayments.CardPaymentMethodRequest cardPaymentMethod {get; set;}

Property Value

Type: CardPaymentMethodRequest

SaleApiPaymentMethodRequest Methods

The following are methods for SaleApiPaymentMethodRequest.

equals(obj)

Maintains the integrity of lists of type SaleApiPaymentMethodRequest 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

Return Value

Type: Boolean

hashCode()

Maintains the integrity of lists of type SaleApiPaymentMethodRequest 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