Sha256: 1048ada92cfc82f79f61bc9a83a17a72e01004ff635261f23a80188ec812da35

Contents?: true

Size: 978 Bytes

Versions: 53

Compression:

Stored size: 978 Bytes

Contents

class Ey::Core::Client
  class Real
    def destroy_storage_user(params={})
      id         = params.delete("id")

      request(
        :method => :delete,
        :path   => "/storage-users/#{id}",
      )
    end
  end # Real

  class Mock
    def destroy_storage_user(params={})
      storage_id = params.delete("storage")
      id         = params.delete("id")

      request_id  = self.uuid

      self.data[:requests][request_id] = {
        "id"          => request_id,
        "type"        => "deprovision_provider_storage_user",
        "successful"  => true,
        "started_at"  => Time.now,
        "finished_at" => nil,
        "resource"    => [:storage_users, id, self.data[:storage_users][id].merge("deleted_at" => Time.now)],
      }

      response(
        :body    => {"request" => {id: request_id}},
        :status  => 201,
        :headers => {
          "Content-Type" => "application/json; charset=utf8",
        }
      )
    end
  end # Mock
end

Version data entries

53 entries across 53 versions & 3 rubygems

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