app/services/external_apis/dmphub_service.rb
# Register the ApiClient behind the minter service as a Subscriber to the Plan
# if the service has a callback URL and ApiClient
Register the ApiClient behind the minter service as a Subscriber to the Plan
if the service has a callback URL and ApiClient
Register the ApiClient behind the minter service as a Subscriber to the Plan if the service has a callback URL and ApiClient
def add_subscription(plan:, doi:)
        Rails.logger.warn "DMPHubService - No ApiClient available for 'dmphub'!" unless api_client.present?
        return plan unless plan.present? && doi.present? &&
                           callback_path.present? && api_client.present?
        Subscription.create(
          plan: plan,
          subscriber: api_client,
          callback_uri: callback_path % { dmp_id: doi.gsub(/https?:\/\/doi.org\//, "") },
          updates: true,
          deletions: true
        )
      end
def add_subscription ( plan : , doi : ) Rails . logger . warn "DMPHubService - No ApiClient available for 'dmphub'!" unless api_client . present? return plan unless plan . present? && doi . present? && callback_path . present? && api_client . present? Subscription . create ( plan : plan , subscriber : api_client , callback_uri : callback_path % { dmp_id : doi . gsub ( / https?: \/ \/ doi.org \/ / , "" ) } , updates : true , deletions : true ) end
Register the ApiClient behind the minter service as a Subscriber to the Plan
if the service has a callback URL and ApiClient
Register the ApiClient behind the minter service as a Subscriber to the Plan if the service has a callback URL and ApiClient
plan
doi