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-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/destroy_storage_user.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/destroy_storage_user.rb