Sha256: bbd1c395e91ef0ea67f571146a416353cf9774e1b95ad95012d9980679e2ea19

Contents?: true

Size: 1.03 KB

Versions: 53

Compression:

Stored size: 1.03 KB

Contents

class Ey::Core::Client
  class Real
    def destroy_logical_database(params={})
      id  = params["id"]
      url = params.delete("url")

      request(
        :path   => "/logical-databases/#{id}",
        :url    => url,
        :method => :delete,
      )
    end
  end

  class Mock
    def destroy_logical_database(params={})
      extract_url_params!(params)
      request_id = self.uuid

      logical_database_id = params["id"] || params["logical_database"]

      logical_database = self.find(:logical_databases, logical_database_id)

      request = {
        "resource"    => [:logical_databases, logical_database_id, logical_database.merge("deleted_at" => Time.now)],
        "type"        => "deprovision_logical_database",
        "started_at"  => Time.now,
        "finished_at" => nil,
        "successful"  => "true",
        "id"          => request_id,
      }

      self.data[:requests][request_id] = request

      response(
        :body   => {"request" => {id: request_id}},
        :status => 201,
      )
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
ey-core-3.6.4 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.6.3 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.6.1 lib/ey-core/requests/destroy_logical_database.rb
groove-ey-core-3.6.3 lib/ey-core/requests/destroy_logical_database.rb
groove-ey-core-3.6.2 lib/ey-core/requests/destroy_logical_database.rb
groove-ey-core-3.6.1 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.5.0 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.4.4 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.4.2 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.4.1 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.4.0 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.3.1 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.3.0 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.6 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.5 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.4 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.3 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.2 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.1 lib/ey-core/requests/destroy_logical_database.rb
ey-core-3.2.0 lib/ey-core/requests/destroy_logical_database.rb