10 * e.g. metadata on Stripe objects.
14 class AttachedObject
extends StripeObject
implements Countable
17 * Updates this object.
19 * @param array $properties A mapping of properties to update on this object.
21 public function replaceWith($properties)
23 $removed = array_diff(array_keys($this->_values
), array_keys($properties));
24 // Don't unset, but rather set to null so we send up '' for deletion.
25 foreach ($removed as $k) {
29 foreach ($properties as $k => $v) {
35 * Counts the number of elements in the AttachedObject instance.
37 * @return int the number of elements
39 public function count()
41 return count($this->_values
);