AddressRequest Class
Contains address request data that is sent to a gateway adapter during a service call.
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();
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.
Constructs a sample address. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.
global AddressRequest(String street, String city, String state, String country, String postalCode)
-
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.
The following are properties for AddressRequest.
-
City of the payment method address.
-
Company name of the payment method address.
-
Country for the payment method address.
-
Postal code for the payment method address.
-
State for the payment method address.
-
Street for the payment method address.
City of the payment method address.
global String city {get; set;}
Type: String
Company name of the payment method address.
global String companyName {get; set;}
Type: String
Country for the payment method address.
global String country {get; set;}
Type: String
Postal code for the payment method address.
global String postalCode {get; set;}
Type: String
State for the payment method address.
global String state {get; set;}
Type: String
Street for the payment method address.
global String street {get; set;}
Type: String
The following are methods for AddressRequest.
-
Maintains the integrity of lists of type
AddressRequestby determining the equality of external objects in a list. This method is dynamic and is based on the equals method in Java. -
Maintains the integrity of lists of type
AddressRequest. -
Converts a date to a string.
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.
global Boolean equals(Object obj)
-
obj:
Type:
Object External object whose key is to be validated.
Type: Boolean
Maintains the integrity of lists of type AddressRequest.
global Integer hashCode()
Type: Integer
Converts a date to a string.
global String toString()
Type: String