Sha256: 89f68742f285ac7150cd3ab60236488d213983611988bece87872751a409992b

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

module Fog
    module Compute
        class ProfitBricks
            class Real
                # Retrieves a list of requests
                #
                # ==== Parameters
                # * None
                #
                # ==== Returns
                # * response<~Excon::Response>:
                #   * body<~Hash>:
                #     * id<~String> 		  - The resource's unique identifier
                #     * type<~String>		  - The type of the resource
                #     * href<~String>		  - URL to the object’s representation (absolute path)
                #     * items<~Hash>      - Collection of individual request objects
                #       * id<~String> 		  - The resource's unique identifier
                #       * type<~String>		  - The type of the resource
                #       * href<~String>		  - URL to the object’s representation (absolute path)
                #
                # {ProfitBricks API Documentation}[https://devops.profitbricks.com/api/cloud/v2/#list-requests]
                def get_all_requests
                    request(
                        :expects => [200],
                        :method  => 'GET',
                        :path    => "/requests"
                    )
                end
            end

            class Mock
                def get_all_requests
                  requests = self.data[:requests]
                  response        = Excon::Response.new
                  response.status = 200
                  response.body   = requests

                  response
                end
            end
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-profitbricks-2.0.1 lib/fog/profitbricks/requests/compute/get_all_requests.rb