Sha256: fa0b019f61a474333cf900770288e889aff22019e3a1c832618584c742f72261

Contents?: true

Size: 732 Bytes

Versions: 53

Compression:

Stored size: 732 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_database_server_usages(params={})
      account_id    = params["account_id"]
      billing_month = params.fetch("billing_month", Date.today.strftime("%Y-%m"))

      request(
        :path => "accounts/#{account_id}/database-server-usages/#{billing_month}"
      )
    end
  end # Real

  class Mock
    def get_database_server_usages(params={})
      account_id    = params["account_id"]
      billing_month = params.fetch("billing_month", Date.today.strftime("%Y-%m"))

      response(
        :body   => { "database_server_usages" => self.find(:database_server_usages, account_id)[billing_month] || [] },
        :status => 200,
      )
    end
  end # Mock
end # Ey::Core::Client

Version data entries

53 entries across 53 versions & 3 rubygems

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