@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,1176 @@
|
|
|
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 { Invoices } 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
|
+
Invoice,
|
|
19
|
+
InvoicesListByBillingAccountNextOptionalParams,
|
|
20
|
+
InvoicesListByBillingAccountOptionalParams,
|
|
21
|
+
InvoicesListByBillingProfileNextOptionalParams,
|
|
22
|
+
InvoicesListByBillingProfileOptionalParams,
|
|
23
|
+
InvoicesListByBillingSubscriptionNextOptionalParams,
|
|
24
|
+
InvoicesListByBillingSubscriptionOptionalParams,
|
|
25
|
+
InvoicesListByBillingAccountResponse,
|
|
26
|
+
InvoicesListByBillingProfileResponse,
|
|
27
|
+
InvoicesGetOptionalParams,
|
|
28
|
+
InvoicesGetResponse,
|
|
29
|
+
InvoicesGetByIdOptionalParams,
|
|
30
|
+
InvoicesGetByIdResponse,
|
|
31
|
+
InvoicesDownloadInvoiceOptionalParams,
|
|
32
|
+
InvoicesDownloadInvoiceResponse,
|
|
33
|
+
InvoicesDownloadMultipleBillingProfileInvoicesOptionalParams,
|
|
34
|
+
InvoicesDownloadMultipleBillingProfileInvoicesResponse,
|
|
35
|
+
InvoicesListByBillingSubscriptionResponse,
|
|
36
|
+
InvoicesGetBySubscriptionAndInvoiceIdOptionalParams,
|
|
37
|
+
InvoicesGetBySubscriptionAndInvoiceIdResponse,
|
|
38
|
+
InvoicesDownloadBillingSubscriptionInvoiceOptionalParams,
|
|
39
|
+
InvoicesDownloadBillingSubscriptionInvoiceResponse,
|
|
40
|
+
InvoicesDownloadMultipleBillingSubscriptionInvoicesOptionalParams,
|
|
41
|
+
InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse,
|
|
42
|
+
InvoicesListByBillingAccountNextResponse,
|
|
43
|
+
InvoicesListByBillingProfileNextResponse,
|
|
44
|
+
InvoicesListByBillingSubscriptionNextResponse
|
|
45
|
+
} from "../models";
|
|
46
|
+
|
|
47
|
+
/// <reference lib="esnext.asynciterable" />
|
|
48
|
+
/** Class containing Invoices operations. */
|
|
49
|
+
export class InvoicesImpl implements Invoices {
|
|
50
|
+
private readonly client: BillingManagementClient;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initialize a new instance of the class Invoices class.
|
|
54
|
+
* @param client Reference to the service client
|
|
55
|
+
*/
|
|
56
|
+
constructor(client: BillingManagementClient) {
|
|
57
|
+
this.client = client;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Lists the invoices for a billing account for a given start date and end date. The operation is
|
|
62
|
+
* supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
|
|
63
|
+
* Agreement.
|
|
64
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
65
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
66
|
+
* MM-DD-YYYY format.
|
|
67
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
68
|
+
* format.
|
|
69
|
+
* @param options The options parameters.
|
|
70
|
+
*/
|
|
71
|
+
public listByBillingAccount(
|
|
72
|
+
billingAccountName: string,
|
|
73
|
+
periodStartDate: string,
|
|
74
|
+
periodEndDate: string,
|
|
75
|
+
options?: InvoicesListByBillingAccountOptionalParams
|
|
76
|
+
): PagedAsyncIterableIterator<Invoice> {
|
|
77
|
+
const iter = this.listByBillingAccountPagingAll(
|
|
78
|
+
billingAccountName,
|
|
79
|
+
periodStartDate,
|
|
80
|
+
periodEndDate,
|
|
81
|
+
options
|
|
82
|
+
);
|
|
83
|
+
return {
|
|
84
|
+
next() {
|
|
85
|
+
return iter.next();
|
|
86
|
+
},
|
|
87
|
+
[Symbol.asyncIterator]() {
|
|
88
|
+
return this;
|
|
89
|
+
},
|
|
90
|
+
byPage: () => {
|
|
91
|
+
return this.listByBillingAccountPagingPage(
|
|
92
|
+
billingAccountName,
|
|
93
|
+
periodStartDate,
|
|
94
|
+
periodEndDate,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
private async *listByBillingAccountPagingPage(
|
|
102
|
+
billingAccountName: string,
|
|
103
|
+
periodStartDate: string,
|
|
104
|
+
periodEndDate: string,
|
|
105
|
+
options?: InvoicesListByBillingAccountOptionalParams
|
|
106
|
+
): AsyncIterableIterator<Invoice[]> {
|
|
107
|
+
let result = await this._listByBillingAccount(
|
|
108
|
+
billingAccountName,
|
|
109
|
+
periodStartDate,
|
|
110
|
+
periodEndDate,
|
|
111
|
+
options
|
|
112
|
+
);
|
|
113
|
+
yield result.value || [];
|
|
114
|
+
let continuationToken = result.nextLink;
|
|
115
|
+
while (continuationToken) {
|
|
116
|
+
result = await this._listByBillingAccountNext(
|
|
117
|
+
billingAccountName,
|
|
118
|
+
periodStartDate,
|
|
119
|
+
periodEndDate,
|
|
120
|
+
continuationToken,
|
|
121
|
+
options
|
|
122
|
+
);
|
|
123
|
+
continuationToken = result.nextLink;
|
|
124
|
+
yield result.value || [];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private async *listByBillingAccountPagingAll(
|
|
129
|
+
billingAccountName: string,
|
|
130
|
+
periodStartDate: string,
|
|
131
|
+
periodEndDate: string,
|
|
132
|
+
options?: InvoicesListByBillingAccountOptionalParams
|
|
133
|
+
): AsyncIterableIterator<Invoice> {
|
|
134
|
+
for await (const page of this.listByBillingAccountPagingPage(
|
|
135
|
+
billingAccountName,
|
|
136
|
+
periodStartDate,
|
|
137
|
+
periodEndDate,
|
|
138
|
+
options
|
|
139
|
+
)) {
|
|
140
|
+
yield* page;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Lists the invoices for a billing profile for a given start date and end date. The operation is
|
|
146
|
+
* supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
|
|
147
|
+
* Agreement.
|
|
148
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
149
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
150
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
151
|
+
* MM-DD-YYYY format.
|
|
152
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
153
|
+
* format.
|
|
154
|
+
* @param options The options parameters.
|
|
155
|
+
*/
|
|
156
|
+
public listByBillingProfile(
|
|
157
|
+
billingAccountName: string,
|
|
158
|
+
billingProfileName: string,
|
|
159
|
+
periodStartDate: string,
|
|
160
|
+
periodEndDate: string,
|
|
161
|
+
options?: InvoicesListByBillingProfileOptionalParams
|
|
162
|
+
): PagedAsyncIterableIterator<Invoice> {
|
|
163
|
+
const iter = this.listByBillingProfilePagingAll(
|
|
164
|
+
billingAccountName,
|
|
165
|
+
billingProfileName,
|
|
166
|
+
periodStartDate,
|
|
167
|
+
periodEndDate,
|
|
168
|
+
options
|
|
169
|
+
);
|
|
170
|
+
return {
|
|
171
|
+
next() {
|
|
172
|
+
return iter.next();
|
|
173
|
+
},
|
|
174
|
+
[Symbol.asyncIterator]() {
|
|
175
|
+
return this;
|
|
176
|
+
},
|
|
177
|
+
byPage: () => {
|
|
178
|
+
return this.listByBillingProfilePagingPage(
|
|
179
|
+
billingAccountName,
|
|
180
|
+
billingProfileName,
|
|
181
|
+
periodStartDate,
|
|
182
|
+
periodEndDate,
|
|
183
|
+
options
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
private async *listByBillingProfilePagingPage(
|
|
190
|
+
billingAccountName: string,
|
|
191
|
+
billingProfileName: string,
|
|
192
|
+
periodStartDate: string,
|
|
193
|
+
periodEndDate: string,
|
|
194
|
+
options?: InvoicesListByBillingProfileOptionalParams
|
|
195
|
+
): AsyncIterableIterator<Invoice[]> {
|
|
196
|
+
let result = await this._listByBillingProfile(
|
|
197
|
+
billingAccountName,
|
|
198
|
+
billingProfileName,
|
|
199
|
+
periodStartDate,
|
|
200
|
+
periodEndDate,
|
|
201
|
+
options
|
|
202
|
+
);
|
|
203
|
+
yield result.value || [];
|
|
204
|
+
let continuationToken = result.nextLink;
|
|
205
|
+
while (continuationToken) {
|
|
206
|
+
result = await this._listByBillingProfileNext(
|
|
207
|
+
billingAccountName,
|
|
208
|
+
billingProfileName,
|
|
209
|
+
periodStartDate,
|
|
210
|
+
periodEndDate,
|
|
211
|
+
continuationToken,
|
|
212
|
+
options
|
|
213
|
+
);
|
|
214
|
+
continuationToken = result.nextLink;
|
|
215
|
+
yield result.value || [];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
private async *listByBillingProfilePagingAll(
|
|
220
|
+
billingAccountName: string,
|
|
221
|
+
billingProfileName: string,
|
|
222
|
+
periodStartDate: string,
|
|
223
|
+
periodEndDate: string,
|
|
224
|
+
options?: InvoicesListByBillingProfileOptionalParams
|
|
225
|
+
): AsyncIterableIterator<Invoice> {
|
|
226
|
+
for await (const page of this.listByBillingProfilePagingPage(
|
|
227
|
+
billingAccountName,
|
|
228
|
+
billingProfileName,
|
|
229
|
+
periodStartDate,
|
|
230
|
+
periodEndDate,
|
|
231
|
+
options
|
|
232
|
+
)) {
|
|
233
|
+
yield* page;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Lists the invoices for a subscription.
|
|
239
|
+
* @param periodStartDate Invoice period start date.
|
|
240
|
+
* @param periodEndDate Invoice period end date.
|
|
241
|
+
* @param options The options parameters.
|
|
242
|
+
*/
|
|
243
|
+
public listByBillingSubscription(
|
|
244
|
+
periodStartDate: string,
|
|
245
|
+
periodEndDate: string,
|
|
246
|
+
options?: InvoicesListByBillingSubscriptionOptionalParams
|
|
247
|
+
): PagedAsyncIterableIterator<Invoice> {
|
|
248
|
+
const iter = this.listByBillingSubscriptionPagingAll(
|
|
249
|
+
periodStartDate,
|
|
250
|
+
periodEndDate,
|
|
251
|
+
options
|
|
252
|
+
);
|
|
253
|
+
return {
|
|
254
|
+
next() {
|
|
255
|
+
return iter.next();
|
|
256
|
+
},
|
|
257
|
+
[Symbol.asyncIterator]() {
|
|
258
|
+
return this;
|
|
259
|
+
},
|
|
260
|
+
byPage: () => {
|
|
261
|
+
return this.listByBillingSubscriptionPagingPage(
|
|
262
|
+
periodStartDate,
|
|
263
|
+
periodEndDate,
|
|
264
|
+
options
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
private async *listByBillingSubscriptionPagingPage(
|
|
271
|
+
periodStartDate: string,
|
|
272
|
+
periodEndDate: string,
|
|
273
|
+
options?: InvoicesListByBillingSubscriptionOptionalParams
|
|
274
|
+
): AsyncIterableIterator<Invoice[]> {
|
|
275
|
+
let result = await this._listByBillingSubscription(
|
|
276
|
+
periodStartDate,
|
|
277
|
+
periodEndDate,
|
|
278
|
+
options
|
|
279
|
+
);
|
|
280
|
+
yield result.value || [];
|
|
281
|
+
let continuationToken = result.nextLink;
|
|
282
|
+
while (continuationToken) {
|
|
283
|
+
result = await this._listByBillingSubscriptionNext(
|
|
284
|
+
periodStartDate,
|
|
285
|
+
periodEndDate,
|
|
286
|
+
continuationToken,
|
|
287
|
+
options
|
|
288
|
+
);
|
|
289
|
+
continuationToken = result.nextLink;
|
|
290
|
+
yield result.value || [];
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
private async *listByBillingSubscriptionPagingAll(
|
|
295
|
+
periodStartDate: string,
|
|
296
|
+
periodEndDate: string,
|
|
297
|
+
options?: InvoicesListByBillingSubscriptionOptionalParams
|
|
298
|
+
): AsyncIterableIterator<Invoice> {
|
|
299
|
+
for await (const page of this.listByBillingSubscriptionPagingPage(
|
|
300
|
+
periodStartDate,
|
|
301
|
+
periodEndDate,
|
|
302
|
+
options
|
|
303
|
+
)) {
|
|
304
|
+
yield* page;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Lists the invoices for a billing account for a given start date and end date. The operation is
|
|
310
|
+
* supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
|
|
311
|
+
* Agreement.
|
|
312
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
313
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
314
|
+
* MM-DD-YYYY format.
|
|
315
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
316
|
+
* format.
|
|
317
|
+
* @param options The options parameters.
|
|
318
|
+
*/
|
|
319
|
+
private _listByBillingAccount(
|
|
320
|
+
billingAccountName: string,
|
|
321
|
+
periodStartDate: string,
|
|
322
|
+
periodEndDate: string,
|
|
323
|
+
options?: InvoicesListByBillingAccountOptionalParams
|
|
324
|
+
): Promise<InvoicesListByBillingAccountResponse> {
|
|
325
|
+
return this.client.sendOperationRequest(
|
|
326
|
+
{ billingAccountName, periodStartDate, periodEndDate, options },
|
|
327
|
+
listByBillingAccountOperationSpec
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Lists the invoices for a billing profile for a given start date and end date. The operation is
|
|
333
|
+
* supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
|
|
334
|
+
* Agreement.
|
|
335
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
336
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
337
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
338
|
+
* MM-DD-YYYY format.
|
|
339
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
340
|
+
* format.
|
|
341
|
+
* @param options The options parameters.
|
|
342
|
+
*/
|
|
343
|
+
private _listByBillingProfile(
|
|
344
|
+
billingAccountName: string,
|
|
345
|
+
billingProfileName: string,
|
|
346
|
+
periodStartDate: string,
|
|
347
|
+
periodEndDate: string,
|
|
348
|
+
options?: InvoicesListByBillingProfileOptionalParams
|
|
349
|
+
): Promise<InvoicesListByBillingProfileResponse> {
|
|
350
|
+
return this.client.sendOperationRequest(
|
|
351
|
+
{
|
|
352
|
+
billingAccountName,
|
|
353
|
+
billingProfileName,
|
|
354
|
+
periodStartDate,
|
|
355
|
+
periodEndDate,
|
|
356
|
+
options
|
|
357
|
+
},
|
|
358
|
+
listByBillingProfileOperationSpec
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Gets an invoice by billing account name and ID. The operation is supported for billing accounts with
|
|
364
|
+
* agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
|
|
365
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
366
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
367
|
+
* @param options The options parameters.
|
|
368
|
+
*/
|
|
369
|
+
get(
|
|
370
|
+
billingAccountName: string,
|
|
371
|
+
invoiceName: string,
|
|
372
|
+
options?: InvoicesGetOptionalParams
|
|
373
|
+
): Promise<InvoicesGetResponse> {
|
|
374
|
+
return this.client.sendOperationRequest(
|
|
375
|
+
{ billingAccountName, invoiceName, options },
|
|
376
|
+
getOperationSpec
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft
|
|
382
|
+
* Partner Agreement or Microsoft Customer Agreement.
|
|
383
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
384
|
+
* @param options The options parameters.
|
|
385
|
+
*/
|
|
386
|
+
getById(
|
|
387
|
+
invoiceName: string,
|
|
388
|
+
options?: InvoicesGetByIdOptionalParams
|
|
389
|
+
): Promise<InvoicesGetByIdResponse> {
|
|
390
|
+
return this.client.sendOperationRequest(
|
|
391
|
+
{ invoiceName, options },
|
|
392
|
+
getByIdOperationSpec
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Gets a URL to download an invoice. The operation is supported for billing accounts with agreement
|
|
398
|
+
* type Microsoft Partner Agreement or Microsoft Customer Agreement.
|
|
399
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
400
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
401
|
+
* @param downloadToken Download token with document source and document ID.
|
|
402
|
+
* @param options The options parameters.
|
|
403
|
+
*/
|
|
404
|
+
async beginDownloadInvoice(
|
|
405
|
+
billingAccountName: string,
|
|
406
|
+
invoiceName: string,
|
|
407
|
+
downloadToken: string,
|
|
408
|
+
options?: InvoicesDownloadInvoiceOptionalParams
|
|
409
|
+
): Promise<
|
|
410
|
+
PollerLike<
|
|
411
|
+
PollOperationState<InvoicesDownloadInvoiceResponse>,
|
|
412
|
+
InvoicesDownloadInvoiceResponse
|
|
413
|
+
>
|
|
414
|
+
> {
|
|
415
|
+
const directSendOperation = async (
|
|
416
|
+
args: coreClient.OperationArguments,
|
|
417
|
+
spec: coreClient.OperationSpec
|
|
418
|
+
): Promise<InvoicesDownloadInvoiceResponse> => {
|
|
419
|
+
return this.client.sendOperationRequest(args, spec);
|
|
420
|
+
};
|
|
421
|
+
const sendOperation = async (
|
|
422
|
+
args: coreClient.OperationArguments,
|
|
423
|
+
spec: coreClient.OperationSpec
|
|
424
|
+
) => {
|
|
425
|
+
let currentRawResponse:
|
|
426
|
+
| coreClient.FullOperationResponse
|
|
427
|
+
| undefined = undefined;
|
|
428
|
+
const providedCallback = args.options?.onResponse;
|
|
429
|
+
const callback: coreClient.RawResponseCallback = (
|
|
430
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
431
|
+
flatResponse: unknown
|
|
432
|
+
) => {
|
|
433
|
+
currentRawResponse = rawResponse;
|
|
434
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
435
|
+
};
|
|
436
|
+
const updatedArgs = {
|
|
437
|
+
...args,
|
|
438
|
+
options: {
|
|
439
|
+
...args.options,
|
|
440
|
+
onResponse: callback
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
444
|
+
return {
|
|
445
|
+
flatResponse,
|
|
446
|
+
rawResponse: {
|
|
447
|
+
statusCode: currentRawResponse!.status,
|
|
448
|
+
body: currentRawResponse!.parsedBody,
|
|
449
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
const lro = new LroImpl(
|
|
455
|
+
sendOperation,
|
|
456
|
+
{ billingAccountName, invoiceName, downloadToken, options },
|
|
457
|
+
downloadInvoiceOperationSpec
|
|
458
|
+
);
|
|
459
|
+
return new LroEngine(lro, {
|
|
460
|
+
resumeFrom: options?.resumeFrom,
|
|
461
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
462
|
+
lroResourceLocationConfig: "location"
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Gets a URL to download an invoice. The operation is supported for billing accounts with agreement
|
|
468
|
+
* type Microsoft Partner Agreement or Microsoft Customer Agreement.
|
|
469
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
470
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
471
|
+
* @param downloadToken Download token with document source and document ID.
|
|
472
|
+
* @param options The options parameters.
|
|
473
|
+
*/
|
|
474
|
+
async beginDownloadInvoiceAndWait(
|
|
475
|
+
billingAccountName: string,
|
|
476
|
+
invoiceName: string,
|
|
477
|
+
downloadToken: string,
|
|
478
|
+
options?: InvoicesDownloadInvoiceOptionalParams
|
|
479
|
+
): Promise<InvoicesDownloadInvoiceResponse> {
|
|
480
|
+
const poller = await this.beginDownloadInvoice(
|
|
481
|
+
billingAccountName,
|
|
482
|
+
invoiceName,
|
|
483
|
+
downloadToken,
|
|
484
|
+
options
|
|
485
|
+
);
|
|
486
|
+
return poller.pollUntilDone();
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
|
|
491
|
+
* file. The operation is supported for billing accounts with agreement type Microsoft Partner
|
|
492
|
+
* Agreement or Microsoft Customer Agreement.
|
|
493
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
494
|
+
* @param downloadUrls An array of download urls for individual documents
|
|
495
|
+
* @param options The options parameters.
|
|
496
|
+
*/
|
|
497
|
+
async beginDownloadMultipleBillingProfileInvoices(
|
|
498
|
+
billingAccountName: string,
|
|
499
|
+
downloadUrls: string[],
|
|
500
|
+
options?: InvoicesDownloadMultipleBillingProfileInvoicesOptionalParams
|
|
501
|
+
): Promise<
|
|
502
|
+
PollerLike<
|
|
503
|
+
PollOperationState<
|
|
504
|
+
InvoicesDownloadMultipleBillingProfileInvoicesResponse
|
|
505
|
+
>,
|
|
506
|
+
InvoicesDownloadMultipleBillingProfileInvoicesResponse
|
|
507
|
+
>
|
|
508
|
+
> {
|
|
509
|
+
const directSendOperation = async (
|
|
510
|
+
args: coreClient.OperationArguments,
|
|
511
|
+
spec: coreClient.OperationSpec
|
|
512
|
+
): Promise<InvoicesDownloadMultipleBillingProfileInvoicesResponse> => {
|
|
513
|
+
return this.client.sendOperationRequest(args, spec);
|
|
514
|
+
};
|
|
515
|
+
const sendOperation = async (
|
|
516
|
+
args: coreClient.OperationArguments,
|
|
517
|
+
spec: coreClient.OperationSpec
|
|
518
|
+
) => {
|
|
519
|
+
let currentRawResponse:
|
|
520
|
+
| coreClient.FullOperationResponse
|
|
521
|
+
| undefined = undefined;
|
|
522
|
+
const providedCallback = args.options?.onResponse;
|
|
523
|
+
const callback: coreClient.RawResponseCallback = (
|
|
524
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
525
|
+
flatResponse: unknown
|
|
526
|
+
) => {
|
|
527
|
+
currentRawResponse = rawResponse;
|
|
528
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
529
|
+
};
|
|
530
|
+
const updatedArgs = {
|
|
531
|
+
...args,
|
|
532
|
+
options: {
|
|
533
|
+
...args.options,
|
|
534
|
+
onResponse: callback
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
538
|
+
return {
|
|
539
|
+
flatResponse,
|
|
540
|
+
rawResponse: {
|
|
541
|
+
statusCode: currentRawResponse!.status,
|
|
542
|
+
body: currentRawResponse!.parsedBody,
|
|
543
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
const lro = new LroImpl(
|
|
549
|
+
sendOperation,
|
|
550
|
+
{ billingAccountName, downloadUrls, options },
|
|
551
|
+
downloadMultipleBillingProfileInvoicesOperationSpec
|
|
552
|
+
);
|
|
553
|
+
return new LroEngine(lro, {
|
|
554
|
+
resumeFrom: options?.resumeFrom,
|
|
555
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
556
|
+
lroResourceLocationConfig: "location"
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
|
|
562
|
+
* file. The operation is supported for billing accounts with agreement type Microsoft Partner
|
|
563
|
+
* Agreement or Microsoft Customer Agreement.
|
|
564
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
565
|
+
* @param downloadUrls An array of download urls for individual documents
|
|
566
|
+
* @param options The options parameters.
|
|
567
|
+
*/
|
|
568
|
+
async beginDownloadMultipleBillingProfileInvoicesAndWait(
|
|
569
|
+
billingAccountName: string,
|
|
570
|
+
downloadUrls: string[],
|
|
571
|
+
options?: InvoicesDownloadMultipleBillingProfileInvoicesOptionalParams
|
|
572
|
+
): Promise<InvoicesDownloadMultipleBillingProfileInvoicesResponse> {
|
|
573
|
+
const poller = await this.beginDownloadMultipleBillingProfileInvoices(
|
|
574
|
+
billingAccountName,
|
|
575
|
+
downloadUrls,
|
|
576
|
+
options
|
|
577
|
+
);
|
|
578
|
+
return poller.pollUntilDone();
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Lists the invoices for a subscription.
|
|
583
|
+
* @param periodStartDate Invoice period start date.
|
|
584
|
+
* @param periodEndDate Invoice period end date.
|
|
585
|
+
* @param options The options parameters.
|
|
586
|
+
*/
|
|
587
|
+
private _listByBillingSubscription(
|
|
588
|
+
periodStartDate: string,
|
|
589
|
+
periodEndDate: string,
|
|
590
|
+
options?: InvoicesListByBillingSubscriptionOptionalParams
|
|
591
|
+
): Promise<InvoicesListByBillingSubscriptionResponse> {
|
|
592
|
+
return this.client.sendOperationRequest(
|
|
593
|
+
{ periodStartDate, periodEndDate, options },
|
|
594
|
+
listByBillingSubscriptionOperationSpec
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Gets an invoice by subscription ID and invoice ID.
|
|
600
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
601
|
+
* @param options The options parameters.
|
|
602
|
+
*/
|
|
603
|
+
getBySubscriptionAndInvoiceId(
|
|
604
|
+
invoiceName: string,
|
|
605
|
+
options?: InvoicesGetBySubscriptionAndInvoiceIdOptionalParams
|
|
606
|
+
): Promise<InvoicesGetBySubscriptionAndInvoiceIdResponse> {
|
|
607
|
+
return this.client.sendOperationRequest(
|
|
608
|
+
{ invoiceName, options },
|
|
609
|
+
getBySubscriptionAndInvoiceIdOperationSpec
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Gets a URL to download an invoice.
|
|
615
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
616
|
+
* @param downloadToken Download token with document source and document ID.
|
|
617
|
+
* @param options The options parameters.
|
|
618
|
+
*/
|
|
619
|
+
async beginDownloadBillingSubscriptionInvoice(
|
|
620
|
+
invoiceName: string,
|
|
621
|
+
downloadToken: string,
|
|
622
|
+
options?: InvoicesDownloadBillingSubscriptionInvoiceOptionalParams
|
|
623
|
+
): Promise<
|
|
624
|
+
PollerLike<
|
|
625
|
+
PollOperationState<InvoicesDownloadBillingSubscriptionInvoiceResponse>,
|
|
626
|
+
InvoicesDownloadBillingSubscriptionInvoiceResponse
|
|
627
|
+
>
|
|
628
|
+
> {
|
|
629
|
+
const directSendOperation = async (
|
|
630
|
+
args: coreClient.OperationArguments,
|
|
631
|
+
spec: coreClient.OperationSpec
|
|
632
|
+
): Promise<InvoicesDownloadBillingSubscriptionInvoiceResponse> => {
|
|
633
|
+
return this.client.sendOperationRequest(args, spec);
|
|
634
|
+
};
|
|
635
|
+
const sendOperation = async (
|
|
636
|
+
args: coreClient.OperationArguments,
|
|
637
|
+
spec: coreClient.OperationSpec
|
|
638
|
+
) => {
|
|
639
|
+
let currentRawResponse:
|
|
640
|
+
| coreClient.FullOperationResponse
|
|
641
|
+
| undefined = undefined;
|
|
642
|
+
const providedCallback = args.options?.onResponse;
|
|
643
|
+
const callback: coreClient.RawResponseCallback = (
|
|
644
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
645
|
+
flatResponse: unknown
|
|
646
|
+
) => {
|
|
647
|
+
currentRawResponse = rawResponse;
|
|
648
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
649
|
+
};
|
|
650
|
+
const updatedArgs = {
|
|
651
|
+
...args,
|
|
652
|
+
options: {
|
|
653
|
+
...args.options,
|
|
654
|
+
onResponse: callback
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
658
|
+
return {
|
|
659
|
+
flatResponse,
|
|
660
|
+
rawResponse: {
|
|
661
|
+
statusCode: currentRawResponse!.status,
|
|
662
|
+
body: currentRawResponse!.parsedBody,
|
|
663
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
const lro = new LroImpl(
|
|
669
|
+
sendOperation,
|
|
670
|
+
{ invoiceName, downloadToken, options },
|
|
671
|
+
downloadBillingSubscriptionInvoiceOperationSpec
|
|
672
|
+
);
|
|
673
|
+
return new LroEngine(lro, {
|
|
674
|
+
resumeFrom: options?.resumeFrom,
|
|
675
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
676
|
+
lroResourceLocationConfig: "location"
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Gets a URL to download an invoice.
|
|
682
|
+
* @param invoiceName The ID that uniquely identifies an invoice.
|
|
683
|
+
* @param downloadToken Download token with document source and document ID.
|
|
684
|
+
* @param options The options parameters.
|
|
685
|
+
*/
|
|
686
|
+
async beginDownloadBillingSubscriptionInvoiceAndWait(
|
|
687
|
+
invoiceName: string,
|
|
688
|
+
downloadToken: string,
|
|
689
|
+
options?: InvoicesDownloadBillingSubscriptionInvoiceOptionalParams
|
|
690
|
+
): Promise<InvoicesDownloadBillingSubscriptionInvoiceResponse> {
|
|
691
|
+
const poller = await this.beginDownloadBillingSubscriptionInvoice(
|
|
692
|
+
invoiceName,
|
|
693
|
+
downloadToken,
|
|
694
|
+
options
|
|
695
|
+
);
|
|
696
|
+
return poller.pollUntilDone();
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
|
|
701
|
+
* file.
|
|
702
|
+
* @param downloadUrls An array of download urls for individual documents
|
|
703
|
+
* @param options The options parameters.
|
|
704
|
+
*/
|
|
705
|
+
async beginDownloadMultipleBillingSubscriptionInvoices(
|
|
706
|
+
downloadUrls: string[],
|
|
707
|
+
options?: InvoicesDownloadMultipleBillingSubscriptionInvoicesOptionalParams
|
|
708
|
+
): Promise<
|
|
709
|
+
PollerLike<
|
|
710
|
+
PollOperationState<
|
|
711
|
+
InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse
|
|
712
|
+
>,
|
|
713
|
+
InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse
|
|
714
|
+
>
|
|
715
|
+
> {
|
|
716
|
+
const directSendOperation = async (
|
|
717
|
+
args: coreClient.OperationArguments,
|
|
718
|
+
spec: coreClient.OperationSpec
|
|
719
|
+
): Promise<InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse> => {
|
|
720
|
+
return this.client.sendOperationRequest(args, spec);
|
|
721
|
+
};
|
|
722
|
+
const sendOperation = async (
|
|
723
|
+
args: coreClient.OperationArguments,
|
|
724
|
+
spec: coreClient.OperationSpec
|
|
725
|
+
) => {
|
|
726
|
+
let currentRawResponse:
|
|
727
|
+
| coreClient.FullOperationResponse
|
|
728
|
+
| undefined = undefined;
|
|
729
|
+
const providedCallback = args.options?.onResponse;
|
|
730
|
+
const callback: coreClient.RawResponseCallback = (
|
|
731
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
732
|
+
flatResponse: unknown
|
|
733
|
+
) => {
|
|
734
|
+
currentRawResponse = rawResponse;
|
|
735
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
736
|
+
};
|
|
737
|
+
const updatedArgs = {
|
|
738
|
+
...args,
|
|
739
|
+
options: {
|
|
740
|
+
...args.options,
|
|
741
|
+
onResponse: callback
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
745
|
+
return {
|
|
746
|
+
flatResponse,
|
|
747
|
+
rawResponse: {
|
|
748
|
+
statusCode: currentRawResponse!.status,
|
|
749
|
+
body: currentRawResponse!.parsedBody,
|
|
750
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
const lro = new LroImpl(
|
|
756
|
+
sendOperation,
|
|
757
|
+
{ downloadUrls, options },
|
|
758
|
+
downloadMultipleBillingSubscriptionInvoicesOperationSpec
|
|
759
|
+
);
|
|
760
|
+
return new LroEngine(lro, {
|
|
761
|
+
resumeFrom: options?.resumeFrom,
|
|
762
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
763
|
+
lroResourceLocationConfig: "location"
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
|
|
769
|
+
* file.
|
|
770
|
+
* @param downloadUrls An array of download urls for individual documents
|
|
771
|
+
* @param options The options parameters.
|
|
772
|
+
*/
|
|
773
|
+
async beginDownloadMultipleBillingSubscriptionInvoicesAndWait(
|
|
774
|
+
downloadUrls: string[],
|
|
775
|
+
options?: InvoicesDownloadMultipleBillingSubscriptionInvoicesOptionalParams
|
|
776
|
+
): Promise<InvoicesDownloadMultipleBillingSubscriptionInvoicesResponse> {
|
|
777
|
+
const poller = await this.beginDownloadMultipleBillingSubscriptionInvoices(
|
|
778
|
+
downloadUrls,
|
|
779
|
+
options
|
|
780
|
+
);
|
|
781
|
+
return poller.pollUntilDone();
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* ListByBillingAccountNext
|
|
786
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
787
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
788
|
+
* MM-DD-YYYY format.
|
|
789
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
790
|
+
* format.
|
|
791
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.
|
|
792
|
+
* @param options The options parameters.
|
|
793
|
+
*/
|
|
794
|
+
private _listByBillingAccountNext(
|
|
795
|
+
billingAccountName: string,
|
|
796
|
+
periodStartDate: string,
|
|
797
|
+
periodEndDate: string,
|
|
798
|
+
nextLink: string,
|
|
799
|
+
options?: InvoicesListByBillingAccountNextOptionalParams
|
|
800
|
+
): Promise<InvoicesListByBillingAccountNextResponse> {
|
|
801
|
+
return this.client.sendOperationRequest(
|
|
802
|
+
{ billingAccountName, periodStartDate, periodEndDate, nextLink, options },
|
|
803
|
+
listByBillingAccountNextOperationSpec
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* ListByBillingProfileNext
|
|
809
|
+
* @param billingAccountName The ID that uniquely identifies a billing account.
|
|
810
|
+
* @param billingProfileName The ID that uniquely identifies a billing profile.
|
|
811
|
+
* @param periodStartDate The start date to fetch the invoices. The date should be specified in
|
|
812
|
+
* MM-DD-YYYY format.
|
|
813
|
+
* @param periodEndDate The end date to fetch the invoices. The date should be specified in MM-DD-YYYY
|
|
814
|
+
* format.
|
|
815
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingProfile method.
|
|
816
|
+
* @param options The options parameters.
|
|
817
|
+
*/
|
|
818
|
+
private _listByBillingProfileNext(
|
|
819
|
+
billingAccountName: string,
|
|
820
|
+
billingProfileName: string,
|
|
821
|
+
periodStartDate: string,
|
|
822
|
+
periodEndDate: string,
|
|
823
|
+
nextLink: string,
|
|
824
|
+
options?: InvoicesListByBillingProfileNextOptionalParams
|
|
825
|
+
): Promise<InvoicesListByBillingProfileNextResponse> {
|
|
826
|
+
return this.client.sendOperationRequest(
|
|
827
|
+
{
|
|
828
|
+
billingAccountName,
|
|
829
|
+
billingProfileName,
|
|
830
|
+
periodStartDate,
|
|
831
|
+
periodEndDate,
|
|
832
|
+
nextLink,
|
|
833
|
+
options
|
|
834
|
+
},
|
|
835
|
+
listByBillingProfileNextOperationSpec
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* ListByBillingSubscriptionNext
|
|
841
|
+
* @param periodStartDate Invoice period start date.
|
|
842
|
+
* @param periodEndDate Invoice period end date.
|
|
843
|
+
* @param nextLink The nextLink from the previous successful call to the ListByBillingSubscription
|
|
844
|
+
* method.
|
|
845
|
+
* @param options The options parameters.
|
|
846
|
+
*/
|
|
847
|
+
private _listByBillingSubscriptionNext(
|
|
848
|
+
periodStartDate: string,
|
|
849
|
+
periodEndDate: string,
|
|
850
|
+
nextLink: string,
|
|
851
|
+
options?: InvoicesListByBillingSubscriptionNextOptionalParams
|
|
852
|
+
): Promise<InvoicesListByBillingSubscriptionNextResponse> {
|
|
853
|
+
return this.client.sendOperationRequest(
|
|
854
|
+
{ periodStartDate, periodEndDate, nextLink, options },
|
|
855
|
+
listByBillingSubscriptionNextOperationSpec
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
// Operation Specifications
|
|
860
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
861
|
+
|
|
862
|
+
const listByBillingAccountOperationSpec: coreClient.OperationSpec = {
|
|
863
|
+
path:
|
|
864
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices",
|
|
865
|
+
httpMethod: "GET",
|
|
866
|
+
responses: {
|
|
867
|
+
200: {
|
|
868
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
869
|
+
},
|
|
870
|
+
default: {
|
|
871
|
+
bodyMapper: Mappers.ErrorResponse
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
queryParameters: [
|
|
875
|
+
Parameters.apiVersion,
|
|
876
|
+
Parameters.periodStartDate,
|
|
877
|
+
Parameters.periodEndDate
|
|
878
|
+
],
|
|
879
|
+
urlParameters: [Parameters.$host, Parameters.billingAccountName],
|
|
880
|
+
headerParameters: [Parameters.accept],
|
|
881
|
+
serializer
|
|
882
|
+
};
|
|
883
|
+
const listByBillingProfileOperationSpec: coreClient.OperationSpec = {
|
|
884
|
+
path:
|
|
885
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices",
|
|
886
|
+
httpMethod: "GET",
|
|
887
|
+
responses: {
|
|
888
|
+
200: {
|
|
889
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
890
|
+
},
|
|
891
|
+
default: {
|
|
892
|
+
bodyMapper: Mappers.ErrorResponse
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
queryParameters: [
|
|
896
|
+
Parameters.apiVersion,
|
|
897
|
+
Parameters.periodStartDate,
|
|
898
|
+
Parameters.periodEndDate
|
|
899
|
+
],
|
|
900
|
+
urlParameters: [
|
|
901
|
+
Parameters.$host,
|
|
902
|
+
Parameters.billingAccountName,
|
|
903
|
+
Parameters.billingProfileName
|
|
904
|
+
],
|
|
905
|
+
headerParameters: [Parameters.accept],
|
|
906
|
+
serializer
|
|
907
|
+
};
|
|
908
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
909
|
+
path:
|
|
910
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}",
|
|
911
|
+
httpMethod: "GET",
|
|
912
|
+
responses: {
|
|
913
|
+
200: {
|
|
914
|
+
bodyMapper: Mappers.Invoice
|
|
915
|
+
},
|
|
916
|
+
default: {
|
|
917
|
+
bodyMapper: Mappers.ErrorResponse
|
|
918
|
+
}
|
|
919
|
+
},
|
|
920
|
+
queryParameters: [Parameters.apiVersion],
|
|
921
|
+
urlParameters: [
|
|
922
|
+
Parameters.$host,
|
|
923
|
+
Parameters.billingAccountName,
|
|
924
|
+
Parameters.invoiceName
|
|
925
|
+
],
|
|
926
|
+
headerParameters: [Parameters.accept],
|
|
927
|
+
serializer
|
|
928
|
+
};
|
|
929
|
+
const getByIdOperationSpec: coreClient.OperationSpec = {
|
|
930
|
+
path:
|
|
931
|
+
"/providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}",
|
|
932
|
+
httpMethod: "GET",
|
|
933
|
+
responses: {
|
|
934
|
+
200: {
|
|
935
|
+
bodyMapper: Mappers.Invoice
|
|
936
|
+
},
|
|
937
|
+
default: {
|
|
938
|
+
bodyMapper: Mappers.ErrorResponse
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
queryParameters: [Parameters.apiVersion],
|
|
942
|
+
urlParameters: [Parameters.$host, Parameters.invoiceName],
|
|
943
|
+
headerParameters: [Parameters.accept],
|
|
944
|
+
serializer
|
|
945
|
+
};
|
|
946
|
+
const downloadInvoiceOperationSpec: coreClient.OperationSpec = {
|
|
947
|
+
path:
|
|
948
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download",
|
|
949
|
+
httpMethod: "POST",
|
|
950
|
+
responses: {
|
|
951
|
+
200: {
|
|
952
|
+
bodyMapper: Mappers.DownloadUrl
|
|
953
|
+
},
|
|
954
|
+
201: {
|
|
955
|
+
bodyMapper: Mappers.DownloadUrl
|
|
956
|
+
},
|
|
957
|
+
202: {
|
|
958
|
+
bodyMapper: Mappers.DownloadUrl
|
|
959
|
+
},
|
|
960
|
+
204: {
|
|
961
|
+
bodyMapper: Mappers.DownloadUrl
|
|
962
|
+
},
|
|
963
|
+
default: {
|
|
964
|
+
bodyMapper: Mappers.ErrorResponse
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
queryParameters: [Parameters.apiVersion, Parameters.downloadToken],
|
|
968
|
+
urlParameters: [
|
|
969
|
+
Parameters.$host,
|
|
970
|
+
Parameters.billingAccountName,
|
|
971
|
+
Parameters.invoiceName
|
|
972
|
+
],
|
|
973
|
+
headerParameters: [Parameters.accept],
|
|
974
|
+
serializer
|
|
975
|
+
};
|
|
976
|
+
const downloadMultipleBillingProfileInvoicesOperationSpec: coreClient.OperationSpec = {
|
|
977
|
+
path:
|
|
978
|
+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments",
|
|
979
|
+
httpMethod: "POST",
|
|
980
|
+
responses: {
|
|
981
|
+
200: {
|
|
982
|
+
bodyMapper: Mappers.DownloadUrl
|
|
983
|
+
},
|
|
984
|
+
201: {
|
|
985
|
+
bodyMapper: Mappers.DownloadUrl
|
|
986
|
+
},
|
|
987
|
+
202: {
|
|
988
|
+
bodyMapper: Mappers.DownloadUrl
|
|
989
|
+
},
|
|
990
|
+
204: {
|
|
991
|
+
bodyMapper: Mappers.DownloadUrl
|
|
992
|
+
},
|
|
993
|
+
default: {
|
|
994
|
+
bodyMapper: Mappers.ErrorResponse
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
requestBody: Parameters.downloadUrls,
|
|
998
|
+
queryParameters: [Parameters.apiVersion],
|
|
999
|
+
urlParameters: [Parameters.$host, Parameters.billingAccountName],
|
|
1000
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1001
|
+
mediaType: "json",
|
|
1002
|
+
serializer
|
|
1003
|
+
};
|
|
1004
|
+
const listByBillingSubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
1005
|
+
path:
|
|
1006
|
+
"/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices",
|
|
1007
|
+
httpMethod: "GET",
|
|
1008
|
+
responses: {
|
|
1009
|
+
200: {
|
|
1010
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
1011
|
+
},
|
|
1012
|
+
default: {
|
|
1013
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
queryParameters: [
|
|
1017
|
+
Parameters.apiVersion,
|
|
1018
|
+
Parameters.periodStartDate,
|
|
1019
|
+
Parameters.periodEndDate
|
|
1020
|
+
],
|
|
1021
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
1022
|
+
headerParameters: [Parameters.accept],
|
|
1023
|
+
serializer
|
|
1024
|
+
};
|
|
1025
|
+
const getBySubscriptionAndInvoiceIdOperationSpec: coreClient.OperationSpec = {
|
|
1026
|
+
path:
|
|
1027
|
+
"/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}",
|
|
1028
|
+
httpMethod: "GET",
|
|
1029
|
+
responses: {
|
|
1030
|
+
200: {
|
|
1031
|
+
bodyMapper: Mappers.Invoice
|
|
1032
|
+
},
|
|
1033
|
+
default: {
|
|
1034
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
queryParameters: [Parameters.apiVersion],
|
|
1038
|
+
urlParameters: [
|
|
1039
|
+
Parameters.$host,
|
|
1040
|
+
Parameters.subscriptionId,
|
|
1041
|
+
Parameters.invoiceName
|
|
1042
|
+
],
|
|
1043
|
+
headerParameters: [Parameters.accept],
|
|
1044
|
+
serializer
|
|
1045
|
+
};
|
|
1046
|
+
const downloadBillingSubscriptionInvoiceOperationSpec: coreClient.OperationSpec = {
|
|
1047
|
+
path:
|
|
1048
|
+
"/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download",
|
|
1049
|
+
httpMethod: "POST",
|
|
1050
|
+
responses: {
|
|
1051
|
+
200: {
|
|
1052
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1053
|
+
},
|
|
1054
|
+
201: {
|
|
1055
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1056
|
+
},
|
|
1057
|
+
202: {
|
|
1058
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1059
|
+
},
|
|
1060
|
+
204: {
|
|
1061
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1062
|
+
},
|
|
1063
|
+
default: {
|
|
1064
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
queryParameters: [Parameters.apiVersion, Parameters.downloadToken],
|
|
1068
|
+
urlParameters: [
|
|
1069
|
+
Parameters.$host,
|
|
1070
|
+
Parameters.subscriptionId,
|
|
1071
|
+
Parameters.invoiceName
|
|
1072
|
+
],
|
|
1073
|
+
headerParameters: [Parameters.accept],
|
|
1074
|
+
serializer
|
|
1075
|
+
};
|
|
1076
|
+
const downloadMultipleBillingSubscriptionInvoicesOperationSpec: coreClient.OperationSpec = {
|
|
1077
|
+
path:
|
|
1078
|
+
"/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments",
|
|
1079
|
+
httpMethod: "POST",
|
|
1080
|
+
responses: {
|
|
1081
|
+
200: {
|
|
1082
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1083
|
+
},
|
|
1084
|
+
201: {
|
|
1085
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1086
|
+
},
|
|
1087
|
+
202: {
|
|
1088
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1089
|
+
},
|
|
1090
|
+
204: {
|
|
1091
|
+
bodyMapper: Mappers.DownloadUrl
|
|
1092
|
+
},
|
|
1093
|
+
default: {
|
|
1094
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
requestBody: Parameters.downloadUrls,
|
|
1098
|
+
queryParameters: [Parameters.apiVersion],
|
|
1099
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
1100
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
1101
|
+
mediaType: "json",
|
|
1102
|
+
serializer
|
|
1103
|
+
};
|
|
1104
|
+
const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {
|
|
1105
|
+
path: "{nextLink}",
|
|
1106
|
+
httpMethod: "GET",
|
|
1107
|
+
responses: {
|
|
1108
|
+
200: {
|
|
1109
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
1110
|
+
},
|
|
1111
|
+
default: {
|
|
1112
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
queryParameters: [
|
|
1116
|
+
Parameters.apiVersion,
|
|
1117
|
+
Parameters.periodStartDate,
|
|
1118
|
+
Parameters.periodEndDate
|
|
1119
|
+
],
|
|
1120
|
+
urlParameters: [
|
|
1121
|
+
Parameters.$host,
|
|
1122
|
+
Parameters.billingAccountName,
|
|
1123
|
+
Parameters.nextLink
|
|
1124
|
+
],
|
|
1125
|
+
headerParameters: [Parameters.accept],
|
|
1126
|
+
serializer
|
|
1127
|
+
};
|
|
1128
|
+
const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {
|
|
1129
|
+
path: "{nextLink}",
|
|
1130
|
+
httpMethod: "GET",
|
|
1131
|
+
responses: {
|
|
1132
|
+
200: {
|
|
1133
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
1134
|
+
},
|
|
1135
|
+
default: {
|
|
1136
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
queryParameters: [
|
|
1140
|
+
Parameters.apiVersion,
|
|
1141
|
+
Parameters.periodStartDate,
|
|
1142
|
+
Parameters.periodEndDate
|
|
1143
|
+
],
|
|
1144
|
+
urlParameters: [
|
|
1145
|
+
Parameters.$host,
|
|
1146
|
+
Parameters.billingAccountName,
|
|
1147
|
+
Parameters.nextLink,
|
|
1148
|
+
Parameters.billingProfileName
|
|
1149
|
+
],
|
|
1150
|
+
headerParameters: [Parameters.accept],
|
|
1151
|
+
serializer
|
|
1152
|
+
};
|
|
1153
|
+
const listByBillingSubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
1154
|
+
path: "{nextLink}",
|
|
1155
|
+
httpMethod: "GET",
|
|
1156
|
+
responses: {
|
|
1157
|
+
200: {
|
|
1158
|
+
bodyMapper: Mappers.InvoiceListResult
|
|
1159
|
+
},
|
|
1160
|
+
default: {
|
|
1161
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
queryParameters: [
|
|
1165
|
+
Parameters.apiVersion,
|
|
1166
|
+
Parameters.periodStartDate,
|
|
1167
|
+
Parameters.periodEndDate
|
|
1168
|
+
],
|
|
1169
|
+
urlParameters: [
|
|
1170
|
+
Parameters.$host,
|
|
1171
|
+
Parameters.nextLink,
|
|
1172
|
+
Parameters.subscriptionId
|
|
1173
|
+
],
|
|
1174
|
+
headerParameters: [Parameters.accept],
|
|
1175
|
+
serializer
|
|
1176
|
+
};
|