protected function doUnserialize(array $json) { // consult parent for further unserialization parent::doUnserialize($json); $this->unserializeArrayEntities('roles', Bf_Role::getClassName(), $json); $this->unserializeArrayEntities('paymentMethods', Bf_PaymentMethod::getClassName(), $json); $this->unserializeEntity('profile', Bf_Profile::getClassName(), $json); $this->unserializeEntity('metadata', Bf_MetadataJson::getClassName(), $json); }
/** * Remove the given payment method from the specified subscription * @param union[string | Bf_PaymentMethod] $paymentMethod The Bf_PaymentMethod which should be removed. <string>: ID of the Bf_PaymentMethod. <Bf_Subscription>: The Bf_Subscription. * @param union[string | Bf_Subscription] $subscription The Bf_Subscription from which the Bf_PaymentMethod should be removed. <string>: ID of the Bf_Subscription. <Bf_Subscription>: The Bf_Subscription. * @return Bf_PaymentMethod The removed payment method. */ public static function removePaymentMethodFromSubscription($paymentMethod, $subscription, $queryParams = array()) { $subscriptionID = Bf_Subscription::getIdentifier($subscription); $paymentMethodID = Bf_PaymentMethod::getIdentifier($paymentMethod); $endpoint = sprintf("%s/payment-methods/%s", rawurlencode($subscriptionID), rawurlencode($paymentMethodID)); $responseEntity = Bf_PaymentMethod::getClassName(); return static::retireAndGrabFirst($endpoint, NULL, $customClient, $responseEntity, $queryParams); }