Sha256: a4c4e5bea60bb561db0c0455924519434bcc568dfbcf670f635351dc4eb66cc4

Contents?: true

Size: 683 Bytes

Versions: 20

Compression:

Stored size: 683 Bytes

Contents

class Ey::Core::Client
  class Real
    def update_provider_location(params={})
      id = params.delete("id")
      request(
        :method => :put,
        :path   => "/provider-locations/#{id}",
        :body   => params,
      )
    end
  end

  class Mock
    def update_provider_location(params={})
      resource_id = params.delete("id")

      if provider_location = self.data[:provider_locations][resource_id]
        provider_location[:limits] = params["provider_location"]["limits"]

        response(
          :body   => {"provider_location" => provider_location},
          :status => 200,
        )
      else
        response(status:404)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

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