Class: Google::Apis::CloudbillingV1::ProjectBillingInfo
- Inherits:
-
Object
- Object
- Google::Apis::CloudbillingV1::ProjectBillingInfo
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudbilling_v1/classes.rb,
lib/google/apis/cloudbilling_v1/representations.rb,
lib/google/apis/cloudbilling_v1/representations.rb
Overview
Encapsulation of billing information for a Google Cloud Console project. A project has at most one associated billing account at a time (but a billing account can be assigned to multiple projects).
Instance Attribute Summary collapse
-
#billing_account_name ⇒ String
The resource name of the billing account associated with the project, if any.
-
#billing_enabled ⇒ Boolean
(also: #billing_enabled?)
Output only.
-
#name ⇒ String
Output only.
-
#project_id ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProjectBillingInfo
constructor
A new instance of ProjectBillingInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ProjectBillingInfo
Returns a new instance of ProjectBillingInfo.
775 776 777 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 775 def initialize(**args) update!(**args) end |
Instance Attribute Details
#billing_account_name ⇒ String
The resource name of the billing account associated with the project, if any.
For example, billingAccounts/012345-567890-ABCDEF.
Corresponds to the JSON property billingAccountName
749 750 751 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 749 def billing_account_name @billing_account_name end |
#billing_enabled ⇒ Boolean Also known as: billing_enabled?
Output only. True if the project is associated with an open billing account,
to which usage on the project is charged. False if the project is associated
with a closed billing account, or no billing account at all, and therefore
cannot use paid services. This field is read-only.
Corresponds to the JSON property billingEnabled
757 758 759 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 757 def billing_enabled @billing_enabled end |
#name ⇒ String
Output only. The resource name for the ProjectBillingInfo; has the form
projects/project_id/billingInfo. For example, the resource name for the
billing information for project tokyo-rain-123 would be projects/tokyo-rain-
123/billingInfo. This field is read-only.
Corresponds to the JSON property name
766 767 768 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 766 def name @name end |
#project_id ⇒ String
Output only. The ID of the project that this ProjectBillingInfo represents,
such as tokyo-rain-123. This is a convenience field so that you don't need
to parse the name field to obtain a project ID. This field is read-only.
Corresponds to the JSON property projectId
773 774 775 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 773 def project_id @project_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
780 781 782 783 784 785 |
# File 'lib/google/apis/cloudbilling_v1/classes.rb', line 780 def update!(**args) @billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name) @billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled) @name = args[:name] if args.key?(:name) @project_id = args[:project_id] if args.key?(:project_id) end |