Sha256: 69ef7f9bad23dce01503972e1855df6c141742008629561ed6154aa50fd7b548
Contents?: true
Size: 975 Bytes
Versions: 14
Compression:
Stored size: 975 Bytes
Contents
module Contentful module Management module Resource # Wrapper for Resources with /archived API module Archiver # Archives a resource. # # @return [Contentful::Management::Resource] def archive ResourceRequester.new(client, self.class).archive( self, { space_id: space.id, resource_id: id, suffix: '/archived' }, version: sys[:version] ) end # Unarchives a resource. # # @return [Contentful::Management::Resource] def unarchive ResourceRequester.new(client, self.class).unarchive( self, { space_id: space.id, resource_id: id, suffix: '/archived' }, version: sys[:version] ) end # Checks if a resource is archived. # # @return [Boolean] def archived? sys[:archivedAt] ? true : false end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems