BraintreeVenmoAccount

Braintree VenmoAccount module Creates and manages Braintree Venmo accounts.

Defined (1)

The class is defined in the following location(s).

/includes/lib/Braintree/lib/Braintree/VenmoAccount.php  
  1. class VenmoAccount extends Base 
  2. /** instance methods */ 
  3. /** 
  4. * returns false if default is null or false 
  5. * @return boolean 
  6. */ 
  7. public function isDefault() 
  8. return $this->default; 
  9.  
  10. /** 
  11. * factory method: returns an instance of VenmoAccount 
  12. * to the requesting method, with populated properties 
  13. * @ignore 
  14. * @return VenmoAccount 
  15. */ 
  16. public static function factory($attributes) 
  17.  
  18. $instance = new self(); 
  19. $instance->_initialize($attributes); 
  20. return $instance; 
  21.  
  22. /** 
  23. * sets instance properties from an array of values 
  24. * @access protected 
  25. * @param array $venmoAccountAttribs array of Venmo account properties 
  26. * @return void 
  27. */ 
  28. protected function _initialize($venmoAccountAttribs) 
  29. $this->_attributes = $venmoAccountAttribs; 
  30.  
  31. $subscriptionArray = array(); 
  32. if (isset($venmoAccountAttribs['subscriptions'])) { 
  33. foreach ($venmoAccountAttribs['subscriptions'] AS $subscription) { 
  34. $subscriptionArray[] = Subscription::factory($subscription); 
  35.  
  36. $this->_set('subscriptions', $subscriptionArray);