BraintreeAmexExpressCheckoutCard

Braintree AmexExpressCheckoutCard module Creates and manages Braintree Amex Express Checkout cards.

Defined (1)

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

/includes/lib/Braintree/lib/Braintree/AmexExpressCheckoutCard.php  
  1. class AmexExpressCheckoutCard 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 AmexExpressCheckoutCard 
  12. * to the requesting method, with populated properties 
  13. * @ignore 
  14. * @return AmexExpressCheckoutCard 
  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 $amexExpressCheckoutCardAttribs array of Amex Express Checkout card properties 
  26. * @return void 
  27. */ 
  28. protected function _initialize($amexExpressCheckoutCardAttribs) 
  29. // set the attributes 
  30. $this->_attributes = $amexExpressCheckoutCardAttribs; 
  31.  
  32. $subscriptionArray = []; 
  33. if (isset($amexExpressCheckoutCardAttribs['subscriptions'])) { 
  34. foreach ($amexExpressCheckoutCardAttribs['subscriptions'] AS $subscription) { 
  35. $subscriptionArray[] = Subscription::factory($subscription); 
  36.  
  37. $this->_set('subscriptions', $subscriptionArray);