You are here

public static function Braintree_Address::delete in Commerce Braintree 7

delete an address by id

Parameters

mixed $customerOrId:

string $addressId:

1 call to Braintree_Address::delete()
Braintree_AddressTest::testDelete in braintree_php/tests/integration/AddressTest.php

File

braintree_php/lib/Braintree/Address.php, line 81

Class

Braintree_Address
Creates and manages Braintree Addresses

Code

public static function delete($customerOrId = null, $addressId = null) {
  self::_validateId($addressId);
  $customerId = self::_determineCustomerId($customerOrId);
  Braintree_Http::delete('/customers/' . $customerId . '/addresses/' . $addressId);
  return new Braintree_Result_Successful();
}