PPPStripeAttachedObject

Class AttachedObject.

Defined (1)

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

/includes/api/stripe-php/lib/AttachedObject.php  
  1. class AttachedObject extends StripeObject 
  2. /** 
  3. * Updates this object. 
  4. * @param array $properties A mapping of properties to update on this object. 
  5. */ 
  6. public function replaceWith($properties) 
  7. $removed = array_diff(array_keys($this->_values), array_keys($properties)); 
  8. // Don't unset, but rather set to null so we send up '' for deletion. 
  9. foreach ($removed as $k) { 
  10. $this->$k = null; 
  11.  
  12. foreach ($properties as $k => $v) { 
  13. $this->$k = $v;