Sha256: 239a8d59ca0f21546c73ba75dd55479a8b25c0a23328a7225514ddacf7d938f1
Contents?: true
Size: 670 Bytes
Versions: 7
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module RubyLokaliseApi 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 = RubyLokaliseApi::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
7 entries across 7 versions & 1 rubygems