/** * resolves identification * * @param \Abobereich\ApiClient\Models\Model|Account $model * @param array $data * * @return array|bool */ protected function resolveIdentification(Model $model, array $data) { if (!empty($model->getId())) { $data['account_id'] = $model->getId(); return $data; } if (!empty($model->getExternalIdentifier())) { $data['account_identifier'] = $model->getExternalIdentifier(); return $data; } return false; }
/** * resolves identification * * @param \Abobereich\ApiClient\Models\Model|Subscription $model * @param array $data * * @return array|bool */ protected function resolveIdentification(Model $model, array $data) { if (!empty($model->getId())) { $data['subscription_id'] = $model->getId(); return $data; } if (!empty($model->getExternalIdentifier())) { $data['subscription_identifier'] = $model->getExternalIdentifier(); return $data; } if (!empty($model->getSubscriptionNumber())) { $data['subscription_number'] = $model->getSubscriptionNumber(); return $data; } return false; }