Sha256: d2627de35ac1e11cf5dd1f96730bf72e97768633d35f9946adf86aeaf6172c3b

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module Lokalise
  module Resources
    class Snapshot < Base
      supports :destroy

      def restore
        self.class.restore @client, @path
      end

      class << self
        def restore(client, path, *_args)
          Lokalise::Resources::Project.new post(path, client)
        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

Version Path
ruby-lokalise-api-2.10.0 lib/ruby-lokalise-api/resources/snapshot.rb
ruby-lokalise-api-2.9.0.1 lib/ruby-lokalise-api/resources/snapshot.rb
ruby-lokalise-api-2.9.0 lib/ruby-lokalise-api/resources/snapshot.rb