---
schema_version: "1"
id: b5f861775ac7b16ead299cbd525f2f31eafc463de2aeeb4422672080588a9902
title: TaxAddressRequest Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercetax_TaxAddressRequest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b92a8ea478a1797a0c12a907aa5c5f0b66eccbb339a3559b2bab7b1c42d72ad4
description: Contains address details used for tax calculation.Learn more about the available constructors with the TaxAddressRequest class.Initializes the TaxAddressRequest object using address details. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.Learn more about the available properties with the TaxAddressRequest class.City used in an address, which is required for tax calculation.Country used in an address, which is required for tax calculation.Country code used in an address, which is required for tax calculation.Latitude used in an address, which is required for tax calculation.Location code used in an address, which is required for tax calculation.Longitude used in an address, which is required for tax calculation.Postal code used in an address, which is required for tax calculation.State used in an address, which is required for tax calculation.State code used in an address, which is required for tax calculation.Street used in an address, which is required for tax calculation.Learn more about the available methods with the TaxAddressRequest class.Maintains the integrity of lists of type TaxAddressRequest 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 TaxAddressRequest by determining the uniqueness of the external object in a list.Converts a date to a string.
---
# TaxAddressRequest Class

Contains address details used for tax calculation.

## Namespace

[CommerceTax](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercetax.htm "Manage the communication between Salesforce and an external tax engine.")

- **[TaxAddressRequest Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_constructors)**  
    Learn more about the available constructors with the TaxAddressRequest class.
- **[TaxAddressRequest Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_properties)**  
    Learn more about the available properties with the TaxAddressRequest class.
- **[TaxAddressRequest Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_methods)**  
    Learn more about the available methods with the TaxAddressRequest class.

## TaxAddressRequest Constructors

Learn more about the available constructors with the TaxAddressRequest class.

The TaxAddressRequest class includes these constructors.

- **[TaxAddressRequest(city, country, latitude, longitude, postalCode, state, street, locationCode)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_ctor)**  
    Initializes the TaxAddressRequest object using address details. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

### TaxAddressRequest(city, country, latitude, longitude, postalCode, state, street, locationCode)

Initializes the TaxAddressRequest object using address details. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

#### Signature

global TaxAddressRequest(String city, String country, Double latitude, Double longitude, String postalCode, String state, String street, String locationCode)

#### Parameters

- **city**:
    
    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.")
    
    City used in an address, which is required for tax calculation.
- **country**:
    
    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.")
    
    Country used in an address, which is required for tax calculation.
- **latitude**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")
    
    Latitude used in an address, which is required for tax calculation.
- **longitude**:
    
    Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")
    
    Longitude used in an address, which is required for tax calculation.
- **postalCode**:
    
    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.")
    
    Postal code used in an address, which is required for tax calculation.
- **state**:
    
    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.")
    
    State used in an address, which is required for tax calculation.
- **street**:
    
    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.")
    
    Street used in an address, which is required for tax calculation.
- **locationCode**:
    
    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.")
    
    Location code used in an address, which is required for tax calculation.

## TaxAddressRequest Properties

Learn more about the available properties with the TaxAddressRequest class.

The TaxAddressRequest class includes these properties.

- **[city](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_city)**  
    City used in an address, which is required for tax calculation.
- **[country](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_country)**  
    Country used in an address, which is required for tax calculation.
- **[countryCode](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_countryCode)**  
    Country code used in an address, which is required for tax calculation.
- **[latitude](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_latitude)**  
    Latitude used in an address, which is required for tax calculation.
- **[locationCode](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_locationCode)**  
    Location code used in an address, which is required for tax calculation.
- **[longitude](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_longitude)**  
    Longitude used in an address, which is required for tax calculation.
- **[postalCode](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_postalCode)**  
    Postal code used in an address, which is required for tax calculation.
- **[state](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_state)**  
    State used in an address, which is required for tax calculation.
- **[stateCode](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_stateCode)**  
    State code used in an address, which is required for tax calculation.
- **[street](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_street)**  
    Street used in an address, which is required for tax calculation.

### city

City used in an address, which is required for tax calculation.

#### Signature

global String city {get; set;}

#### Property 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.")

### country

Country used in an address, which is required for tax calculation.

#### Signature

global String country {get; set;}

#### Property 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.")

### countryCode

Country code used in an address, which is required for tax calculation.

#### Signature

global String countryCode {get; set;}

#### Property 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.")

### latitude

Latitude used in an address, which is required for tax calculation.

#### Signature

global Double latitude {get; set;}

#### Property Value

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

### locationCode

Location code used in an address, which is required for tax calculation.

#### Signature

global String locationCode {get; set;}

#### Property 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.")

### longitude

Longitude used in an address, which is required for tax calculation.

#### Signature

global Double longitude {get; set;}

#### Property Value

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

### postalCode

Postal code used in an address, which is required for tax calculation.

#### Signature

global String postalCode {get; set;}

#### Property 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.")

### state

State used in an address, which is required for tax calculation.

#### Signature

global String state {get; set;}

#### Property 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.")

### stateCode

State code used in an address, which is required for tax calculation.

#### Signature

global String stateCode {get; set;}

#### Property 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.")

### street

Street used in an address, which is required for tax calculation.

#### Signature

global String street {get; set;}

#### Property 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.")

## TaxAddressRequest Methods

Learn more about the available methods with the TaxAddressRequest class.

The TaxAddressRequest class includes these methods.

- **[equals(obj)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_equals)**  
    Maintains the integrity of lists of type TaxAddressRequest 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_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_hashCode)**  
    Maintains the integrity of lists of type TaxAddressRequest by determining the uniqueness of the external object in a list.
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercetax_TaxAddressRequest.htm#apex_commercetax_TaxAddressRequest_toString)**  
    Converts a date to a string.

### equals(obj)

Maintains the integrity of lists of type TaxAddressRequest 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 TaxAddressRequest by determining the uniqueness of the external object 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.")