@azure/arm-billing 2.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +75 -73
- package/dist/index.js +10450 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/billingManagementClient.d.ts +37 -0
- package/dist-esm/src/billingManagementClient.d.ts.map +1 -0
- package/dist-esm/src/billingManagementClient.js +70 -0
- package/dist-esm/src/billingManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +3244 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +272 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +86 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +3514 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +45 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +374 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/address.d.ts +20 -0
- package/dist-esm/src/operations/address.d.ts.map +1 -0
- package/dist-esm/src/operations/address.js +50 -0
- package/dist-esm/src/operations/address.js.map +1 -0
- package/dist-esm/src/operations/agreements.d.ts +42 -0
- package/dist-esm/src/operations/agreements.d.ts.map +1 -0
- package/dist-esm/src/operations/agreements.js +156 -0
- package/dist-esm/src/operations/agreements.js.map +1 -0
- package/dist-esm/src/operations/availableBalances.d.ts +22 -0
- package/dist-esm/src/operations/availableBalances.d.ts.map +1 -0
- package/dist-esm/src/operations/availableBalances.js +54 -0
- package/dist-esm/src/operations/availableBalances.js.map +1 -0
- package/dist-esm/src/operations/billingAccounts.d.ts +79 -0
- package/dist-esm/src/operations/billingAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/billingAccounts.js +330 -0
- package/dist-esm/src/operations/billingAccounts.js.map +1 -0
- package/dist-esm/src/operations/billingPeriods.d.ts +44 -0
- package/dist-esm/src/operations/billingPeriods.d.ts.map +1 -0
- package/dist-esm/src/operations/billingPeriods.js +168 -0
- package/dist-esm/src/operations/billingPeriods.js.map +1 -0
- package/dist-esm/src/operations/billingPermissions.d.ts +110 -0
- package/dist-esm/src/operations/billingPermissions.d.ts.map +1 -0
- package/dist-esm/src/operations/billingPermissions.js +468 -0
- package/dist-esm/src/operations/billingPermissions.js.map +1 -0
- package/dist-esm/src/operations/billingProfiles.d.ts +64 -0
- package/dist-esm/src/operations/billingProfiles.d.ts.map +1 -0
- package/dist-esm/src/operations/billingProfiles.js +245 -0
- package/dist-esm/src/operations/billingProfiles.js.map +1 -0
- package/dist-esm/src/operations/billingPropertyOperations.d.ts +26 -0
- package/dist-esm/src/operations/billingPropertyOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/billingPropertyOperations.js +74 -0
- package/dist-esm/src/operations/billingPropertyOperations.js.map +1 -0
- package/dist-esm/src/operations/billingRoleAssignments.d.ts +146 -0
- package/dist-esm/src/operations/billingRoleAssignments.d.ts.map +1 -0
- package/dist-esm/src/operations/billingRoleAssignments.js +578 -0
- package/dist-esm/src/operations/billingRoleAssignments.js.map +1 -0
- package/dist-esm/src/operations/billingRoleDefinitions.d.ts +119 -0
- package/dist-esm/src/operations/billingRoleDefinitions.d.ts.map +1 -0
- package/dist-esm/src/operations/billingRoleDefinitions.js +471 -0
- package/dist-esm/src/operations/billingRoleDefinitions.js.map +1 -0
- package/dist-esm/src/operations/billingSubscriptions.d.ts +160 -0
- package/dist-esm/src/operations/billingSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/billingSubscriptions.js +655 -0
- package/dist-esm/src/operations/billingSubscriptions.js.map +1 -0
- package/dist-esm/src/operations/customers.d.ts +71 -0
- package/dist-esm/src/operations/customers.d.ts.map +1 -0
- package/dist-esm/src/operations/customers.js +287 -0
- package/dist-esm/src/operations/customers.js.map +1 -0
- package/dist-esm/src/operations/enrollmentAccounts.d.ts +38 -0
- package/dist-esm/src/operations/enrollmentAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/enrollmentAccounts.js +144 -0
- package/dist-esm/src/operations/enrollmentAccounts.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +22 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +29 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/instructions.d.ts +57 -0
- package/dist-esm/src/operations/instructions.d.ts.map +1 -0
- package/dist-esm/src/operations/instructions.js +208 -0
- package/dist-esm/src/operations/instructions.js.map +1 -0
- package/dist-esm/src/operations/invoiceSections.d.ts +70 -0
- package/dist-esm/src/operations/invoiceSections.d.ts.map +1 -0
- package/dist-esm/src/operations/invoiceSections.js +264 -0
- package/dist-esm/src/operations/invoiceSections.js.map +1 -0
- package/dist-esm/src/operations/invoices.d.ts +202 -0
- package/dist-esm/src/operations/invoices.d.ts.map +1 -0
- package/dist-esm/src/operations/invoices.js +817 -0
- package/dist-esm/src/operations/invoices.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/policies.d.ts +47 -0
- package/dist-esm/src/operations/policies.d.ts.map +1 -0
- package/dist-esm/src/operations/policies.js +149 -0
- package/dist-esm/src/operations/policies.js.map +1 -0
- package/dist-esm/src/operations/products.d.ts +160 -0
- package/dist-esm/src/operations/products.d.ts.map +1 -0
- package/dist-esm/src/operations/products.js +615 -0
- package/dist-esm/src/operations/products.js.map +1 -0
- package/dist-esm/src/operations/reservations.d.ts +63 -0
- package/dist-esm/src/operations/reservations.d.ts.map +1 -0
- package/dist-esm/src/operations/reservations.js +265 -0
- package/dist-esm/src/operations/reservations.js.map +1 -0
- package/dist-esm/src/operations/transactions.d.ts +40 -0
- package/dist-esm/src/operations/transactions.d.ts.map +1 -0
- package/dist-esm/src/operations/transactions.js +137 -0
- package/dist-esm/src/operations/transactions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/address.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/address.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/address.js +9 -0
- package/dist-esm/src/operationsInterfaces/address.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/agreements.d.ts +19 -0
- package/dist-esm/src/operationsInterfaces/agreements.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/agreements.js +9 -0
- package/dist-esm/src/operationsInterfaces/agreements.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableBalances.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/availableBalances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableBalances.js +9 -0
- package/dist-esm/src/operationsInterfaces/availableBalances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingAccounts.d.ts +41 -0
- package/dist-esm/src/operationsInterfaces/billingAccounts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingAccounts.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPeriods.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/billingPeriods.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPeriods.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingPeriods.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPermissions.d.ts +34 -0
- package/dist-esm/src/operationsInterfaces/billingPermissions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPermissions.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingPermissions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingProfiles.d.ts +40 -0
- package/dist-esm/src/operationsInterfaces/billingProfiles.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingProfiles.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingProfiles.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPropertyOperations.d.ts +18 -0
- package/dist-esm/src/operationsInterfaces/billingPropertyOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingPropertyOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingPropertyOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingRoleAssignments.d.ts +84 -0
- package/dist-esm/src/operationsInterfaces/billingRoleAssignments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingRoleAssignments.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingRoleAssignments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.d.ts +57 -0
- package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingSubscriptions.d.ts +80 -0
- package/dist-esm/src/operationsInterfaces/billingSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/customers.d.ts +29 -0
- package/dist-esm/src/operationsInterfaces/customers.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/customers.js +9 -0
- package/dist-esm/src/operationsInterfaces/customers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/enrollmentAccounts.d.ts +17 -0
- package/dist-esm/src/operationsInterfaces/enrollmentAccounts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/enrollmentAccounts.js +9 -0
- package/dist-esm/src/operationsInterfaces/enrollmentAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +22 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +29 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/instructions.d.ts +32 -0
- package/dist-esm/src/operationsInterfaces/instructions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/instructions.js +9 -0
- package/dist-esm/src/operationsInterfaces/instructions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/invoiceSections.d.ts +44 -0
- package/dist-esm/src/operationsInterfaces/invoiceSections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/invoiceSections.js +9 -0
- package/dist-esm/src/operationsInterfaces/invoiceSections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/invoices.d.ts +124 -0
- package/dist-esm/src/operationsInterfaces/invoices.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/invoices.js +9 -0
- package/dist-esm/src/operationsInterfaces/invoices.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts +39 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.js +9 -0
- package/dist-esm/src/operationsInterfaces/policies.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/products.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/products.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/products.js +9 -0
- package/dist-esm/src/operationsInterfaces/products.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/reservations.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/reservations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/reservations.js +9 -0
- package/dist-esm/src/operationsInterfaces/reservations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/transactions.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/transactions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/transactions.js +9 -0
- package/dist-esm/src/operationsInterfaces/transactions.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +70 -34
- package/review/arm-billing.api.md +2361 -0
- package/rollup.config.js +184 -27
- package/src/billingManagementClient.ts +157 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +3657 -0
- package/src/models/mappers.ts +3839 -0
- package/src/models/parameters.ts +435 -0
- package/src/operations/address.ts +68 -0
- package/src/operations/agreements.ts +203 -0
- package/src/operations/availableBalances.ts +73 -0
- package/src/operations/billingAccounts.ts +433 -0
- package/src/operations/billingPeriods.ts +196 -0
- package/src/operations/billingPermissions.ts +643 -0
- package/src/operations/billingProfiles.ts +334 -0
- package/src/operations/billingPropertyOperations.ts +100 -0
- package/src/operations/billingRoleAssignments.ts +782 -0
- package/src/operations/billingRoleDefinitions.ts +639 -0
- package/src/operations/billingSubscriptions.ts +902 -0
- package/src/operations/customers.ts +377 -0
- package/src/operations/enrollmentAccounts.ts +170 -0
- package/src/operations/index.ts +29 -0
- package/src/operations/instructions.ts +285 -0
- package/src/operations/invoiceSections.ts +373 -0
- package/src/operations/invoices.ts +1176 -0
- package/src/operations/operations.ts +137 -0
- package/src/operations/policies.ts +205 -0
- package/src/operations/products.ts +838 -0
- package/src/operations/reservations.ts +344 -0
- package/src/operations/transactions.ts +189 -0
- package/src/operationsInterfaces/address.ts +27 -0
- package/src/operationsInterfaces/agreements.ts +40 -0
- package/src/operationsInterfaces/availableBalances.ts +29 -0
- package/src/operationsInterfaces/billingAccounts.ts +81 -0
- package/src/operationsInterfaces/billingPeriods.ts +40 -0
- package/src/operationsInterfaces/billingPermissions.ts +65 -0
- package/src/operationsInterfaces/billingProfiles.ts +78 -0
- package/src/operationsInterfaces/billingPropertyOperations.ts +37 -0
- package/src/operationsInterfaces/billingRoleAssignments.ts +152 -0
- package/src/operationsInterfaces/billingRoleDefinitions.ts +104 -0
- package/src/operationsInterfaces/billingSubscriptions.ts +144 -0
- package/src/operationsInterfaces/customers.ts +55 -0
- package/src/operationsInterfaces/enrollmentAccounts.ts +36 -0
- package/src/operationsInterfaces/index.ts +29 -0
- package/src/operationsInterfaces/instructions.ts +63 -0
- package/src/operationsInterfaces/invoiceSections.ts +86 -0
- package/src/operationsInterfaces/invoices.ts +233 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/policies.ts +76 -0
- package/src/operationsInterfaces/products.ts +137 -0
- package/src/operationsInterfaces/reservations.ts +41 -0
- package/src/operationsInterfaces/transactions.ts +30 -0
- package/tsconfig.json +4 -4
- package/types/arm-billing.d.ts +4451 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-billing.js +0 -1188
- package/dist/arm-billing.js.map +0 -1
- package/dist/arm-billing.min.js +0 -1
- package/dist/arm-billing.min.js.map +0 -1
- package/esm/billingManagementClient.d.ts +0 -21
- package/esm/billingManagementClient.d.ts.map +0 -1
- package/esm/billingManagementClient.js +0 -36
- package/esm/billingManagementClient.js.map +0 -1
- package/esm/billingManagementClientContext.d.ts +0 -16
- package/esm/billingManagementClientContext.d.ts.map +0 -1
- package/esm/billingManagementClientContext.js +0 -56
- package/esm/billingManagementClientContext.js.map +0 -1
- package/esm/models/billingPeriodsMappers.d.ts +0 -2
- package/esm/models/billingPeriodsMappers.d.ts.map +0 -1
- package/esm/models/billingPeriodsMappers.js +0 -11
- package/esm/models/billingPeriodsMappers.js.map +0 -1
- package/esm/models/enrollmentAccountsMappers.d.ts +0 -2
- package/esm/models/enrollmentAccountsMappers.d.ts.map +0 -1
- package/esm/models/enrollmentAccountsMappers.js +0 -11
- package/esm/models/enrollmentAccountsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -573
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/invoicesMappers.d.ts +0 -2
- package/esm/models/invoicesMappers.d.ts.map +0 -1
- package/esm/models/invoicesMappers.js +0 -11
- package/esm/models/invoicesMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -17
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -364
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -13
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -133
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/billingPeriods.d.ts +0 -70
- package/esm/operations/billingPeriods.d.ts.map +0 -1
- package/esm/operations/billingPeriods.js +0 -112
- package/esm/operations/billingPeriods.js.map +0 -1
- package/esm/operations/enrollmentAccounts.d.ts +0 -64
- package/esm/operations/enrollmentAccounts.d.ts.map +0 -1
- package/esm/operations/enrollmentAccounts.js +0 -105
- package/esm/operations/enrollmentAccounts.js.map +0 -1
- package/esm/operations/index.d.ts +0 -5
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -14
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/invoices.d.ts +0 -93
- package/esm/operations/invoices.d.ts.map +0 -1
- package/esm/operations/invoices.js +0 -140
- package/esm/operations/invoices.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/lib/billingManagementClient.ts +0 -48
- package/lib/billingManagementClientContext.ts +0 -62
- package/lib/models/billingPeriodsMappers.ts +0 -22
- package/lib/models/enrollmentAccountsMappers.ts +0 -22
- package/lib/models/index.ts +0 -613
- package/lib/models/invoicesMappers.ts +0 -22
- package/lib/models/mappers.ts +0 -392
- package/lib/models/operationsMappers.ts +0 -18
- package/lib/models/parameters.ts +0 -135
- package/lib/operations/billingPeriods.ts +0 -187
- package/lib/operations/enrollmentAccounts.ts +0 -174
- package/lib/operations/index.ts +0 -14
- package/lib/operations/invoices.ts +0 -243
- package/lib/operations/operations.ts +0 -123
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { BillingProfiles } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { BillingManagementClient } from "../billingManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
BillingProfile,
|
|
19
|
+
BillingProfilesListByBillingAccountNextOptionalParams,
|
|
20
|
+
BillingProfilesListByBillingAccountOptionalParams,
|
|
21
|
+
BillingProfilesListByBillingAccountResponse,
|
|
22
|
+
BillingProfilesGetOptionalParams,
|
|
23
|
+
BillingProfilesGetResponse,
|
|
24
|
+
BillingProfilesCreateOrUpdateOptionalParams,
|
|
25
|
+
BillingProfilesCreateOrUpdateResponse,
|
|
26
|
+
BillingProfilesListByBillingAccountNextResponse
|
|
27
|
+
} from "../models";
|
|
28
|
+
|
|
29
|
+
/// <reference lib="esnext.asynciterable" />
|
|
30
|
+
/** Class containing BillingProfiles operations. */
|
|
31
|
+
export class BillingProfilesImpl implements BillingProfiles {
|
|
32
|
+
private readonly client: BillingManagementClient;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initialize a new instance of the class BillingProfiles class.
|
|
36
|
+
* @param client Reference to the service client
|
|
37
|
+
*/
|
|
38
|
+
constructor(client: BillingManagementClient) {
|
|
39
|
+
this.client = client;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Lists the billing profiles that a user has access to. The operation is supported for billing
|
|
44
|
+
* accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
45
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
46
|
+
* @param options The options parameters.
|
|
47
|
+
*/
|
|
48
|
+
public listByBillingAccount(
|
|
49
|
+
billingAccountName: string,
|
|
50
|
+
options?: BillingProfilesListByBillingAccountOptionalParams
|
|
51
|
+
): PagedAsyncIterableIterator<BillingProfile> {
|
|
52
|
+
const iter = this.listByBillingAccountPagingAll(
|
|
53
|
+
billingAccountName,
|
|
54
|
+
options
|
|
55
|
+
);
|
|
56
|
+
return {
|
|
57
|
+
next() {
|
|
58
|
+
return iter.next();
|
|
59
|
+
},
|
|
60
|
+
[Symbol.asyncIterator]() {
|
|
61
|
+
return this;
|
|
62
|
+
},
|
|
63
|
+
byPage: () => {
|
|
64
|
+
return this.listByBillingAccountPagingPage(billingAccountName, options);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private async *listByBillingAccountPagingPage(
|
|
70
|
+
billingAccountName: string,
|
|
71
|
+
options?: BillingProfilesListByBillingAccountOptionalParams
|
|
72
|
+
): AsyncIterableIterator<BillingProfile[]> {
|
|
73
|
+
let result = await this._listByBillingAccount(billingAccountName, options);
|
|
74
|
+
yield result.value || [];
|
|
75
|
+
let continuationToken = result.nextLink;
|
|
76
|
+
while (continuationToken) {
|
|
77
|
+
result = await this._listByBillingAccountNext(
|
|
78
|
+
billingAccountName,
|
|
79
|
+
continuationToken,
|
|
80
|
+
options
|
|
81
|
+
);
|
|
82
|
+
continuationToken = result.nextLink;
|
|
83
|
+
yield result.value || [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private async *listByBillingAccountPagingAll(
|
|
88
|
+
billingAccountName: string,
|
|
89
|
+
options?: BillingProfilesListByBillingAccountOptionalParams
|
|
90
|
+
): AsyncIterableIterator<BillingProfile> {
|
|
91
|
+
for await (const page of this.listByBillingAccountPagingPage(
|
|
92
|
+
billingAccountName,
|
|
93
|
+
options
|
|
94
|
+
)) {
|
|
95
|
+
yield* page;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Lists the billing profiles that a user has access to. The operation is supported for billing
|
|
101
|
+
* accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
102
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
103
|
+
* @param options The options parameters.
|
|
104
|
+
*/
|
|
105
|
+
private _listByBillingAccount(
|
|
106
|
+
billingAccountName: string,
|
|
107
|
+
options?: BillingProfilesListByBillingAccountOptionalParams
|
|
108
|
+
): Promise<BillingProfilesListByBillingAccountResponse> {
|
|
109
|
+
return this.client.sendOperationRequest(
|
|
110
|
+
{ billingAccountName, options },
|
|
111
|
+
listByBillingAccountOperationSpec
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Gets a billing profile by its ID. The operation is supported for billing accounts with agreement
|
|
117
|
+
* type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
118
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
119
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
120
|
+
* @param options The options parameters.
|
|
121
|
+
*/
|
|
122
|
+
get(
|
|
123
|
+
billingAccountName: string,
|
|
124
|
+
billingProfileName: string,
|
|
125
|
+
options?: BillingProfilesGetOptionalParams
|
|
126
|
+
): Promise<BillingProfilesGetResponse> {
|
|
127
|
+
return this.client.sendOperationRequest(
|
|
128
|
+
{ billingAccountName, billingProfileName, options },
|
|
129
|
+
getOperationSpec
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Creates or updates a billing profile. The operation is supported for billing accounts with agreement
|
|
135
|
+
* type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
136
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
137
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
138
|
+
* @param parameters The new or updated billing profile.
|
|
139
|
+
* @param options The options parameters.
|
|
140
|
+
*/
|
|
141
|
+
async beginCreateOrUpdate(
|
|
142
|
+
billingAccountName: string,
|
|
143
|
+
billingProfileName: string,
|
|
144
|
+
parameters: BillingProfile,
|
|
145
|
+
options?: BillingProfilesCreateOrUpdateOptionalParams
|
|
146
|
+
): Promise<
|
|
147
|
+
PollerLike<
|
|
148
|
+
PollOperationState<BillingProfilesCreateOrUpdateResponse>,
|
|
149
|
+
BillingProfilesCreateOrUpdateResponse
|
|
150
|
+
>
|
|
151
|
+
> {
|
|
152
|
+
const directSendOperation = async (
|
|
153
|
+
args: coreClient.OperationArguments,
|
|
154
|
+
spec: coreClient.OperationSpec
|
|
155
|
+
): Promise<BillingProfilesCreateOrUpdateResponse> => {
|
|
156
|
+
return this.client.sendOperationRequest(args, spec);
|
|
157
|
+
};
|
|
158
|
+
const sendOperation = async (
|
|
159
|
+
args: coreClient.OperationArguments,
|
|
160
|
+
spec: coreClient.OperationSpec
|
|
161
|
+
) => {
|
|
162
|
+
let currentRawResponse:
|
|
163
|
+
| coreClient.FullOperationResponse
|
|
164
|
+
| undefined = undefined;
|
|
165
|
+
const providedCallback = args.options?.onResponse;
|
|
166
|
+
const callback: coreClient.RawResponseCallback = (
|
|
167
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
168
|
+
flatResponse: unknown
|
|
169
|
+
) => {
|
|
170
|
+
currentRawResponse = rawResponse;
|
|
171
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
172
|
+
};
|
|
173
|
+
const updatedArgs = {
|
|
174
|
+
...args,
|
|
175
|
+
options: {
|
|
176
|
+
...args.options,
|
|
177
|
+
onResponse: callback
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
181
|
+
return {
|
|
182
|
+
flatResponse,
|
|
183
|
+
rawResponse: {
|
|
184
|
+
statusCode: currentRawResponse!.status,
|
|
185
|
+
body: currentRawResponse!.parsedBody,
|
|
186
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
const lro = new LroImpl(
|
|
192
|
+
sendOperation,
|
|
193
|
+
{ billingAccountName, billingProfileName, parameters, options },
|
|
194
|
+
createOrUpdateOperationSpec
|
|
195
|
+
);
|
|
196
|
+
return new LroEngine(lro, {
|
|
197
|
+
resumeFrom: options?.resumeFrom,
|
|
198
|
+
intervalInMs: options?.updateIntervalInMs
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Creates or updates a billing profile. The operation is supported for billing accounts with agreement
|
|
204
|
+
* type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
205
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
206
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
207
|
+
* @param parameters The new or updated billing profile.
|
|
208
|
+
* @param options The options parameters.
|
|
209
|
+
*/
|
|
210
|
+
async beginCreateOrUpdateAndWait(
|
|
211
|
+
billingAccountName: string,
|
|
212
|
+
billingProfileName: string,
|
|
213
|
+
parameters: BillingProfile,
|
|
214
|
+
options?: BillingProfilesCreateOrUpdateOptionalParams
|
|
215
|
+
): Promise<BillingProfilesCreateOrUpdateResponse> {
|
|
216
|
+
const poller = await this.beginCreateOrUpdate(
|
|
217
|
+
billingAccountName,
|
|
218
|
+
billingProfileName,
|
|
219
|
+
parameters,
|
|
220
|
+
options
|
|
221
|
+
);
|
|
222
|
+
return poller.pollUntilDone();
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* ListByBillingAccountNext
|
|
227
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
228
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.
|
|
229
|
+
* @param options The options parameters.
|
|
230
|
+
*/
|
|
231
|
+
private _listByBillingAccountNext(
|
|
232
|
+
billingAccountName: string,
|
|
233
|
+
nextLink: string,
|
|
234
|
+
options?: BillingProfilesListByBillingAccountNextOptionalParams
|
|
235
|
+
): Promise<BillingProfilesListByBillingAccountNextResponse> {
|
|
236
|
+
return this.client.sendOperationRequest(
|
|
237
|
+
{ billingAccountName, nextLink, options },
|
|
238
|
+
listByBillingAccountNextOperationSpec
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// Operation Specifications
|
|
243
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
244
|
+
|
|
245
|
+
const listByBillingAccountOperationSpec: coreClient.OperationSpec = {
|
|
246
|
+
path:
|
|
247
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles",
|
|
248
|
+
httpMethod: "GET",
|
|
249
|
+
responses: {
|
|
250
|
+
200: {
|
|
251
|
+
bodyMapper: Mappers.BillingProfileListResult
|
|
252
|
+
},
|
|
253
|
+
default: {
|
|
254
|
+
bodyMapper: Mappers.ErrorResponse
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
258
|
+
urlParameters: [Parameters.$host, Parameters.billingAccountName],
|
|
259
|
+
headerParameters: [Parameters.accept],
|
|
260
|
+
serializer
|
|
261
|
+
};
|
|
262
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
263
|
+
path:
|
|
264
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
|
|
265
|
+
httpMethod: "GET",
|
|
266
|
+
responses: {
|
|
267
|
+
200: {
|
|
268
|
+
bodyMapper: Mappers.BillingProfile
|
|
269
|
+
},
|
|
270
|
+
default: {
|
|
271
|
+
bodyMapper: Mappers.ErrorResponse
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
275
|
+
urlParameters: [
|
|
276
|
+
Parameters.$host,
|
|
277
|
+
Parameters.billingAccountName,
|
|
278
|
+
Parameters.billingProfileName
|
|
279
|
+
],
|
|
280
|
+
headerParameters: [Parameters.accept],
|
|
281
|
+
serializer
|
|
282
|
+
};
|
|
283
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
284
|
+
path:
|
|
285
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
|
|
286
|
+
httpMethod: "PUT",
|
|
287
|
+
responses: {
|
|
288
|
+
200: {
|
|
289
|
+
bodyMapper: Mappers.BillingProfile
|
|
290
|
+
},
|
|
291
|
+
201: {
|
|
292
|
+
bodyMapper: Mappers.BillingProfile
|
|
293
|
+
},
|
|
294
|
+
202: {
|
|
295
|
+
bodyMapper: Mappers.BillingProfile
|
|
296
|
+
},
|
|
297
|
+
204: {
|
|
298
|
+
bodyMapper: Mappers.BillingProfile
|
|
299
|
+
},
|
|
300
|
+
default: {
|
|
301
|
+
bodyMapper: Mappers.ErrorResponse
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
requestBody: Parameters.parameters2,
|
|
305
|
+
queryParameters: [Parameters.apiVersion],
|
|
306
|
+
urlParameters: [
|
|
307
|
+
Parameters.$host,
|
|
308
|
+
Parameters.billingAccountName,
|
|
309
|
+
Parameters.billingProfileName
|
|
310
|
+
],
|
|
311
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
312
|
+
mediaType: "json",
|
|
313
|
+
serializer
|
|
314
|
+
};
|
|
315
|
+
const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {
|
|
316
|
+
path: "{nextLink}",
|
|
317
|
+
httpMethod: "GET",
|
|
318
|
+
responses: {
|
|
319
|
+
200: {
|
|
320
|
+
bodyMapper: Mappers.BillingProfileListResult
|
|
321
|
+
},
|
|
322
|
+
default: {
|
|
323
|
+
bodyMapper: Mappers.ErrorResponse
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
|
327
|
+
urlParameters: [
|
|
328
|
+
Parameters.$host,
|
|
329
|
+
Parameters.billingAccountName,
|
|
330
|
+
Parameters.nextLink
|
|
331
|
+
],
|
|
332
|
+
headerParameters: [Parameters.accept],
|
|
333
|
+
serializer
|
|
334
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { BillingPropertyOperations } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { BillingManagementClient } from "../billingManagementClient";
|
|
14
|
+
import {
|
|
15
|
+
BillingPropertyGetOptionalParams,
|
|
16
|
+
BillingPropertyGetResponse,
|
|
17
|
+
BillingProperty,
|
|
18
|
+
BillingPropertyUpdateOptionalParams,
|
|
19
|
+
BillingPropertyUpdateResponse
|
|
20
|
+
} from "../models";
|
|
21
|
+
|
|
22
|
+
/** Class containing BillingPropertyOperations operations. */
|
|
23
|
+
export class BillingPropertyOperationsImpl
|
|
24
|
+
implements BillingPropertyOperations {
|
|
25
|
+
private readonly client: BillingManagementClient;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Initialize a new instance of the class BillingPropertyOperations class.
|
|
29
|
+
* @param client Reference to the service client
|
|
30
|
+
*/
|
|
31
|
+
constructor(client: BillingManagementClient) {
|
|
32
|
+
this.client = client;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the billing properties for a subscription. This operation is not supported for billing accounts
|
|
37
|
+
* with agreement type Enterprise Agreement.
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
get(
|
|
41
|
+
options?: BillingPropertyGetOptionalParams
|
|
42
|
+
): Promise<BillingPropertyGetResponse> {
|
|
43
|
+
return this.client.sendOperationRequest({ options }, getOperationSpec);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Updates the billing property of a subscription. Currently, cost center can be updated. The operation
|
|
48
|
+
* is supported only for billing accounts with agreement type Microsoft Customer Agreement.
|
|
49
|
+
* @param parameters Request parameters that are provided to the update billing property operation.
|
|
50
|
+
* @param options The options parameters.
|
|
51
|
+
*/
|
|
52
|
+
update(
|
|
53
|
+
parameters: BillingProperty,
|
|
54
|
+
options?: BillingPropertyUpdateOptionalParams
|
|
55
|
+
): Promise<BillingPropertyUpdateResponse> {
|
|
56
|
+
return this.client.sendOperationRequest(
|
|
57
|
+
{ parameters, options },
|
|
58
|
+
updateOperationSpec
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Operation Specifications
|
|
63
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
64
|
+
|
|
65
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
66
|
+
path:
|
|
67
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default",
|
|
68
|
+
httpMethod: "GET",
|
|
69
|
+
responses: {
|
|
70
|
+
200: {
|
|
71
|
+
bodyMapper: Mappers.BillingProperty
|
|
72
|
+
},
|
|
73
|
+
default: {
|
|
74
|
+
bodyMapper: Mappers.ErrorResponse
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
queryParameters: [Parameters.apiVersion],
|
|
78
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
79
|
+
headerParameters: [Parameters.accept],
|
|
80
|
+
serializer
|
|
81
|
+
};
|
|
82
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
83
|
+
path:
|
|
84
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default",
|
|
85
|
+
httpMethod: "PATCH",
|
|
86
|
+
responses: {
|
|
87
|
+
200: {
|
|
88
|
+
bodyMapper: Mappers.BillingProperty
|
|
89
|
+
},
|
|
90
|
+
default: {
|
|
91
|
+
bodyMapper: Mappers.ErrorResponse
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
requestBody: Parameters.parameters10,
|
|
95
|
+
queryParameters: [Parameters.apiVersion],
|
|
96
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
97
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
98
|
+
mediaType: "json",
|
|
99
|
+
serializer
|
|
100
|
+
};
|