M2_Stripe_AttachedObject

The Membership 2 M2 Stripe AttachedObject class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/AttachedObject.php  
  1. class M2_Stripe_AttachedObject extends M2_Stripe_Object 
  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;