Braintree\AddressGateway::create PHP Method

create() public method

public create ( array $attribs ) : Braintree\Result\Successful | Error
$attribs array
return Braintree\Result\Successful | Braintree\Result\Error
    public function create($attribs)
    {
        Util::verifyKeys(self::createSignature(), $attribs);
        $customerId = isset($attribs['customerId']) ? $attribs['customerId'] : null;
        $this->_validateCustomerId($customerId);
        unset($attribs['customerId']);
        try {
            return $this->_doCreate('/customers/' . $customerId . '/addresses', ['address' => $attribs]);
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound('Customer ' . $customerId . ' not found.');
        }
    }