public static function Braintree_Customer::update in Commerce Braintree 7
updates the customer record
if calling this method in static context, customerId is the 2nd attribute. customerId is not sent in object context.
@access public
Parameters
array $attributes:
string $customerId (optional):
Return value
object Braintree_Result_Successful or Braintree_Result_Error
6 calls to Braintree_Customer::update()
- Braintree_Customer::updateNoValidate in braintree_php/
lib/ Braintree/ Customer.php - update a customer record, assuming validations will pass
- Braintree_CustomerTest::testUpdate in braintree_php/
tests/ integration/ CustomerTest.php - Braintree_CustomerTest::testUpdate_forBillingAddressAndExistingCreditCardAndCustomerDetailsTogether in braintree_php/
tests/ integration/ CustomerTest.php - Braintree_CustomerTest::testUpdate_withCountry in braintree_php/
tests/ integration/ CustomerTest.php - Braintree_CustomerTest::testUpdate_withNewCreditCardAndExistingBillingAddress in braintree_php/
tests/ integration/ CustomerTest.php
File
- braintree_php/
lib/ Braintree/ Customer.php, line 326
Class
- Braintree_Customer
- Creates and manages Customers
Code
public static function update($customerId, $attributes) {
Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
self::_validateId($customerId);
return self::_doUpdate('put', '/customers/' . $customerId, array(
'customer' => $attributes,
));
}