You are here

protected function Braintree_WebhookNotification::_initialize in Commerce Braintree 7

File

braintree_php/lib/Braintree/WebhookNotification.php, line 59

Class

Braintree_WebhookNotification

Code

protected function _initialize($attributes) {
  $this->_attributes = $attributes;
  if (isset($attributes['subject']) && isset($attributes['subject']['subscription'])) {
    $this
      ->_set('subscription', Braintree_Subscription::factory($attributes['subject']['subscription']));
  }
}