| 76 | * @return {bool} Whether project has billing enabled or not |
| 77 | */ |
| 78 | const _isBillingEnabled = async projectName => { |
| 79 | try { |
| 80 | const [res] = await billing.getProjectBillingInfo({name: projectName}); |
| 81 | return res.billingEnabled; |
| 82 | } catch (e) { |
| 83 | console.log( |
| 84 | 'Unable to determine if billing is enabled on specified project, assuming billing is enabled' |
| 85 | ); |
| 86 | return true; |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | /** |
| 91 | * Disable billing for a project by removing its billing account |