Google Cloud Billing V1 Client - Class BillingAccount (1.7.5)

Reference documentation and code samples for the Google Cloud Billing V1 Client class BillingAccount.

A billing account in the Google Cloud Console. You can assign a billing account to one or more projects.

Generated from protobuf message google.cloud.billing.v1.BillingAccount

Namespace

Google \ Cloud \ Billing \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.

↳ open bool

Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.

↳ display_name string

The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.

↳ master_billing_account string

If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.

getName

Output only. The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.

Returns
TypeDescription
string

setName

Output only. The resource name of the billing account. The resource name has the form billingAccounts/{billing_account_id}. For example, billingAccounts/012345-567890-ABCDEF would be the resource name for billing account 012345-567890-ABCDEF.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getOpen

Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.

Returns
TypeDescription
bool

setOpen

Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getDisplayName

The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.

Returns
TypeDescription
string

setDisplayName

The display name given to the billing account, such as My Billing Account. This name is displayed in the Google Cloud Console.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMasterBillingAccount

If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through.

Otherwise this will be empty.

Returns
TypeDescription
string

setMasterBillingAccount

If this account is a subaccount, then this will be the resource name of the parent billing account that it is being resold through.

Otherwise this will be empty.

Parameter
NameDescription
var string
Returns
TypeDescription
$this