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.2.0 lib/ey-core/requests/request_callback.rb
ey-core-3.1.11 lib/ey-core/requests/request_callback.rb
ey-core-3.1.10 lib/ey-core/requests/request_callback.rb
ey-core-3.1.9 lib/ey-core/requests/request_callback.rb
ey-core-3.1.8 lib/ey-core/requests/request_callback.rb
ey-core-3.1.7 lib/ey-core/requests/request_callback.rb
ey-core-3.1.6 lib/ey-core/requests/request_callback.rb
ey-core-3.1.5 lib/ey-core/requests/request_callback.rb
ey-core-3.1.4 lib/ey-core/requests/request_callback.rb
ey-core-3.1.3 lib/ey-core/requests/request_callback.rb
ey-core-3.1.2 lib/ey-core/requests/request_callback.rb
ey-core-3.1.1 lib/ey-core/requests/request_callback.rb
ey-core-3.1.0 lib/ey-core/requests/request_callback.rb
ey-core-3.0.5 lib/ey-core/requests/request_callback.rb
ey-core-3.0.4 lib/ey-core/requests/request_callback.rb
ey-core-3.0.3 lib/ey-core/requests/request_callback.rb
ey-core-3.0.2 lib/ey-core/requests/request_callback.rb
ey-core-3.0.1 lib/ey-core/requests/request_callback.rb
ey-core-3.0.0 lib/ey-core/requests/request_callback.rb