Skip to main content
Vindicia Knowledge Center

Address.update

Address.update

Address.update

The update method creates or updates an Address object. When creating a new Address object, do not set a value for VID; CashBox will automatically generate a VID for the new object when you call update(). When updating an existing Address object, identify it with its VID.

Note You can also create an Address object indirectly by specifying it inside other objects that you explicitly create. For example, specifyshippingAddress when you create Account; specifybillingAddress when you create PaymentMethod, and etc.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

address: the populated Address object to create or update. To update an existing object, be sure to specify its VID.

Output

return: an object of type Return that indicates the success or failure of the call.

address: the Address object that was created or updated.

created: a Boolean flag that, if set to true, indicates that this method has created a new Address object. A false setting indicates that update has updated an existing Address object.

Returns

This call returns the codes listed in Standard Return Codes.

Example

// To create address information, instantiate an Address object

$address = new Address();

// populate the address object with data

$address->setAddr1('123 Main Street');
$address->setAddr2('Apt. 4');
$address->setCity('San Carlos');
$address->setDistrict('CA'); // this is US state or province
$address->setPostalCode('94070');
$address->setCountry('US');
$address->setPhone('123-456-7890');

$response = $address->update();
if($response['returnCode'] == 200) {

$createdAddr = $response['data']->address;
print "Address create with VID " . $createdAddr->getVID() . "\n";

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top