Newer Version Available

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

AddressResponse Class

Contains a location code sent from the external tax engine.

Namespace

CommerceTax

Usage

Use the AddressResponse class to set unique values for each address.

1commercetax.AddressesResponse addressesRes = new commercetax.AddressesResponse();
2
3//AddressResponse containing ShipTo information
4commercetax.AddressResponse shipToAddress = new commercetax.AddressResponse();
5shipToAddress.setLocationCode('1234567');
6
7//AddressResponse containing ShipFrom information
8commercetax.AddressResponse shipFromAddress = new commercetax.AddressResponse();
9shipFromAddress.setLocationCode('84720385');
10
11//AddressResponse containing Sold To information
12commercetax.AddressResponse soldToAddress = new commercetax.AddressResponse();
13soldToAddress.setLocationCode('92381749');
14
15//set values of addressesRes
16addressesRes.setShipFrom(shipFromAddress);
17addressesRes.setShipTo(shipToAddress);
18addressesRes.setSoldTo(soldToAddress);

AddressResponse Methods

Learn more about the available methods with the AddressResponse class.

The AddressResponse class includes these methods.

setLocationCode(locationCode)

Sets the value of a LocationCode field.

Signature

global void setLocationCode(String locationCode)

Parameters

locationCode
Type: String
A code that contains address information. This value can be passed to a method that sets the value of an address field.

Return Value

Type: void