@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,902 @@
|
|
|
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 { BillingSubscriptions } 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
|
+
BillingSubscription,
|
|
19
|
+
BillingSubscriptionsListByCustomerNextOptionalParams,
|
|
20
|
+
BillingSubscriptionsListByCustomerOptionalParams,
|
|
21
|
+
BillingSubscriptionsListByBillingAccountNextOptionalParams,
|
|
22
|
+
BillingSubscriptionsListByBillingAccountOptionalParams,
|
|
23
|
+
BillingSubscriptionsListByBillingProfileNextOptionalParams,
|
|
24
|
+
BillingSubscriptionsListByBillingProfileOptionalParams,
|
|
25
|
+
BillingSubscriptionsListByInvoiceSectionNextOptionalParams,
|
|
26
|
+
BillingSubscriptionsListByInvoiceSectionOptionalParams,
|
|
27
|
+
BillingSubscriptionsListByCustomerResponse,
|
|
28
|
+
BillingSubscriptionsListByBillingAccountResponse,
|
|
29
|
+
BillingSubscriptionsListByBillingProfileResponse,
|
|
30
|
+
BillingSubscriptionsListByInvoiceSectionResponse,
|
|
31
|
+
BillingSubscriptionsGetOptionalParams,
|
|
32
|
+
BillingSubscriptionsGetResponse,
|
|
33
|
+
BillingSubscriptionsUpdateOptionalParams,
|
|
34
|
+
BillingSubscriptionsUpdateResponse,
|
|
35
|
+
TransferBillingSubscriptionRequestProperties,
|
|
36
|
+
BillingSubscriptionsMoveOptionalParams,
|
|
37
|
+
BillingSubscriptionsMoveResponse,
|
|
38
|
+
BillingSubscriptionsValidateMoveOptionalParams,
|
|
39
|
+
BillingSubscriptionsValidateMoveResponse,
|
|
40
|
+
BillingSubscriptionsListByCustomerNextResponse,
|
|
41
|
+
BillingSubscriptionsListByBillingAccountNextResponse,
|
|
42
|
+
BillingSubscriptionsListByBillingProfileNextResponse,
|
|
43
|
+
BillingSubscriptionsListByInvoiceSectionNextResponse
|
|
44
|
+
} from "../models";
|
|
45
|
+
|
|
46
|
+
/// <reference lib="esnext.asynciterable" />
|
|
47
|
+
/** Class containing BillingSubscriptions operations. */
|
|
48
|
+
export class BillingSubscriptionsImpl implements BillingSubscriptions {
|
|
49
|
+
private readonly client: BillingManagementClient;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initialize a new instance of the class BillingSubscriptions class.
|
|
53
|
+
* @param client Reference to the service client
|
|
54
|
+
*/
|
|
55
|
+
constructor(client: BillingManagementClient) {
|
|
56
|
+
this.client = client;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Lists the subscriptions for a customer. The operation is supported only for billing accounts with
|
|
61
|
+
* agreement type Microsoft Partner Agreement.
|
|
62
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
63
|
+
* @param customerName The ID that uniquely identifies a customer.
|
|
64
|
+
* @param options The options parameters.
|
|
65
|
+
*/
|
|
66
|
+
public listByCustomer(
|
|
67
|
+
billingAccountName: string,
|
|
68
|
+
customerName: string,
|
|
69
|
+
options?: BillingSubscriptionsListByCustomerOptionalParams
|
|
70
|
+
): PagedAsyncIterableIterator<BillingSubscription> {
|
|
71
|
+
const iter = this.listByCustomerPagingAll(
|
|
72
|
+
billingAccountName,
|
|
73
|
+
customerName,
|
|
74
|
+
options
|
|
75
|
+
);
|
|
76
|
+
return {
|
|
77
|
+
next() {
|
|
78
|
+
return iter.next();
|
|
79
|
+
},
|
|
80
|
+
[Symbol.asyncIterator]() {
|
|
81
|
+
return this;
|
|
82
|
+
},
|
|
83
|
+
byPage: () => {
|
|
84
|
+
return this.listByCustomerPagingPage(
|
|
85
|
+
billingAccountName,
|
|
86
|
+
customerName,
|
|
87
|
+
options
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private async *listByCustomerPagingPage(
|
|
94
|
+
billingAccountName: string,
|
|
95
|
+
customerName: string,
|
|
96
|
+
options?: BillingSubscriptionsListByCustomerOptionalParams
|
|
97
|
+
): AsyncIterableIterator<BillingSubscription[]> {
|
|
98
|
+
let result = await this._listByCustomer(
|
|
99
|
+
billingAccountName,
|
|
100
|
+
customerName,
|
|
101
|
+
options
|
|
102
|
+
);
|
|
103
|
+
yield result.value || [];
|
|
104
|
+
let continuationToken = result.nextLink;
|
|
105
|
+
while (continuationToken) {
|
|
106
|
+
result = await this._listByCustomerNext(
|
|
107
|
+
billingAccountName,
|
|
108
|
+
customerName,
|
|
109
|
+
continuationToken,
|
|
110
|
+
options
|
|
111
|
+
);
|
|
112
|
+
continuationToken = result.nextLink;
|
|
113
|
+
yield result.value || [];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private async *listByCustomerPagingAll(
|
|
118
|
+
billingAccountName: string,
|
|
119
|
+
customerName: string,
|
|
120
|
+
options?: BillingSubscriptionsListByCustomerOptionalParams
|
|
121
|
+
): AsyncIterableIterator<BillingSubscription> {
|
|
122
|
+
for await (const page of this.listByCustomerPagingPage(
|
|
123
|
+
billingAccountName,
|
|
124
|
+
customerName,
|
|
125
|
+
options
|
|
126
|
+
)) {
|
|
127
|
+
yield* page;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Lists the subscriptions for a billing account. The operation is supported for billing accounts with
|
|
133
|
+
* agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
134
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
135
|
+
* @param options The options parameters.
|
|
136
|
+
*/
|
|
137
|
+
public listByBillingAccount(
|
|
138
|
+
billingAccountName: string,
|
|
139
|
+
options?: BillingSubscriptionsListByBillingAccountOptionalParams
|
|
140
|
+
): PagedAsyncIterableIterator<BillingSubscription> {
|
|
141
|
+
const iter = this.listByBillingAccountPagingAll(
|
|
142
|
+
billingAccountName,
|
|
143
|
+
options
|
|
144
|
+
);
|
|
145
|
+
return {
|
|
146
|
+
next() {
|
|
147
|
+
return iter.next();
|
|
148
|
+
},
|
|
149
|
+
[Symbol.asyncIterator]() {
|
|
150
|
+
return this;
|
|
151
|
+
},
|
|
152
|
+
byPage: () => {
|
|
153
|
+
return this.listByBillingAccountPagingPage(billingAccountName, options);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
private async *listByBillingAccountPagingPage(
|
|
159
|
+
billingAccountName: string,
|
|
160
|
+
options?: BillingSubscriptionsListByBillingAccountOptionalParams
|
|
161
|
+
): AsyncIterableIterator<BillingSubscription[]> {
|
|
162
|
+
let result = await this._listByBillingAccount(billingAccountName, options);
|
|
163
|
+
yield result.value || [];
|
|
164
|
+
let continuationToken = result.nextLink;
|
|
165
|
+
while (continuationToken) {
|
|
166
|
+
result = await this._listByBillingAccountNext(
|
|
167
|
+
billingAccountName,
|
|
168
|
+
continuationToken,
|
|
169
|
+
options
|
|
170
|
+
);
|
|
171
|
+
continuationToken = result.nextLink;
|
|
172
|
+
yield result.value || [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
private async *listByBillingAccountPagingAll(
|
|
177
|
+
billingAccountName: string,
|
|
178
|
+
options?: BillingSubscriptionsListByBillingAccountOptionalParams
|
|
179
|
+
): AsyncIterableIterator<BillingSubscription> {
|
|
180
|
+
for await (const page of this.listByBillingAccountPagingPage(
|
|
181
|
+
billingAccountName,
|
|
182
|
+
options
|
|
183
|
+
)) {
|
|
184
|
+
yield* page;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Lists the subscriptions that are billed to a billing profile. The operation is supported for billing
|
|
190
|
+
* accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
191
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
192
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
193
|
+
* @param options The options parameters.
|
|
194
|
+
*/
|
|
195
|
+
public listByBillingProfile(
|
|
196
|
+
billingAccountName: string,
|
|
197
|
+
billingProfileName: string,
|
|
198
|
+
options?: BillingSubscriptionsListByBillingProfileOptionalParams
|
|
199
|
+
): PagedAsyncIterableIterator<BillingSubscription> {
|
|
200
|
+
const iter = this.listByBillingProfilePagingAll(
|
|
201
|
+
billingAccountName,
|
|
202
|
+
billingProfileName,
|
|
203
|
+
options
|
|
204
|
+
);
|
|
205
|
+
return {
|
|
206
|
+
next() {
|
|
207
|
+
return iter.next();
|
|
208
|
+
},
|
|
209
|
+
[Symbol.asyncIterator]() {
|
|
210
|
+
return this;
|
|
211
|
+
},
|
|
212
|
+
byPage: () => {
|
|
213
|
+
return this.listByBillingProfilePagingPage(
|
|
214
|
+
billingAccountName,
|
|
215
|
+
billingProfileName,
|
|
216
|
+
options
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private async *listByBillingProfilePagingPage(
|
|
223
|
+
billingAccountName: string,
|
|
224
|
+
billingProfileName: string,
|
|
225
|
+
options?: BillingSubscriptionsListByBillingProfileOptionalParams
|
|
226
|
+
): AsyncIterableIterator<BillingSubscription[]> {
|
|
227
|
+
let result = await this._listByBillingProfile(
|
|
228
|
+
billingAccountName,
|
|
229
|
+
billingProfileName,
|
|
230
|
+
options
|
|
231
|
+
);
|
|
232
|
+
yield result.value || [];
|
|
233
|
+
let continuationToken = result.nextLink;
|
|
234
|
+
while (continuationToken) {
|
|
235
|
+
result = await this._listByBillingProfileNext(
|
|
236
|
+
billingAccountName,
|
|
237
|
+
billingProfileName,
|
|
238
|
+
continuationToken,
|
|
239
|
+
options
|
|
240
|
+
);
|
|
241
|
+
continuationToken = result.nextLink;
|
|
242
|
+
yield result.value || [];
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
private async *listByBillingProfilePagingAll(
|
|
247
|
+
billingAccountName: string,
|
|
248
|
+
billingProfileName: string,
|
|
249
|
+
options?: BillingSubscriptionsListByBillingProfileOptionalParams
|
|
250
|
+
): AsyncIterableIterator<BillingSubscription> {
|
|
251
|
+
for await (const page of this.listByBillingProfilePagingPage(
|
|
252
|
+
billingAccountName,
|
|
253
|
+
billingProfileName,
|
|
254
|
+
options
|
|
255
|
+
)) {
|
|
256
|
+
yield* page;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Lists the subscriptions that are billed to an invoice section. The operation is supported only for
|
|
262
|
+
* billing accounts with agreement type Microsoft Customer Agreement.
|
|
263
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
264
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
265
|
+
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
|
|
266
|
+
* @param options The options parameters.
|
|
267
|
+
*/
|
|
268
|
+
public listByInvoiceSection(
|
|
269
|
+
billingAccountName: string,
|
|
270
|
+
billingProfileName: string,
|
|
271
|
+
invoiceSectionName: string,
|
|
272
|
+
options?: BillingSubscriptionsListByInvoiceSectionOptionalParams
|
|
273
|
+
): PagedAsyncIterableIterator<BillingSubscription> {
|
|
274
|
+
const iter = this.listByInvoiceSectionPagingAll(
|
|
275
|
+
billingAccountName,
|
|
276
|
+
billingProfileName,
|
|
277
|
+
invoiceSectionName,
|
|
278
|
+
options
|
|
279
|
+
);
|
|
280
|
+
return {
|
|
281
|
+
next() {
|
|
282
|
+
return iter.next();
|
|
283
|
+
},
|
|
284
|
+
[Symbol.asyncIterator]() {
|
|
285
|
+
return this;
|
|
286
|
+
},
|
|
287
|
+
byPage: () => {
|
|
288
|
+
return this.listByInvoiceSectionPagingPage(
|
|
289
|
+
billingAccountName,
|
|
290
|
+
billingProfileName,
|
|
291
|
+
invoiceSectionName,
|
|
292
|
+
options
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private async *listByInvoiceSectionPagingPage(
|
|
299
|
+
billingAccountName: string,
|
|
300
|
+
billingProfileName: string,
|
|
301
|
+
invoiceSectionName: string,
|
|
302
|
+
options?: BillingSubscriptionsListByInvoiceSectionOptionalParams
|
|
303
|
+
): AsyncIterableIterator<BillingSubscription[]> {
|
|
304
|
+
let result = await this._listByInvoiceSection(
|
|
305
|
+
billingAccountName,
|
|
306
|
+
billingProfileName,
|
|
307
|
+
invoiceSectionName,
|
|
308
|
+
options
|
|
309
|
+
);
|
|
310
|
+
yield result.value || [];
|
|
311
|
+
let continuationToken = result.nextLink;
|
|
312
|
+
while (continuationToken) {
|
|
313
|
+
result = await this._listByInvoiceSectionNext(
|
|
314
|
+
billingAccountName,
|
|
315
|
+
billingProfileName,
|
|
316
|
+
invoiceSectionName,
|
|
317
|
+
continuationToken,
|
|
318
|
+
options
|
|
319
|
+
);
|
|
320
|
+
continuationToken = result.nextLink;
|
|
321
|
+
yield result.value || [];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
private async *listByInvoiceSectionPagingAll(
|
|
326
|
+
billingAccountName: string,
|
|
327
|
+
billingProfileName: string,
|
|
328
|
+
invoiceSectionName: string,
|
|
329
|
+
options?: BillingSubscriptionsListByInvoiceSectionOptionalParams
|
|
330
|
+
): AsyncIterableIterator<BillingSubscription> {
|
|
331
|
+
for await (const page of this.listByInvoiceSectionPagingPage(
|
|
332
|
+
billingAccountName,
|
|
333
|
+
billingProfileName,
|
|
334
|
+
invoiceSectionName,
|
|
335
|
+
options
|
|
336
|
+
)) {
|
|
337
|
+
yield* page;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Lists the subscriptions for a customer. The operation is supported only for billing accounts with
|
|
343
|
+
* agreement type Microsoft Partner Agreement.
|
|
344
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
345
|
+
* @param customerName The ID that uniquely identifies a customer.
|
|
346
|
+
* @param options The options parameters.
|
|
347
|
+
*/
|
|
348
|
+
private _listByCustomer(
|
|
349
|
+
billingAccountName: string,
|
|
350
|
+
customerName: string,
|
|
351
|
+
options?: BillingSubscriptionsListByCustomerOptionalParams
|
|
352
|
+
): Promise<BillingSubscriptionsListByCustomerResponse> {
|
|
353
|
+
return this.client.sendOperationRequest(
|
|
354
|
+
{ billingAccountName, customerName, options },
|
|
355
|
+
listByCustomerOperationSpec
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Lists the subscriptions for a billing account. The operation is supported for billing accounts with
|
|
361
|
+
* agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
362
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
363
|
+
* @param options The options parameters.
|
|
364
|
+
*/
|
|
365
|
+
private _listByBillingAccount(
|
|
366
|
+
billingAccountName: string,
|
|
367
|
+
options?: BillingSubscriptionsListByBillingAccountOptionalParams
|
|
368
|
+
): Promise<BillingSubscriptionsListByBillingAccountResponse> {
|
|
369
|
+
return this.client.sendOperationRequest(
|
|
370
|
+
{ billingAccountName, options },
|
|
371
|
+
listByBillingAccountOperationSpec
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Lists the subscriptions that are billed to a billing profile. The operation is supported for billing
|
|
377
|
+
* accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
|
|
378
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
379
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
380
|
+
* @param options The options parameters.
|
|
381
|
+
*/
|
|
382
|
+
private _listByBillingProfile(
|
|
383
|
+
billingAccountName: string,
|
|
384
|
+
billingProfileName: string,
|
|
385
|
+
options?: BillingSubscriptionsListByBillingProfileOptionalParams
|
|
386
|
+
): Promise<BillingSubscriptionsListByBillingProfileResponse> {
|
|
387
|
+
return this.client.sendOperationRequest(
|
|
388
|
+
{ billingAccountName, billingProfileName, options },
|
|
389
|
+
listByBillingProfileOperationSpec
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Lists the subscriptions that are billed to an invoice section. The operation is supported only for
|
|
395
|
+
* billing accounts with agreement type Microsoft Customer Agreement.
|
|
396
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
397
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
398
|
+
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
|
|
399
|
+
* @param options The options parameters.
|
|
400
|
+
*/
|
|
401
|
+
private _listByInvoiceSection(
|
|
402
|
+
billingAccountName: string,
|
|
403
|
+
billingProfileName: string,
|
|
404
|
+
invoiceSectionName: string,
|
|
405
|
+
options?: BillingSubscriptionsListByInvoiceSectionOptionalParams
|
|
406
|
+
): Promise<BillingSubscriptionsListByInvoiceSectionResponse> {
|
|
407
|
+
return this.client.sendOperationRequest(
|
|
408
|
+
{ billingAccountName, billingProfileName, invoiceSectionName, options },
|
|
409
|
+
listByInvoiceSectionOperationSpec
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Gets a subscription by its ID. The operation is supported for billing accounts with agreement type
|
|
415
|
+
* Microsoft Customer Agreement and Microsoft Partner Agreement.
|
|
416
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
417
|
+
* @param options The options parameters.
|
|
418
|
+
*/
|
|
419
|
+
get(
|
|
420
|
+
billingAccountName: string,
|
|
421
|
+
options?: BillingSubscriptionsGetOptionalParams
|
|
422
|
+
): Promise<BillingSubscriptionsGetResponse> {
|
|
423
|
+
return this.client.sendOperationRequest(
|
|
424
|
+
{ billingAccountName, options },
|
|
425
|
+
getOperationSpec
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Updates the properties of a billing subscription. Currently, cost center can be updated. The
|
|
431
|
+
* operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
|
|
432
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
433
|
+
* @param parameters Request parameters that are provided to the update billing subscription operation.
|
|
434
|
+
* @param options The options parameters.
|
|
435
|
+
*/
|
|
436
|
+
update(
|
|
437
|
+
billingAccountName: string,
|
|
438
|
+
parameters: BillingSubscription,
|
|
439
|
+
options?: BillingSubscriptionsUpdateOptionalParams
|
|
440
|
+
): Promise<BillingSubscriptionsUpdateResponse> {
|
|
441
|
+
return this.client.sendOperationRequest(
|
|
442
|
+
{ billingAccountName, parameters, options },
|
|
443
|
+
updateOperationSpec
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Moves a subscription's charges to a new invoice section. The new invoice section must belong to the
|
|
449
|
+
* same billing profile as the existing invoice section. This operation is supported for billing
|
|
450
|
+
* accounts with agreement type Microsoft Customer Agreement.
|
|
451
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
452
|
+
* @param parameters Request parameters that are provided to the move subscription operation.
|
|
453
|
+
* @param options The options parameters.
|
|
454
|
+
*/
|
|
455
|
+
async beginMove(
|
|
456
|
+
billingAccountName: string,
|
|
457
|
+
parameters: TransferBillingSubscriptionRequestProperties,
|
|
458
|
+
options?: BillingSubscriptionsMoveOptionalParams
|
|
459
|
+
): Promise<
|
|
460
|
+
PollerLike<
|
|
461
|
+
PollOperationState<BillingSubscriptionsMoveResponse>,
|
|
462
|
+
BillingSubscriptionsMoveResponse
|
|
463
|
+
>
|
|
464
|
+
> {
|
|
465
|
+
const directSendOperation = async (
|
|
466
|
+
args: coreClient.OperationArguments,
|
|
467
|
+
spec: coreClient.OperationSpec
|
|
468
|
+
): Promise<BillingSubscriptionsMoveResponse> => {
|
|
469
|
+
return this.client.sendOperationRequest(args, spec);
|
|
470
|
+
};
|
|
471
|
+
const sendOperation = async (
|
|
472
|
+
args: coreClient.OperationArguments,
|
|
473
|
+
spec: coreClient.OperationSpec
|
|
474
|
+
) => {
|
|
475
|
+
let currentRawResponse:
|
|
476
|
+
| coreClient.FullOperationResponse
|
|
477
|
+
| undefined = undefined;
|
|
478
|
+
const providedCallback = args.options?.onResponse;
|
|
479
|
+
const callback: coreClient.RawResponseCallback = (
|
|
480
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
481
|
+
flatResponse: unknown
|
|
482
|
+
) => {
|
|
483
|
+
currentRawResponse = rawResponse;
|
|
484
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
485
|
+
};
|
|
486
|
+
const updatedArgs = {
|
|
487
|
+
...args,
|
|
488
|
+
options: {
|
|
489
|
+
...args.options,
|
|
490
|
+
onResponse: callback
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
494
|
+
return {
|
|
495
|
+
flatResponse,
|
|
496
|
+
rawResponse: {
|
|
497
|
+
statusCode: currentRawResponse!.status,
|
|
498
|
+
body: currentRawResponse!.parsedBody,
|
|
499
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
const lro = new LroImpl(
|
|
505
|
+
sendOperation,
|
|
506
|
+
{ billingAccountName, parameters, options },
|
|
507
|
+
moveOperationSpec
|
|
508
|
+
);
|
|
509
|
+
return new LroEngine(lro, {
|
|
510
|
+
resumeFrom: options?.resumeFrom,
|
|
511
|
+
intervalInMs: options?.updateIntervalInMs
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Moves a subscription's charges to a new invoice section. The new invoice section must belong to the
|
|
517
|
+
* same billing profile as the existing invoice section. This operation is supported for billing
|
|
518
|
+
* accounts with agreement type Microsoft Customer Agreement.
|
|
519
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
520
|
+
* @param parameters Request parameters that are provided to the move subscription operation.
|
|
521
|
+
* @param options The options parameters.
|
|
522
|
+
*/
|
|
523
|
+
async beginMoveAndWait(
|
|
524
|
+
billingAccountName: string,
|
|
525
|
+
parameters: TransferBillingSubscriptionRequestProperties,
|
|
526
|
+
options?: BillingSubscriptionsMoveOptionalParams
|
|
527
|
+
): Promise<BillingSubscriptionsMoveResponse> {
|
|
528
|
+
const poller = await this.beginMove(
|
|
529
|
+
billingAccountName,
|
|
530
|
+
parameters,
|
|
531
|
+
options
|
|
532
|
+
);
|
|
533
|
+
return poller.pollUntilDone();
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Validates if a subscription's charges can be moved to a new invoice section. This operation is
|
|
538
|
+
* supported for billing accounts with agreement type Microsoft Customer Agreement.
|
|
539
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
540
|
+
* @param parameters Request parameters that are provided to the validate move eligibility operation.
|
|
541
|
+
* @param options The options parameters.
|
|
542
|
+
*/
|
|
543
|
+
validateMove(
|
|
544
|
+
billingAccountName: string,
|
|
545
|
+
parameters: TransferBillingSubscriptionRequestProperties,
|
|
546
|
+
options?: BillingSubscriptionsValidateMoveOptionalParams
|
|
547
|
+
): Promise<BillingSubscriptionsValidateMoveResponse> {
|
|
548
|
+
return this.client.sendOperationRequest(
|
|
549
|
+
{ billingAccountName, parameters, options },
|
|
550
|
+
validateMoveOperationSpec
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* ListByCustomerNext
|
|
556
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
557
|
+
* @param customerName The ID that uniquely identifies a customer.
|
|
558
|
+
* @param nextLink The nextLink from the previous successful call to the ListByCustomer method.
|
|
559
|
+
* @param options The options parameters.
|
|
560
|
+
*/
|
|
561
|
+
private _listByCustomerNext(
|
|
562
|
+
billingAccountName: string,
|
|
563
|
+
customerName: string,
|
|
564
|
+
nextLink: string,
|
|
565
|
+
options?: BillingSubscriptionsListByCustomerNextOptionalParams
|
|
566
|
+
): Promise<BillingSubscriptionsListByCustomerNextResponse> {
|
|
567
|
+
return this.client.sendOperationRequest(
|
|
568
|
+
{ billingAccountName, customerName, nextLink, options },
|
|
569
|
+
listByCustomerNextOperationSpec
|
|
570
|
+
);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* ListByBillingAccountNext
|
|
575
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
576
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.
|
|
577
|
+
* @param options The options parameters.
|
|
578
|
+
*/
|
|
579
|
+
private _listByBillingAccountNext(
|
|
580
|
+
billingAccountName: string,
|
|
581
|
+
nextLink: string,
|
|
582
|
+
options?: BillingSubscriptionsListByBillingAccountNextOptionalParams
|
|
583
|
+
): Promise<BillingSubscriptionsListByBillingAccountNextResponse> {
|
|
584
|
+
return this.client.sendOperationRequest(
|
|
585
|
+
{ billingAccountName, nextLink, options },
|
|
586
|
+
listByBillingAccountNextOperationSpec
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* ListByBillingProfileNext
|
|
592
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
593
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
594
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.
|
|
595
|
+
* @param options The options parameters.
|
|
596
|
+
*/
|
|
597
|
+
private _listByBillingProfileNext(
|
|
598
|
+
billingAccountName: string,
|
|
599
|
+
billingProfileName: string,
|
|
600
|
+
nextLink: string,
|
|
601
|
+
options?: BillingSubscriptionsListByBillingProfileNextOptionalParams
|
|
602
|
+
): Promise<BillingSubscriptionsListByBillingProfileNextResponse> {
|
|
603
|
+
return this.client.sendOperationRequest(
|
|
604
|
+
{ billingAccountName, billingProfileName, nextLink, options },
|
|
605
|
+
listByBillingProfileNextOperationSpec
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* ListByInvoiceSectionNext
|
|
611
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
612
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
613
|
+
* @param invoiceSectionName The ID that uniquely identifies an invoice section.
|
|
614
|
+
* @param nextLink The nextLink from the previous successful call to the ListByInvoiceSection method.
|
|
615
|
+
* @param options The options parameters.
|
|
616
|
+
*/
|
|
617
|
+
private _listByInvoiceSectionNext(
|
|
618
|
+
billingAccountName: string,
|
|
619
|
+
billingProfileName: string,
|
|
620
|
+
invoiceSectionName: string,
|
|
621
|
+
nextLink: string,
|
|
622
|
+
options?: BillingSubscriptionsListByInvoiceSectionNextOptionalParams
|
|
623
|
+
): Promise<BillingSubscriptionsListByInvoiceSectionNextResponse> {
|
|
624
|
+
return this.client.sendOperationRequest(
|
|
625
|
+
{
|
|
626
|
+
billingAccountName,
|
|
627
|
+
billingProfileName,
|
|
628
|
+
invoiceSectionName,
|
|
629
|
+
nextLink,
|
|
630
|
+
options
|
|
631
|
+
},
|
|
632
|
+
listByInvoiceSectionNextOperationSpec
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
// Operation Specifications
|
|
637
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
638
|
+
|
|
639
|
+
const listByCustomerOperationSpec: coreClient.OperationSpec = {
|
|
640
|
+
path:
|
|
641
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions",
|
|
642
|
+
httpMethod: "GET",
|
|
643
|
+
responses: {
|
|
644
|
+
200: {
|
|
645
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
646
|
+
},
|
|
647
|
+
default: {
|
|
648
|
+
bodyMapper: Mappers.ErrorResponse
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
queryParameters: [Parameters.apiVersion],
|
|
652
|
+
urlParameters: [
|
|
653
|
+
Parameters.$host,
|
|
654
|
+
Parameters.billingAccountName,
|
|
655
|
+
Parameters.customerName
|
|
656
|
+
],
|
|
657
|
+
headerParameters: [Parameters.accept],
|
|
658
|
+
serializer
|
|
659
|
+
};
|
|
660
|
+
const listByBillingAccountOperationSpec: coreClient.OperationSpec = {
|
|
661
|
+
path:
|
|
662
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions",
|
|
663
|
+
httpMethod: "GET",
|
|
664
|
+
responses: {
|
|
665
|
+
200: {
|
|
666
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
667
|
+
},
|
|
668
|
+
default: {
|
|
669
|
+
bodyMapper: Mappers.ErrorResponse
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
queryParameters: [Parameters.apiVersion],
|
|
673
|
+
urlParameters: [Parameters.$host, Parameters.billingAccountName],
|
|
674
|
+
headerParameters: [Parameters.accept],
|
|
675
|
+
serializer
|
|
676
|
+
};
|
|
677
|
+
const listByBillingProfileOperationSpec: coreClient.OperationSpec = {
|
|
678
|
+
path:
|
|
679
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions",
|
|
680
|
+
httpMethod: "GET",
|
|
681
|
+
responses: {
|
|
682
|
+
200: {
|
|
683
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
684
|
+
},
|
|
685
|
+
default: {
|
|
686
|
+
bodyMapper: Mappers.ErrorResponse
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
queryParameters: [Parameters.apiVersion],
|
|
690
|
+
urlParameters: [
|
|
691
|
+
Parameters.$host,
|
|
692
|
+
Parameters.billingAccountName,
|
|
693
|
+
Parameters.billingProfileName
|
|
694
|
+
],
|
|
695
|
+
headerParameters: [Parameters.accept],
|
|
696
|
+
serializer
|
|
697
|
+
};
|
|
698
|
+
const listByInvoiceSectionOperationSpec: coreClient.OperationSpec = {
|
|
699
|
+
path:
|
|
700
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions",
|
|
701
|
+
httpMethod: "GET",
|
|
702
|
+
responses: {
|
|
703
|
+
200: {
|
|
704
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
705
|
+
},
|
|
706
|
+
default: {
|
|
707
|
+
bodyMapper: Mappers.ErrorResponse
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
queryParameters: [Parameters.apiVersion],
|
|
711
|
+
urlParameters: [
|
|
712
|
+
Parameters.$host,
|
|
713
|
+
Parameters.billingAccountName,
|
|
714
|
+
Parameters.billingProfileName,
|
|
715
|
+
Parameters.invoiceSectionName
|
|
716
|
+
],
|
|
717
|
+
headerParameters: [Parameters.accept],
|
|
718
|
+
serializer
|
|
719
|
+
};
|
|
720
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
721
|
+
path:
|
|
722
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}",
|
|
723
|
+
httpMethod: "GET",
|
|
724
|
+
responses: {
|
|
725
|
+
200: {
|
|
726
|
+
bodyMapper: Mappers.BillingSubscription
|
|
727
|
+
},
|
|
728
|
+
default: {
|
|
729
|
+
bodyMapper: Mappers.ErrorResponse
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
queryParameters: [Parameters.apiVersion],
|
|
733
|
+
urlParameters: [
|
|
734
|
+
Parameters.$host,
|
|
735
|
+
Parameters.billingAccountName,
|
|
736
|
+
Parameters.subscriptionId
|
|
737
|
+
],
|
|
738
|
+
headerParameters: [Parameters.accept],
|
|
739
|
+
serializer
|
|
740
|
+
};
|
|
741
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
742
|
+
path:
|
|
743
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}",
|
|
744
|
+
httpMethod: "PATCH",
|
|
745
|
+
responses: {
|
|
746
|
+
200: {
|
|
747
|
+
bodyMapper: Mappers.BillingSubscription
|
|
748
|
+
},
|
|
749
|
+
default: {
|
|
750
|
+
bodyMapper: Mappers.ErrorResponse
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
requestBody: Parameters.parameters4,
|
|
754
|
+
queryParameters: [Parameters.apiVersion],
|
|
755
|
+
urlParameters: [
|
|
756
|
+
Parameters.$host,
|
|
757
|
+
Parameters.billingAccountName,
|
|
758
|
+
Parameters.subscriptionId
|
|
759
|
+
],
|
|
760
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
761
|
+
mediaType: "json",
|
|
762
|
+
serializer
|
|
763
|
+
};
|
|
764
|
+
const moveOperationSpec: coreClient.OperationSpec = {
|
|
765
|
+
path:
|
|
766
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/move",
|
|
767
|
+
httpMethod: "POST",
|
|
768
|
+
responses: {
|
|
769
|
+
200: {
|
|
770
|
+
bodyMapper: Mappers.BillingSubscription
|
|
771
|
+
},
|
|
772
|
+
201: {
|
|
773
|
+
bodyMapper: Mappers.BillingSubscription
|
|
774
|
+
},
|
|
775
|
+
202: {
|
|
776
|
+
bodyMapper: Mappers.BillingSubscription
|
|
777
|
+
},
|
|
778
|
+
204: {
|
|
779
|
+
bodyMapper: Mappers.BillingSubscription
|
|
780
|
+
},
|
|
781
|
+
default: {
|
|
782
|
+
bodyMapper: Mappers.ErrorResponse
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
requestBody: Parameters.parameters5,
|
|
786
|
+
queryParameters: [Parameters.apiVersion],
|
|
787
|
+
urlParameters: [
|
|
788
|
+
Parameters.$host,
|
|
789
|
+
Parameters.billingAccountName,
|
|
790
|
+
Parameters.subscriptionId
|
|
791
|
+
],
|
|
792
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
793
|
+
mediaType: "json",
|
|
794
|
+
serializer
|
|
795
|
+
};
|
|
796
|
+
const validateMoveOperationSpec: coreClient.OperationSpec = {
|
|
797
|
+
path:
|
|
798
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{subscriptionId}/validateMoveEligibility",
|
|
799
|
+
httpMethod: "POST",
|
|
800
|
+
responses: {
|
|
801
|
+
200: {
|
|
802
|
+
bodyMapper: Mappers.ValidateSubscriptionTransferEligibilityResult
|
|
803
|
+
},
|
|
804
|
+
default: {
|
|
805
|
+
bodyMapper: Mappers.ErrorResponse
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
requestBody: Parameters.parameters5,
|
|
809
|
+
queryParameters: [Parameters.apiVersion],
|
|
810
|
+
urlParameters: [
|
|
811
|
+
Parameters.$host,
|
|
812
|
+
Parameters.billingAccountName,
|
|
813
|
+
Parameters.subscriptionId
|
|
814
|
+
],
|
|
815
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
816
|
+
mediaType: "json",
|
|
817
|
+
serializer
|
|
818
|
+
};
|
|
819
|
+
const listByCustomerNextOperationSpec: coreClient.OperationSpec = {
|
|
820
|
+
path: "{nextLink}",
|
|
821
|
+
httpMethod: "GET",
|
|
822
|
+
responses: {
|
|
823
|
+
200: {
|
|
824
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
825
|
+
},
|
|
826
|
+
default: {
|
|
827
|
+
bodyMapper: Mappers.ErrorResponse
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
queryParameters: [Parameters.apiVersion],
|
|
831
|
+
urlParameters: [
|
|
832
|
+
Parameters.$host,
|
|
833
|
+
Parameters.billingAccountName,
|
|
834
|
+
Parameters.nextLink,
|
|
835
|
+
Parameters.customerName
|
|
836
|
+
],
|
|
837
|
+
headerParameters: [Parameters.accept],
|
|
838
|
+
serializer
|
|
839
|
+
};
|
|
840
|
+
const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {
|
|
841
|
+
path: "{nextLink}",
|
|
842
|
+
httpMethod: "GET",
|
|
843
|
+
responses: {
|
|
844
|
+
200: {
|
|
845
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
846
|
+
},
|
|
847
|
+
default: {
|
|
848
|
+
bodyMapper: Mappers.ErrorResponse
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
queryParameters: [Parameters.apiVersion],
|
|
852
|
+
urlParameters: [
|
|
853
|
+
Parameters.$host,
|
|
854
|
+
Parameters.billingAccountName,
|
|
855
|
+
Parameters.nextLink
|
|
856
|
+
],
|
|
857
|
+
headerParameters: [Parameters.accept],
|
|
858
|
+
serializer
|
|
859
|
+
};
|
|
860
|
+
const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {
|
|
861
|
+
path: "{nextLink}",
|
|
862
|
+
httpMethod: "GET",
|
|
863
|
+
responses: {
|
|
864
|
+
200: {
|
|
865
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
866
|
+
},
|
|
867
|
+
default: {
|
|
868
|
+
bodyMapper: Mappers.ErrorResponse
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
queryParameters: [Parameters.apiVersion],
|
|
872
|
+
urlParameters: [
|
|
873
|
+
Parameters.$host,
|
|
874
|
+
Parameters.billingAccountName,
|
|
875
|
+
Parameters.nextLink,
|
|
876
|
+
Parameters.billingProfileName
|
|
877
|
+
],
|
|
878
|
+
headerParameters: [Parameters.accept],
|
|
879
|
+
serializer
|
|
880
|
+
};
|
|
881
|
+
const listByInvoiceSectionNextOperationSpec: coreClient.OperationSpec = {
|
|
882
|
+
path: "{nextLink}",
|
|
883
|
+
httpMethod: "GET",
|
|
884
|
+
responses: {
|
|
885
|
+
200: {
|
|
886
|
+
bodyMapper: Mappers.BillingSubscriptionsListResult
|
|
887
|
+
},
|
|
888
|
+
default: {
|
|
889
|
+
bodyMapper: Mappers.ErrorResponse
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
queryParameters: [Parameters.apiVersion],
|
|
893
|
+
urlParameters: [
|
|
894
|
+
Parameters.$host,
|
|
895
|
+
Parameters.billingAccountName,
|
|
896
|
+
Parameters.nextLink,
|
|
897
|
+
Parameters.billingProfileName,
|
|
898
|
+
Parameters.invoiceSectionName
|
|
899
|
+
],
|
|
900
|
+
headerParameters: [Parameters.accept],
|
|
901
|
+
serializer
|
|
902
|
+
};
|