Newer Version Available

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

AddressRequest Class

Contains address request data that is sent to a gateway adapter during a service call.

Namespace

CommercePayments

Usage

Contains information about the payment method’s address. Use this information in authorization, sale, and tokenization requests. The payment gateway adapter uses information in an AddressRequest object to construct a JSON request to send to the payment gateway.

The constructor of this class takes no arguments. For example:

CommercePayments.AddressRequest adr = new CommercePayments.AddressRequest();

AddressRequest Constructors

The following are constructors for AddressRequest.

AddressRequest(street, city, state, country, postalCode)

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

Signature

global AddressRequest(String street, String city, String state, String country, String postalCode)

Parameters

street
Type: String
Street for the payment method's address.
city
Type: String
City for the payment method's address.
state
Type: String
State for the payment method's address.
country
Type: String
Country for the payment method's address.
postalCode
Type: String
Postal code for the payment method's address.

AddressRequest Properties

The following are properties for AddressRequest.

city

City of the payment method address.

Signature

global String city {get; set;}

Property Value

Type: String

companyName

Company name of the payment method address.

Signature

global String companyName {get; set;}

Property Value

Type: String

country

Country for the payment method address.

Signature

global String country {get; set;}

Property Value

Type: String

postalCode

Postal code for the payment method address.

Signature

global String postalCode {get; set;}

Property Value

Type: String

state

State for the payment method address.

Signature

global String state {get; set;}

Property Value

Type: String

street

Street for the payment method address.

Signature

global String street {get; set;}

Property Value

Type: String

AddressRequest Methods

The following are methods for AddressRequest.

equals(obj)

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

Signature

global Integer hashCode()

Return Value

Type: Integer

toString()

Converts a date to a string.

Signature

global String toString()

Return Value

Type: String