Sha256: 0bbf7806fd4a907df9b212845fd00cc481b4666a168ae5885357fbb94f272cb3
Contents?: true
Size: 656 Bytes
Versions: 3
Compression:
Stored size: 656 Bytes
Contents
# frozen_string_literal: true module Lokalise module Resources class Snapshot < Base ID_KEY = 'snapshot_id' supports :destroy def restore self.class.restore @client, @path end class << self def restore(client, path, *_args) klass = Lokalise::Resources::Project klass.new post(path, client), ->(project_id, *_ids) { klass.endpoint(project_id) } end def endpoint(project_id, snapshot_id = nil) path_from projects: project_id, snapshots: snapshot_id end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems