Sha256: fd10411b1ca6b42b26674ba588b8bb7348bcf34aa9f0d28b602d7cc600ca3f7b

Contents?: true

Size: 569 Bytes

Versions: 54

Compression:

Stored size: 569 Bytes

Contents

class Ey::Core::Client
  class Real
    def update_billing(params={})
      id = params.delete("id") or raise "ID needed"
      request(
        :method => :put,
        :path   => "/accounts/#{id}/billing",
        :params => params,
      )
    end
  end # Real

  class Mock
    def update_billing(params={})
      id = params["id"]
      state = params["state"]
      self.find(:accounts, id)

      self.data[:billing][id] = state

      response(
        :body => {"billing" => {"id" => id, "state" => state}},
      )
    end
  end # Mock
end # Ey::Core::Client

Version data entries

54 entries across 54 versions & 3 rubygems

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