public static function Braintree_Address::update in Commerce Braintree 7
updates the address record
if calling this method in static context, customerOrId is the 2nd attribute, addressId 3rd. customerOrId & addressId are not sent in object context.
@access public
Parameters
array $attributes:
mixed $customerOrId (only used in static call):
string $addressId (only used in static call):
Return value
object Braintree_Result_Successful or Braintree_Result_Error
4 calls to Braintree_Address::update()
- Braintree_Address::updateNoValidate in braintree_php/
lib/ Braintree/ Address.php - update an address record, assuming validations will pass
- Braintree_AddressTest::testUpdate in braintree_php/
tests/ integration/ AddressTest.php - Braintree_AddressTest::testUpdate_withValidationErrors in braintree_php/
tests/ integration/ AddressTest.php - Braintree_AddressTest::testUpdate_withValidationErrors_onCountry in braintree_php/
tests/ integration/ AddressTest.php
File
- braintree_php/
lib/ Braintree/ Address.php, line 153
Class
- Braintree_Address
- Creates and manages Braintree Addresses
Code
public static function update($customerOrId, $addressId, $attributes) {
self::_validateId($addressId);
$customerId = self::_determineCustomerId($customerOrId);
Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
$response = Braintree_Http::put('/customers/' . $customerId . '/addresses/' . $addressId, array(
'address' => $attributes,
));
return self::_verifyGatewayResponse($response);
}