Class: Google::Apis::CloudbillingV1beta::CloudbillingService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudbillingV1beta::CloudbillingService
- Defined in:
- lib/google/apis/cloudbilling_v1beta/service.rb
Overview
Cloud Billing API
Allows developers to manage billing for their Google Cloud Platform projects programmatically.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#estimate_cost_scenario_for_billing_account(billing_account, estimate_cost_scenario_for_billing_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbillingV1beta::EstimateCostScenarioForBillingAccountResponse
Use custom pricing in the estimate, using a
CostScenariowith a definedbillingAccount. -
#estimate_cost_scenario_with_list_price(estimate_cost_scenario_with_list_price_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbillingV1beta::EstimateCostScenarioWithListPriceResponse
Estimate list prices using a
CostScenariowithout a definedbillingAccount. -
#initialize ⇒ CloudbillingService
constructor
A new instance of CloudbillingService.
Constructor Details
#initialize ⇒ CloudbillingService
Returns a new instance of CloudbillingService.
46 47 48 49 50 51 |
# File 'lib/google/apis/cloudbilling_v1beta/service.rb', line 46 def initialize super('https://cloudbilling.googleapis.com/', '', client_name: 'google-apis-cloudbilling_v1beta', client_version: Google::Apis::CloudbillingV1beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'lib/google/apis/cloudbilling_v1beta/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44 45 46 |
# File 'lib/google/apis/cloudbilling_v1beta/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#estimate_cost_scenario_for_billing_account(billing_account, estimate_cost_scenario_for_billing_account_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbillingV1beta::EstimateCostScenarioForBillingAccountResponse
Use custom pricing in the estimate, using a CostScenario with a defined
billingAccount.
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/google/apis/cloudbilling_v1beta/service.rb', line 78 def estimate_cost_scenario_for_billing_account(billing_account, estimate_cost_scenario_for_billing_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/{+billingAccount}:estimateCostScenario', ) command.request_representation = Google::Apis::CloudbillingV1beta::EstimateCostScenarioForBillingAccountRequest::Representation command.request_object = estimate_cost_scenario_for_billing_account_request_object command.response_representation = Google::Apis::CloudbillingV1beta::EstimateCostScenarioForBillingAccountResponse::Representation command.response_class = Google::Apis::CloudbillingV1beta::EstimateCostScenarioForBillingAccountResponse command.params['billingAccount'] = billing_account unless billing_account.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#estimate_cost_scenario_with_list_price(estimate_cost_scenario_with_list_price_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudbillingV1beta::EstimateCostScenarioWithListPriceResponse
Estimate list prices using a CostScenario without a defined billingAccount.
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/google/apis/cloudbilling_v1beta/service.rb', line 109 def estimate_cost_scenario_with_list_price(estimate_cost_scenario_with_list_price_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta:estimateCostScenario', ) command.request_representation = Google::Apis::CloudbillingV1beta::EstimateCostScenarioWithListPriceRequest::Representation command.request_object = estimate_cost_scenario_with_list_price_request_object command.response_representation = Google::Apis::CloudbillingV1beta::EstimateCostScenarioWithListPriceResponse::Representation command.response_class = Google::Apis::CloudbillingV1beta::EstimateCostScenarioWithListPriceResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |