Class: Dor::Services::Client::Accession
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Accession
- Defined in:
- lib/dor/services/client/accession.rb
Overview
API calls that are about starting accessioning on a repository object
Instance Method Summary collapse
-
#initialize(connection:, version:, object_identifier:) ⇒ Accession
constructor
A new instance of Accession.
-
#start(params = {}) ⇒ Boolean
Start accession on an object (start specified workflow, assemblyWF by default, and version if needed).
Methods inherited from VersionedService
Constructor Details
#initialize(connection:, version:, object_identifier:) ⇒ Accession
Returns a new instance of Accession.
11 12 13 14 |
# File 'lib/dor/services/client/accession.rb', line 11 def initialize(connection:, version:, object_identifier:) super(connection: connection, version: version) @object_identifier = object_identifier end |
Instance Method Details
#start(params = {}) ⇒ Boolean
Start accession on an object (start specified workflow, assemblyWF by default, and version if needed)
25 26 27 28 29 30 31 32 33 |
# File 'lib/dor/services/client/accession.rb', line 25 def start(params = {}) resp = connection.post do |req| req.url path req.params = params end return true if resp.success? raise_exception_based_on_response!(resp) end |