Module: Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb

Overview

Path helper methods for the BudgetService API.

Instance Method Summary collapse

Instance Method Details

#billing_account_path(billing_account:) ⇒ ::String

Create a fully-qualified BillingAccount resource string.

The resource will be in the following format:

billingAccounts/{billing_account}

Parameters:

  • billing_account (String)

Returns:

  • (::String)


38
39
40
# File 'lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb', line 38

def  billing_account:
  "billingAccounts/#{}"
end

#budget_path(billing_account:, budget:) ⇒ ::String

Create a fully-qualified Budget resource string.

The resource will be in the following format:

billingAccounts/{billing_account}/budgets/{budget}

Parameters:

  • billing_account (String)
  • budget (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


53
54
55
56
57
# File 'lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb', line 53

def budget_path billing_account:, budget:
  raise ::ArgumentError, "billing_account cannot contain /" if .to_s.include? "/"

  "billingAccounts/#{}/budgets/#{budget}"
end