Sha256: 0f13be65b7828405d149c599de332e666fe0ebf5d2b6d266b3ce44cb54cb0219
Contents?: true
Size: 1.15 KB
Versions: 33
Compression:
Stored size: 1.15 KB
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, environment_id: environment_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, environment_id: environment_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
33 entries across 33 versions & 1 rubygems