Class: QuotaService::QuotaService
- Inherits:
-
AuthenticatedService
- Object
- Handsoap::Service
- BasicService
- AuthenticatedService
- QuotaService::QuotaService
- Defined in:
- lib/quota_service/quota_service.rb
Overview
Client to access the developer garden quota service.
See also:
Constant Summary collapse
- @@QUOTA_SERVICE_ENDPOINT =
{ :uri => "https://gateway.developer.telekom.com/p3gw-mod-odg-admin/services/ODGBaseUserService", :version => 1 }
Instance Method Summary collapse
-
#change_quota_pool(module_id = "VoiceButlerSandbox", quota_max = 100) ⇒ Object
- Changes the quota for a particular service ===Parameters
module_id
- module_id of the service for which a quota request to be made, such as “VoiceButlerProduction”
quota_max
-
Quota limit to be set.
- module_id of the service for which a quota request to be made, such as “VoiceButlerProduction”
- Changes the quota for a particular service ===Parameters
-
#get_quota_information(module_id = "VoiceButlerSandbox") ⇒ Object
Get the amount of remaining quota points.
Methods inherited from AuthenticatedService
#initialize, #invoke_authenticated
Methods inherited from BasicService
Constructor Details
This class inherits a constructor from AuthenticatedService
Instance Method Details
#change_quota_pool(module_id = "VoiceButlerSandbox", quota_max = 100) ⇒ Object
Changes the quota for a particular service
Parameters
module_id
-
module_id of the service for which a quota request to be made, such as “VoiceButlerProduction”
quota_max
-
Quota limit to be set
43 44 45 46 47 48 49 50 51 |
# File 'lib/quota_service/quota_service.rb', line 43 def change_quota_pool(module_id = "VoiceButlerSandbox", quota_max = 100) response = invoke_authenticated("changeQuotaPool") do |, doc| .add('moduleId', module_id) .add('quotaMax', quota_max) end return BasicResponse.new(response) end |
#get_quota_information(module_id = "VoiceButlerSandbox") ⇒ Object
Get the amount of remaining quota points.
Parameters
module_id
-
module_id of the service for which a quota request to be made, such as “VoiceButlerProduction”
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/quota_service/quota_service.rb', line 28 def get_quota_information(module_id = "VoiceButlerSandbox") response = invoke_authenticated("getQuotaInformation") do |, doc| .add('moduleId', module_id) end quota_info = QuotaInformation.new(response) return quota_info end |