.update   RC.Server.Visitor.Address.update

Saves full or partial address information to the visitor's profile. This address is normally used for shipping cost calculations, when the visitor has not signed in.

METHOD PARAMETERS
Parameter Options Type Default Description
parameters required hashmap or POST data (none) Not used, could be set null or empty hashmap.
options optional hashmap (none) Request options. See the options section below for details
options
Parameter Options Type Default Description
post required hashmap or POST data (none) Address details. See post section below for more information.
success optional function (none) Default success handler.
failure optional function (none) Default failure handler.
post
Parameter Options Type Default Description
use optional string (none) Address use, typically this will either be shipping or billing.
line1 optional string (none) Address first line.
line2 optional string (none) Address second line.
line3 optional string (none) Address third line.
city optional string (none) Address city.
region optional string (none) Address region.
code optional string (none) Address postal code.
country_code optional string (none) Address country code. This is an 2-character ISO 3166-1 alpha-2 code.
EXAMPLE
RC.Server.Visitor.Address.update( {}, { 
	post: $('#address-update-form').serialize(), 
	success: function(orderId) { alert('Address updated successfully!'); }, 
	failure: function(context,errorMsg,xml,XHR) { alert(errorMsg); } 
} );