Class: Google::Apis::CloudbillingV1::BillingAccount

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudbilling_v1/classes.rb,
generated/google/apis/cloudbilling_v1/representations.rb,
generated/google/apis/cloudbilling_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ BillingAccount

Returns a new instance of BillingAccount



157
158
159
# File 'generated/google/apis/cloudbilling_v1/classes.rb', line 157

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


139
140
141
# File 'generated/google/apis/cloudbilling_v1/classes.rb', line 139

def display_name
  @display_name
end

#nameString

The resource name of the billing account. The resource name has the form billingAccounts/billing_account_id`. For example, billingAccounts/012345-567890-ABCDEFwould be the resource name for billing account012345-567890-ABCDEF. Corresponds to the JSON propertyname`

Returns:

  • (String)


155
156
157
# File 'generated/google/apis/cloudbilling_v1/classes.rb', line 155

def name
  @name
end

#openBoolean Also known as: open?

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. Corresponds to the JSON property open

Returns:

  • (Boolean)


146
147
148
# File 'generated/google/apis/cloudbilling_v1/classes.rb', line 146

def open
  @open
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



162
163
164
165
166
# File 'generated/google/apis/cloudbilling_v1/classes.rb', line 162

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @open = args[:open] if args.key?(:open)
  @name = args[:name] if args.key?(:name)
end