blob: ea82b61b279710312671a3da7f04bf7c0f84c678 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
class CheckGcpProjectBillingService
def execute(token)
client = GoogleApi::CloudPlatform::Client.new(token, nil)
client.projects_list.select do |project|
begin
client.projects_get_billing_info(project.project_id).billing_enabled
rescue
end
end
end
end
|