diff --git a/packages/google-cloud-billing/README.md b/packages/google-cloud-billing/README.md index 9215964863f..e63a43939c8 100644 --- a/packages/google-cloud-billing/README.md +++ b/packages/google-cloud-billing/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Billing API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -171,4 +171,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudbilling.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto index 4c740311648..8d05a162640 100644 --- a/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto +++ b/packages/google-cloud-billing/protos/google/cloud/billing/v1/cloud_billing.proto @@ -285,6 +285,17 @@ message BillingAccount { // - `billingAccounts/{billing_account_id}`, for example, // `billingAccounts/012345-567890-ABCDEF` string parent = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The currency in which the billing account is billed and charged, + // represented as an ISO 4217 code such as `USD`. + // + // Billing account currency is determined at the time of billing account + // creation and cannot be updated subsequently, so this field should not be + // set on update requests. In addition, a subaccount always matches the + // currency of its parent billing account, so this field should not be set on + // subaccount creation requests. Clients can read this field to determine the + // currency of an existing billing account. + string currency_code = 7 [(google.api.field_behavior) = OPTIONAL]; } // Encapsulation of billing information for a Google Cloud Console project. A diff --git a/packages/google-cloud-billing/protos/protos.d.ts b/packages/google-cloud-billing/protos/protos.d.ts index b408ded0e91..f8c31a952c9 100644 --- a/packages/google-cloud-billing/protos/protos.d.ts +++ b/packages/google-cloud-billing/protos/protos.d.ts @@ -298,6 +298,9 @@ export namespace google { /** BillingAccount parent */ parent?: (string|null); + + /** BillingAccount currencyCode */ + currencyCode?: (string|null); } /** Represents a BillingAccount. */ @@ -324,6 +327,9 @@ export namespace google { /** BillingAccount parent. */ public parent: string; + /** BillingAccount currencyCode. */ + public currencyCode: string; + /** * Creates a new BillingAccount instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-billing/protos/protos.js b/packages/google-cloud-billing/protos/protos.js index 1f88118a369..f9685dcdcc4 100644 --- a/packages/google-cloud-billing/protos/protos.js +++ b/packages/google-cloud-billing/protos/protos.js @@ -475,6 +475,7 @@ * @property {string|null} [displayName] BillingAccount displayName * @property {string|null} [masterBillingAccount] BillingAccount masterBillingAccount * @property {string|null} [parent] BillingAccount parent + * @property {string|null} [currencyCode] BillingAccount currencyCode */ /** @@ -532,6 +533,14 @@ */ BillingAccount.prototype.parent = ""; + /** + * BillingAccount currencyCode. + * @member {string} currencyCode + * @memberof google.cloud.billing.v1.BillingAccount + * @instance + */ + BillingAccount.prototype.currencyCode = ""; + /** * Creates a new BillingAccount instance using the specified properties. * @function create @@ -566,6 +575,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.masterBillingAccount); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.parent); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.currencyCode); return writer; }; @@ -620,6 +631,10 @@ message.parent = reader.string(); break; } + case 7: { + message.currencyCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -670,6 +685,9 @@ if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; return null; }; @@ -695,6 +713,8 @@ message.masterBillingAccount = String(object.masterBillingAccount); if (object.parent != null) message.parent = String(object.parent); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); return message; }; @@ -717,6 +737,7 @@ object.displayName = ""; object.masterBillingAccount = ""; object.parent = ""; + object.currencyCode = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -728,6 +749,8 @@ object.masterBillingAccount = message.masterBillingAccount; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; return object; }; diff --git a/packages/google-cloud-billing/protos/protos.json b/packages/google-cloud-billing/protos/protos.json index 800aea7f992..5d3675f377e 100644 --- a/packages/google-cloud-billing/protos/protos.json +++ b/packages/google-cloud-billing/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -300,6 +303,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "currencyCode": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } },