dor-services-client 15.68.0 → 15.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b098e13ed4b3ab09cec8aa5feadf5997bb7dbfa18a21a2cd76023cc860f6648
4
- data.tar.gz: 9526c7b43a83c75eea0fba7d50c30f98bae90e11df2379d182f3676d4e2a743f
3
+ metadata.gz: f7eb1b5eb6201610e9bd4496dcc0709e4a3348639aae0655c25373b98d00c621
4
+ data.tar.gz: f45e73e423f64393198f41d2ef7f4d954bc0794b470aea4e7b647e2f37cd2e01
5
5
  SHA512:
6
- metadata.gz: 97752c9a761821f0f4054b29ceae2514be935d4c2a0290cb119c134c15fdb4bf8f1cf8a2c8f3e330a6507e159bedcb6252c2a895a311052a075914964bb7c530
7
- data.tar.gz: 33446c0f137d283e8d4c22436bbff8c4456be4a5b5e3a7389d4dfc545dffb50e9a72c3998b64256d288725f0611679e89aa7e5b71c5d4255c96863f8b0417b9e
6
+ metadata.gz: ba12e822c3fcbd54f30d140ed114ee680854580b00a9632aa77b6f1081ca31258693836f4b5b325e18bfde34c38c3055cd81c6e4cc6f7c18ceb76de03403ac50
7
+ data.tar.gz: 5d825bc8d170005932dcd7d9d104c43ad7a3560aa6e99673c245fa6abbf1de01993286cef5aeb4930ea297db304fa88db58a5bd6ea6b6bd6d2deb595e51869d3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.68.0)
4
+ dor-services-client (15.69.0)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.133.0)
7
7
  deprecation
data/README.md CHANGED
@@ -120,6 +120,8 @@ object_client.version.solr(2)
120
120
  object_client.version.open(description: 'Changed title')
121
121
  # see dor-services-app openapi.yml for optional params
122
122
  object_client.version.close
123
+ # Update the description of the currently open version
124
+ object_client.version.update_description(description: 'Changed title and abstract', user_name: 'some_sunetid')
123
125
 
124
126
  # Manage user versions
125
127
  object_client.user_version.inventory
@@ -123,6 +123,23 @@ module Dor
123
123
  raise_exception_based_on_response!(resp)
124
124
  end
125
125
 
126
+ # Update the description of the currently open version for an object
127
+ # @param description [String] the new description of the version - required
128
+ # @param user_name [String] (optional) - sunetid
129
+ # @raise [NotFoundResponse] when the response is a 404 (object not found)
130
+ # @raise [ConflictResponse] when the response is a 409 (no version is open)
131
+ # @raise [UnexpectedResponse] when the response is not successful.
132
+ def update_description(description:, user_name: nil)
133
+ resp = connection.patch do |req|
134
+ req.url "#{base_path}/current"
135
+ req.headers['Content-Type'] = 'application/json'
136
+ req.body = { description: description, user_name: user_name }.compact.to_json
137
+ end
138
+ return if resp.success?
139
+
140
+ raise_exception_based_on_response!(resp)
141
+ end
142
+
126
143
  # @return [Array] a list of the versions
127
144
  # @raise [UnexpectedResponse] on an unsuccessful response from the server
128
145
  def inventory
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.68.0'
6
+ VERSION = '15.69.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.68.0
4
+ version: 15.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne