Sha256: b8451734f26c3ad32e4c350de87dfce0f8da5a791efe238baa1d3eeb08888f99

Contents?: true

Size: 722 Bytes

Versions: 54

Compression:

Stored size: 722 Bytes

Contents

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

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

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

      response(
        :body   => { "database_plan_usages" => self.find(:database_plan_usages, account_id)[billing_month] || [] },
        :status => 200,
      )
    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/get_database_plan_usages.rb
ey-core-3.6.4 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.6.3 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.6.1 lib/ey-core/requests/get_database_plan_usages.rb
groove-ey-core-3.6.3 lib/ey-core/requests/get_database_plan_usages.rb
groove-ey-core-3.6.2 lib/ey-core/requests/get_database_plan_usages.rb
groove-ey-core-3.6.1 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.5.0 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.4.4 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.4.2 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.4.1 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.4.0 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.3.1 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.3.0 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.6 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.5 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.4 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.3 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.2 lib/ey-core/requests/get_database_plan_usages.rb
ey-core-3.2.1 lib/ey-core/requests/get_database_plan_usages.rb