Sha256: e6b98b887eb78581a1c9aadafa7a66cb41dbe66b0bf466a98df62829c14f265d

Contents?: true

Size: 530 Bytes

Versions: 39

Compression:

Stored size: 530 Bytes

Contents

class Ey::Core::Client
  class Real
    def request_callback(options={})
      (url = options["url"]) || (id = options.fetch("id"))

      request(
        :path   => "/requests/#{id}/callback",
        :method => :post,
        :url    => url,
      )
    end
  end

  class Mock
    def request_callback(options={})
      request_id = resource_identity(options)

      request = find(:requests, request_id).dup
      request.delete("resource")

      response(
        :body => {"request" => request},
      )
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

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