public static function Braintree_Address::create in Commerce Braintree 7
@access public
Parameters
array $attribs:
Return value
object Result, either Successful or Error
5 calls to Braintree_Address::create()
- Braintree_Address::createNoValidate in braintree_php/
lib/ Braintree/ Address.php - attempts the create operation assuming all data will validate returns a Braintree_Address object instead of a Result
- Braintree_AddressTest::testCreate in braintree_php/
tests/ integration/ AddressTest.php - Braintree_AddressTest::testCreate_withValidationErrors in braintree_php/
tests/ integration/ AddressTest.php - Braintree_AddressTest::testCreate_withValidationErrors_onCountryCodes in braintree_php/
tests/ integration/ AddressTest.php - Braintree_AddressTest::testFind in braintree_php/
tests/ integration/ AddressTest.php
File
- braintree_php/
lib/ Braintree/ Address.php, line 44
Class
- Braintree_Address
- Creates and manages Braintree Addresses
Code
public static function create($attribs) {
Braintree_Util::verifyKeys(self::createSignature(), $attribs);
$customerId = isset($attribs['customerId']) ? $attribs['customerId'] : null;
self::_validateCustomerId($customerId);
unset($attribs['customerId']);
return self::_doCreate('/customers/' . $customerId . '/addresses', array(
'address' => $attribs,
));
}