summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-12-15 23:54:50 +0100
committerMatija Čupić <matteeyah@gmail.com>2017-12-16 00:00:52 +0100
commit957bedb1c345644f633fdfd3440491810c5cb75c (patch)
tree4a308bcb97bd699c3914031022cb65776376b879 /lib
parent596ea9e3688537131fb918c1e9177d085a938d19 (diff)
downloadgitlab-ce-957bedb1c345644f633fdfd3440491810c5cb75c.tar.gz
Add Google Cloud client project billing info
Diffstat (limited to 'lib')
-rw-r--r--lib/google_api/cloud_platform/client.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb
index f0dabcb1c5d..c107d001bec 100644
--- a/lib/google_api/cloud_platform/client.rb
+++ b/lib/google_api/cloud_platform/client.rb
@@ -1,4 +1,5 @@
require 'google/apis/container_v1'
+require 'google/apis/cloudbilling_v1'
require 'google/apis/cloudresourcemanager_v1'
module GoogleApi
@@ -50,6 +51,13 @@ module GoogleApi
end
end
+ def projects_get_billing_info(project_name)
+ service = Google::Apis::CloudbillingV1::CloudbillingService.new
+ service.authorization = access_token
+
+ service.get_project_billing_info(project_name)
+ end
+
def projects_zones_clusters_get(project_id, zone, cluster_id)
service = Google::Apis::ContainerV1::ContainerService.new
service.authorization = access_token