Sha256: bcca480fa6739fa44c097b15982136aab95235d79af75f7cf528cb7ba2fe323e

Contents?: true

Size: 995 Bytes

Versions: 15

Compression:

Stored size: 995 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_database_server_snapshots(params={})
      database_server = params.delete("database_server")
      provider        = params.delete("provider")

      path = if database_server
               "/database-servers/#{database_server}/snapshots"
             elsif provider
               "/providers/#{provider}/database-server-snapshots"
             end

      request(
        :body  => params,
        :query => Ey::Core.paging_parameters(params),
        :path  => path,
        :url   => params.delete("url"),
      )
    end
  end

  class Mock
    def get_database_server_snapshots(params={})
      extract_url_params!(params)

      headers, database_server_snapshots_page = search_and_page(params, :database_server_snapshots, search_keys: %w[database_server provider provisioned_id])

      response(
        :body    => {"database_server_snapshots" => database_server_snapshots_page},
        :headers => headers,
      )
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/get_database_server_snapshots.rb