@azure/arm-billing 3.1.1 → 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.
Files changed (473) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +69 -81
  4. package/dist/index.js +10450 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/billingManagementClient.d.ts +37 -0
  9. package/dist-esm/src/billingManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/billingManagementClient.js +70 -0
  11. package/dist-esm/src/billingManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +3244 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +272 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +86 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +2114 -1808
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +45 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +374 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/address.d.ts +20 -0
  33. package/dist-esm/src/operations/address.d.ts.map +1 -0
  34. package/dist-esm/src/operations/address.js +50 -0
  35. package/dist-esm/src/operations/address.js.map +1 -0
  36. package/dist-esm/src/operations/agreements.d.ts +42 -0
  37. package/dist-esm/src/operations/agreements.d.ts.map +1 -0
  38. package/dist-esm/src/operations/agreements.js +156 -0
  39. package/dist-esm/src/operations/agreements.js.map +1 -0
  40. package/dist-esm/src/operations/availableBalances.d.ts +22 -0
  41. package/dist-esm/src/operations/availableBalances.d.ts.map +1 -0
  42. package/dist-esm/src/operations/availableBalances.js +54 -0
  43. package/dist-esm/src/operations/availableBalances.js.map +1 -0
  44. package/dist-esm/src/operations/billingAccounts.d.ts +79 -0
  45. package/dist-esm/src/operations/billingAccounts.d.ts.map +1 -0
  46. package/dist-esm/src/operations/billingAccounts.js +330 -0
  47. package/dist-esm/src/operations/billingAccounts.js.map +1 -0
  48. package/dist-esm/src/operations/billingPeriods.d.ts +44 -0
  49. package/dist-esm/src/operations/billingPeriods.d.ts.map +1 -0
  50. package/dist-esm/src/operations/billingPeriods.js +168 -0
  51. package/dist-esm/src/operations/billingPeriods.js.map +1 -0
  52. package/dist-esm/src/operations/billingPermissions.d.ts +110 -0
  53. package/dist-esm/src/operations/billingPermissions.d.ts.map +1 -0
  54. package/dist-esm/src/operations/billingPermissions.js +468 -0
  55. package/dist-esm/src/operations/billingPermissions.js.map +1 -0
  56. package/dist-esm/src/operations/billingProfiles.d.ts +64 -0
  57. package/dist-esm/src/operations/billingProfiles.d.ts.map +1 -0
  58. package/dist-esm/src/operations/billingProfiles.js +245 -0
  59. package/dist-esm/src/operations/billingProfiles.js.map +1 -0
  60. package/dist-esm/src/operations/billingPropertyOperations.d.ts +26 -0
  61. package/dist-esm/src/operations/billingPropertyOperations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/billingPropertyOperations.js +74 -0
  63. package/dist-esm/src/operations/billingPropertyOperations.js.map +1 -0
  64. package/dist-esm/src/operations/billingRoleAssignments.d.ts +146 -0
  65. package/dist-esm/src/operations/billingRoleAssignments.d.ts.map +1 -0
  66. package/dist-esm/src/operations/billingRoleAssignments.js +578 -0
  67. package/dist-esm/src/operations/billingRoleAssignments.js.map +1 -0
  68. package/dist-esm/src/operations/billingRoleDefinitions.d.ts +119 -0
  69. package/dist-esm/src/operations/billingRoleDefinitions.d.ts.map +1 -0
  70. package/dist-esm/src/operations/billingRoleDefinitions.js +471 -0
  71. package/dist-esm/src/operations/billingRoleDefinitions.js.map +1 -0
  72. package/dist-esm/src/operations/billingSubscriptions.d.ts +160 -0
  73. package/dist-esm/src/operations/billingSubscriptions.d.ts.map +1 -0
  74. package/dist-esm/src/operations/billingSubscriptions.js +655 -0
  75. package/dist-esm/src/operations/billingSubscriptions.js.map +1 -0
  76. package/dist-esm/src/operations/customers.d.ts +71 -0
  77. package/dist-esm/src/operations/customers.d.ts.map +1 -0
  78. package/dist-esm/src/operations/customers.js +287 -0
  79. package/dist-esm/src/operations/customers.js.map +1 -0
  80. package/dist-esm/src/operations/enrollmentAccounts.d.ts +38 -0
  81. package/dist-esm/src/operations/enrollmentAccounts.d.ts.map +1 -0
  82. package/dist-esm/src/operations/enrollmentAccounts.js +144 -0
  83. package/dist-esm/src/operations/enrollmentAccounts.js.map +1 -0
  84. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  85. package/dist-esm/src/operations/index.d.ts.map +1 -0
  86. package/{esm → dist-esm/src}/operations/index.js +4 -5
  87. package/dist-esm/src/operations/index.js.map +1 -0
  88. package/dist-esm/src/operations/instructions.d.ts +57 -0
  89. package/dist-esm/src/operations/instructions.d.ts.map +1 -0
  90. package/dist-esm/src/operations/instructions.js +208 -0
  91. package/dist-esm/src/operations/instructions.js.map +1 -0
  92. package/dist-esm/src/operations/invoiceSections.d.ts +70 -0
  93. package/dist-esm/src/operations/invoiceSections.d.ts.map +1 -0
  94. package/dist-esm/src/operations/invoiceSections.js +264 -0
  95. package/dist-esm/src/operations/invoiceSections.js.map +1 -0
  96. package/dist-esm/src/operations/invoices.d.ts +202 -0
  97. package/dist-esm/src/operations/invoices.d.ts.map +1 -0
  98. package/dist-esm/src/operations/invoices.js +817 -0
  99. package/dist-esm/src/operations/invoices.js.map +1 -0
  100. package/dist-esm/src/operations/operations.d.ts +32 -0
  101. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  102. package/dist-esm/src/operations/operations.js +120 -0
  103. package/dist-esm/src/operations/operations.js.map +1 -0
  104. package/dist-esm/src/operations/policies.d.ts +47 -0
  105. package/dist-esm/src/operations/policies.d.ts.map +1 -0
  106. package/dist-esm/src/operations/policies.js +149 -0
  107. package/dist-esm/src/operations/policies.js.map +1 -0
  108. package/dist-esm/src/operations/products.d.ts +160 -0
  109. package/dist-esm/src/operations/products.d.ts.map +1 -0
  110. package/dist-esm/src/operations/products.js +615 -0
  111. package/dist-esm/src/operations/products.js.map +1 -0
  112. package/dist-esm/src/operations/reservations.d.ts +63 -0
  113. package/dist-esm/src/operations/reservations.d.ts.map +1 -0
  114. package/dist-esm/src/operations/reservations.js +265 -0
  115. package/dist-esm/src/operations/reservations.js.map +1 -0
  116. package/dist-esm/src/operations/transactions.d.ts +40 -0
  117. package/dist-esm/src/operations/transactions.d.ts.map +1 -0
  118. package/dist-esm/src/operations/transactions.js +137 -0
  119. package/dist-esm/src/operations/transactions.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/address.d.ts +12 -0
  121. package/dist-esm/src/operationsInterfaces/address.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/address.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/address.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/agreements.d.ts +19 -0
  125. package/dist-esm/src/operationsInterfaces/agreements.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/agreements.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/agreements.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/availableBalances.d.ts +14 -0
  129. package/dist-esm/src/operationsInterfaces/availableBalances.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/availableBalances.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/availableBalances.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/billingAccounts.d.ts +41 -0
  133. package/dist-esm/src/operationsInterfaces/billingAccounts.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/billingAccounts.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/billingAccounts.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/billingPeriods.d.ts +21 -0
  137. package/dist-esm/src/operationsInterfaces/billingPeriods.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/billingPeriods.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/billingPeriods.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/billingPermissions.d.ts +34 -0
  141. package/dist-esm/src/operationsInterfaces/billingPermissions.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/billingPermissions.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/billingPermissions.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/billingProfiles.d.ts +40 -0
  145. package/dist-esm/src/operationsInterfaces/billingProfiles.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/billingProfiles.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/billingProfiles.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/billingPropertyOperations.d.ts +18 -0
  149. package/dist-esm/src/operationsInterfaces/billingPropertyOperations.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/billingPropertyOperations.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/billingPropertyOperations.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/billingRoleAssignments.d.ts +84 -0
  153. package/dist-esm/src/operationsInterfaces/billingRoleAssignments.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/billingRoleAssignments.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/billingRoleAssignments.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.d.ts +57 -0
  157. package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/billingRoleDefinitions.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/billingSubscriptions.d.ts +80 -0
  161. package/dist-esm/src/operationsInterfaces/billingSubscriptions.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/billingSubscriptions.js +9 -0
  163. package/dist-esm/src/operationsInterfaces/billingSubscriptions.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/customers.d.ts +29 -0
  165. package/dist-esm/src/operationsInterfaces/customers.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/customers.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/customers.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/enrollmentAccounts.d.ts +17 -0
  169. package/dist-esm/src/operationsInterfaces/enrollmentAccounts.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/enrollmentAccounts.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/enrollmentAccounts.js.map +1 -0
  172. package/dist-esm/src/operationsInterfaces/index.d.ts +22 -0
  173. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  174. package/dist-esm/src/operationsInterfaces/index.js +29 -0
  175. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  176. package/dist-esm/src/operationsInterfaces/instructions.d.ts +32 -0
  177. package/dist-esm/src/operationsInterfaces/instructions.d.ts.map +1 -0
  178. package/dist-esm/src/operationsInterfaces/instructions.js +9 -0
  179. package/dist-esm/src/operationsInterfaces/instructions.js.map +1 -0
  180. package/dist-esm/src/operationsInterfaces/invoiceSections.d.ts +44 -0
  181. package/dist-esm/src/operationsInterfaces/invoiceSections.d.ts.map +1 -0
  182. package/dist-esm/src/operationsInterfaces/invoiceSections.js +9 -0
  183. package/dist-esm/src/operationsInterfaces/invoiceSections.js.map +1 -0
  184. package/dist-esm/src/operationsInterfaces/invoices.d.ts +124 -0
  185. package/dist-esm/src/operationsInterfaces/invoices.d.ts.map +1 -0
  186. package/dist-esm/src/operationsInterfaces/invoices.js +9 -0
  187. package/dist-esm/src/operationsInterfaces/invoices.js.map +1 -0
  188. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  189. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  190. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  191. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  192. package/dist-esm/src/operationsInterfaces/policies.d.ts +39 -0
  193. package/dist-esm/src/operationsInterfaces/policies.d.ts.map +1 -0
  194. package/dist-esm/src/operationsInterfaces/policies.js +9 -0
  195. package/dist-esm/src/operationsInterfaces/policies.js.map +1 -0
  196. package/dist-esm/src/operationsInterfaces/products.d.ts +78 -0
  197. package/dist-esm/src/operationsInterfaces/products.d.ts.map +1 -0
  198. package/dist-esm/src/operationsInterfaces/products.js +9 -0
  199. package/dist-esm/src/operationsInterfaces/products.js.map +1 -0
  200. package/dist-esm/src/operationsInterfaces/reservations.d.ts +21 -0
  201. package/dist-esm/src/operationsInterfaces/reservations.d.ts.map +1 -0
  202. package/dist-esm/src/operationsInterfaces/reservations.js +9 -0
  203. package/dist-esm/src/operationsInterfaces/reservations.js.map +1 -0
  204. package/dist-esm/src/operationsInterfaces/transactions.d.ts +14 -0
  205. package/dist-esm/src/operationsInterfaces/transactions.d.ts.map +1 -0
  206. package/dist-esm/src/operationsInterfaces/transactions.js +9 -0
  207. package/dist-esm/src/operationsInterfaces/transactions.js.map +1 -0
  208. package/dist-esm/test/sampleTest.d.ts +2 -0
  209. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  210. package/dist-esm/test/sampleTest.js +40 -0
  211. package/dist-esm/test/sampleTest.js.map +1 -0
  212. package/package.json +65 -32
  213. package/review/arm-billing.api.md +2361 -0
  214. package/rollup.config.js +181 -30
  215. package/src/billingManagementClient.ts +144 -73
  216. package/src/index.ts +12 -0
  217. package/src/lroImpl.ts +34 -0
  218. package/src/models/index.ts +2567 -3859
  219. package/src/models/mappers.ts +2120 -1803
  220. package/src/models/parameters.ts +257 -103
  221. package/src/operations/address.ts +38 -56
  222. package/src/operations/agreements.ts +133 -118
  223. package/src/operations/availableBalances.ts +41 -56
  224. package/src/operations/billingAccounts.ts +314 -229
  225. package/src/operations/billingPeriods.ts +131 -122
  226. package/src/operations/billingPermissions.ts +468 -275
  227. package/src/operations/billingProfiles.ts +236 -165
  228. package/src/operations/billingPropertyOperations.ts +55 -94
  229. package/src/operations/billingRoleAssignments.ts +506 -453
  230. package/src/operations/billingRoleDefinitions.ts +436 -334
  231. package/src/operations/billingSubscriptions.ts +669 -487
  232. package/src/operations/customers.ts +263 -187
  233. package/src/operations/enrollmentAccounts.ts +104 -108
  234. package/src/operations/index.ts +4 -5
  235. package/src/operations/instructions.ts +182 -167
  236. package/src/operations/invoiceSections.ts +265 -167
  237. package/src/operations/invoices.ts +903 -544
  238. package/src/operations/operations.ts +87 -73
  239. package/src/operations/policies.ts +112 -188
  240. package/src/operations/products.ts +599 -501
  241. package/src/operations/reservations.ts +344 -0
  242. package/src/operations/transactions.ts +133 -81
  243. package/src/operationsInterfaces/address.ts +27 -0
  244. package/src/operationsInterfaces/agreements.ts +40 -0
  245. package/src/operationsInterfaces/availableBalances.ts +29 -0
  246. package/src/operationsInterfaces/billingAccounts.ts +81 -0
  247. package/src/operationsInterfaces/billingPeriods.ts +40 -0
  248. package/src/operationsInterfaces/billingPermissions.ts +65 -0
  249. package/src/operationsInterfaces/billingProfiles.ts +78 -0
  250. package/src/operationsInterfaces/billingPropertyOperations.ts +37 -0
  251. package/src/operationsInterfaces/billingRoleAssignments.ts +152 -0
  252. package/src/operationsInterfaces/billingRoleDefinitions.ts +104 -0
  253. package/src/operationsInterfaces/billingSubscriptions.ts +144 -0
  254. package/src/operationsInterfaces/customers.ts +55 -0
  255. package/src/operationsInterfaces/enrollmentAccounts.ts +36 -0
  256. package/src/operationsInterfaces/index.ts +29 -0
  257. package/src/operationsInterfaces/instructions.ts +63 -0
  258. package/src/operationsInterfaces/invoiceSections.ts +86 -0
  259. package/src/operationsInterfaces/invoices.ts +233 -0
  260. package/src/operationsInterfaces/operations.ts +22 -0
  261. package/src/operationsInterfaces/policies.ts +76 -0
  262. package/src/operationsInterfaces/products.ts +137 -0
  263. package/src/operationsInterfaces/reservations.ts +41 -0
  264. package/src/operationsInterfaces/transactions.ts +30 -0
  265. package/tsconfig.json +3 -3
  266. package/types/arm-billing.d.ts +4451 -0
  267. package/types/tsdoc-metadata.json +11 -0
  268. package/dist/arm-billing.js +0 -8674
  269. package/dist/arm-billing.js.map +0 -1
  270. package/dist/arm-billing.min.js +0 -1
  271. package/dist/arm-billing.min.js.map +0 -1
  272. package/esm/billingManagementClient.d.ts +0 -43
  273. package/esm/billingManagementClient.d.ts.map +0 -1
  274. package/esm/billingManagementClient.js +0 -57
  275. package/esm/billingManagementClient.js.map +0 -1
  276. package/esm/billingManagementClientContext.d.ts +0 -21
  277. package/esm/billingManagementClientContext.d.ts.map +0 -1
  278. package/esm/billingManagementClientContext.js +0 -60
  279. package/esm/billingManagementClientContext.js.map +0 -1
  280. package/esm/models/addressMappers.d.ts +0 -2
  281. package/esm/models/addressMappers.d.ts.map +0 -1
  282. package/esm/models/addressMappers.js +0 -9
  283. package/esm/models/addressMappers.js.map +0 -1
  284. package/esm/models/agreementsMappers.d.ts +0 -2
  285. package/esm/models/agreementsMappers.d.ts.map +0 -1
  286. package/esm/models/agreementsMappers.js +0 -9
  287. package/esm/models/agreementsMappers.js.map +0 -1
  288. package/esm/models/availableBalancesMappers.d.ts +0 -2
  289. package/esm/models/availableBalancesMappers.d.ts.map +0 -1
  290. package/esm/models/availableBalancesMappers.js +0 -9
  291. package/esm/models/availableBalancesMappers.js.map +0 -1
  292. package/esm/models/billingAccountsMappers.d.ts +0 -2
  293. package/esm/models/billingAccountsMappers.d.ts.map +0 -1
  294. package/esm/models/billingAccountsMappers.js +0 -9
  295. package/esm/models/billingAccountsMappers.js.map +0 -1
  296. package/esm/models/billingPeriodsMappers.d.ts +0 -2
  297. package/esm/models/billingPeriodsMappers.d.ts.map +0 -1
  298. package/esm/models/billingPeriodsMappers.js +0 -9
  299. package/esm/models/billingPeriodsMappers.js.map +0 -1
  300. package/esm/models/billingPermissionsMappers.d.ts +0 -2
  301. package/esm/models/billingPermissionsMappers.d.ts.map +0 -1
  302. package/esm/models/billingPermissionsMappers.js +0 -9
  303. package/esm/models/billingPermissionsMappers.js.map +0 -1
  304. package/esm/models/billingProfilesMappers.d.ts +0 -2
  305. package/esm/models/billingProfilesMappers.d.ts.map +0 -1
  306. package/esm/models/billingProfilesMappers.js +0 -9
  307. package/esm/models/billingProfilesMappers.js.map +0 -1
  308. package/esm/models/billingPropertyOperationsMappers.d.ts +0 -2
  309. package/esm/models/billingPropertyOperationsMappers.d.ts.map +0 -1
  310. package/esm/models/billingPropertyOperationsMappers.js +0 -9
  311. package/esm/models/billingPropertyOperationsMappers.js.map +0 -1
  312. package/esm/models/billingRoleAssignmentsMappers.d.ts +0 -2
  313. package/esm/models/billingRoleAssignmentsMappers.d.ts.map +0 -1
  314. package/esm/models/billingRoleAssignmentsMappers.js +0 -9
  315. package/esm/models/billingRoleAssignmentsMappers.js.map +0 -1
  316. package/esm/models/billingRoleDefinitionsMappers.d.ts +0 -2
  317. package/esm/models/billingRoleDefinitionsMappers.d.ts.map +0 -1
  318. package/esm/models/billingRoleDefinitionsMappers.js +0 -9
  319. package/esm/models/billingRoleDefinitionsMappers.js.map +0 -1
  320. package/esm/models/billingSubscriptionsMappers.d.ts +0 -2
  321. package/esm/models/billingSubscriptionsMappers.d.ts.map +0 -1
  322. package/esm/models/billingSubscriptionsMappers.js +0 -9
  323. package/esm/models/billingSubscriptionsMappers.js.map +0 -1
  324. package/esm/models/customersMappers.d.ts +0 -2
  325. package/esm/models/customersMappers.d.ts.map +0 -1
  326. package/esm/models/customersMappers.js +0 -9
  327. package/esm/models/customersMappers.js.map +0 -1
  328. package/esm/models/enrollmentAccountsMappers.d.ts +0 -2
  329. package/esm/models/enrollmentAccountsMappers.d.ts.map +0 -1
  330. package/esm/models/enrollmentAccountsMappers.js +0 -9
  331. package/esm/models/enrollmentAccountsMappers.js.map +0 -1
  332. package/esm/models/index.d.ts +0 -4587
  333. package/esm/models/index.d.ts.map +0 -1
  334. package/esm/models/index.js +0 -8
  335. package/esm/models/index.js.map +0 -1
  336. package/esm/models/instructionsMappers.d.ts +0 -2
  337. package/esm/models/instructionsMappers.d.ts.map +0 -1
  338. package/esm/models/instructionsMappers.js +0 -9
  339. package/esm/models/instructionsMappers.js.map +0 -1
  340. package/esm/models/invoiceSectionsMappers.d.ts +0 -2
  341. package/esm/models/invoiceSectionsMappers.d.ts.map +0 -1
  342. package/esm/models/invoiceSectionsMappers.js +0 -9
  343. package/esm/models/invoiceSectionsMappers.js.map +0 -1
  344. package/esm/models/invoicesMappers.d.ts +0 -2
  345. package/esm/models/invoicesMappers.d.ts.map +0 -1
  346. package/esm/models/invoicesMappers.js +0 -9
  347. package/esm/models/invoicesMappers.js.map +0 -1
  348. package/esm/models/mappers.d.ts +0 -82
  349. package/esm/models/mappers.d.ts.map +0 -1
  350. package/esm/models/mappers.js.map +0 -1
  351. package/esm/models/operationsMappers.d.ts +0 -2
  352. package/esm/models/operationsMappers.d.ts.map +0 -1
  353. package/esm/models/operationsMappers.js +0 -9
  354. package/esm/models/operationsMappers.js.map +0 -1
  355. package/esm/models/parameters.d.ts +0 -27
  356. package/esm/models/parameters.d.ts.map +0 -1
  357. package/esm/models/parameters.js +0 -279
  358. package/esm/models/parameters.js.map +0 -1
  359. package/esm/models/policiesMappers.d.ts +0 -2
  360. package/esm/models/policiesMappers.d.ts.map +0 -1
  361. package/esm/models/policiesMappers.js +0 -9
  362. package/esm/models/policiesMappers.js.map +0 -1
  363. package/esm/models/productsMappers.d.ts +0 -2
  364. package/esm/models/productsMappers.d.ts.map +0 -1
  365. package/esm/models/productsMappers.js +0 -9
  366. package/esm/models/productsMappers.js.map +0 -1
  367. package/esm/models/transactionsMappers.d.ts +0 -2
  368. package/esm/models/transactionsMappers.d.ts.map +0 -1
  369. package/esm/models/transactionsMappers.js +0 -9
  370. package/esm/models/transactionsMappers.js.map +0 -1
  371. package/esm/operations/address.d.ts +0 -32
  372. package/esm/operations/address.d.ts.map +0 -1
  373. package/esm/operations/address.js +0 -57
  374. package/esm/operations/address.js.map +0 -1
  375. package/esm/operations/agreements.d.ts +0 -70
  376. package/esm/operations/agreements.d.ts.map +0 -1
  377. package/esm/operations/agreements.js +0 -113
  378. package/esm/operations/agreements.js.map +0 -1
  379. package/esm/operations/availableBalances.d.ts +0 -36
  380. package/esm/operations/availableBalances.d.ts.map +0 -1
  381. package/esm/operations/availableBalances.js +0 -57
  382. package/esm/operations/availableBalances.js.map +0 -1
  383. package/esm/operations/billingAccounts.d.ts +0 -127
  384. package/esm/operations/billingAccounts.d.ts.map +0 -1
  385. package/esm/operations/billingAccounts.js +0 -218
  386. package/esm/operations/billingAccounts.js.map +0 -1
  387. package/esm/operations/billingPeriods.d.ts +0 -70
  388. package/esm/operations/billingPeriods.d.ts.map +0 -1
  389. package/esm/operations/billingPeriods.js +0 -112
  390. package/esm/operations/billingPeriods.js.map +0 -1
  391. package/esm/operations/billingPermissions.d.ts +0 -169
  392. package/esm/operations/billingPermissions.d.ts.map +0 -1
  393. package/esm/operations/billingPermissions.js +0 -251
  394. package/esm/operations/billingPermissions.js.map +0 -1
  395. package/esm/operations/billingProfiles.d.ts +0 -94
  396. package/esm/operations/billingProfiles.d.ts.map +0 -1
  397. package/esm/operations/billingProfiles.js +0 -176
  398. package/esm/operations/billingProfiles.js.map +0 -1
  399. package/esm/operations/billingPropertyOperations.d.ts +0 -46
  400. package/esm/operations/billingPropertyOperations.d.ts.map +0 -1
  401. package/esm/operations/billingPropertyOperations.js +0 -91
  402. package/esm/operations/billingPropertyOperations.js.map +0 -1
  403. package/esm/operations/billingRoleAssignments.d.ts +0 -292
  404. package/esm/operations/billingRoleAssignments.d.ts.map +0 -1
  405. package/esm/operations/billingRoleAssignments.js +0 -387
  406. package/esm/operations/billingRoleAssignments.js.map +0 -1
  407. package/esm/operations/billingRoleDefinitions.d.ts +0 -211
  408. package/esm/operations/billingRoleDefinitions.d.ts.map +0 -1
  409. package/esm/operations/billingRoleDefinitions.js +0 -291
  410. package/esm/operations/billingRoleDefinitions.js.map +0 -1
  411. package/esm/operations/billingSubscriptions.d.ts +0 -267
  412. package/esm/operations/billingSubscriptions.d.ts.map +0 -1
  413. package/esm/operations/billingSubscriptions.js +0 -414
  414. package/esm/operations/billingSubscriptions.js.map +0 -1
  415. package/esm/operations/customers.d.ts +0 -114
  416. package/esm/operations/customers.d.ts.map +0 -1
  417. package/esm/operations/customers.js +0 -172
  418. package/esm/operations/customers.js.map +0 -1
  419. package/esm/operations/enrollmentAccounts.d.ts +0 -64
  420. package/esm/operations/enrollmentAccounts.d.ts.map +0 -1
  421. package/esm/operations/enrollmentAccounts.js +0 -105
  422. package/esm/operations/enrollmentAccounts.js.map +0 -1
  423. package/esm/operations/index.d.ts.map +0 -1
  424. package/esm/operations/index.js.map +0 -1
  425. package/esm/operations/instructions.d.ts +0 -105
  426. package/esm/operations/instructions.d.ts.map +0 -1
  427. package/esm/operations/instructions.js +0 -153
  428. package/esm/operations/instructions.js.map +0 -1
  429. package/esm/operations/invoiceSections.d.ts +0 -102
  430. package/esm/operations/invoiceSections.d.ts.map +0 -1
  431. package/esm/operations/invoiceSections.js +0 -182
  432. package/esm/operations/invoiceSections.js.map +0 -1
  433. package/esm/operations/invoices.d.ts +0 -291
  434. package/esm/operations/invoices.d.ts.map +0 -1
  435. package/esm/operations/invoices.js +0 -539
  436. package/esm/operations/invoices.js.map +0 -1
  437. package/esm/operations/operations.d.ts +0 -46
  438. package/esm/operations/operations.d.ts.map +0 -1
  439. package/esm/operations/operations.js +0 -77
  440. package/esm/operations/operations.js.map +0 -1
  441. package/esm/operations/policies.d.ts +0 -104
  442. package/esm/operations/policies.d.ts.map +0 -1
  443. package/esm/operations/policies.js +0 -162
  444. package/esm/operations/policies.js.map +0 -1
  445. package/esm/operations/products.d.ts +0 -279
  446. package/esm/operations/products.d.ts.map +0 -1
  447. package/esm/operations/products.js +0 -403
  448. package/esm/operations/products.js.map +0 -1
  449. package/esm/operations/transactions.d.ts +0 -54
  450. package/esm/operations/transactions.d.ts.map +0 -1
  451. package/esm/operations/transactions.js +0 -83
  452. package/esm/operations/transactions.js.map +0 -1
  453. package/src/billingManagementClientContext.ts +0 -66
  454. package/src/models/addressMappers.ts +0 -15
  455. package/src/models/agreementsMappers.ts +0 -50
  456. package/src/models/availableBalancesMappers.ts +0 -49
  457. package/src/models/billingAccountsMappers.ts +0 -53
  458. package/src/models/billingPeriodsMappers.ts +0 -50
  459. package/src/models/billingPermissionsMappers.ts +0 -15
  460. package/src/models/billingProfilesMappers.ts +0 -51
  461. package/src/models/billingPropertyOperationsMappers.ts +0 -49
  462. package/src/models/billingRoleAssignmentsMappers.ts +0 -50
  463. package/src/models/billingRoleDefinitionsMappers.ts +0 -50
  464. package/src/models/billingSubscriptionsMappers.ts +0 -54
  465. package/src/models/customersMappers.ts +0 -50
  466. package/src/models/enrollmentAccountsMappers.ts +0 -50
  467. package/src/models/instructionsMappers.ts +0 -50
  468. package/src/models/invoiceSectionsMappers.ts +0 -51
  469. package/src/models/invoicesMappers.ts +0 -55
  470. package/src/models/operationsMappers.ts +0 -16
  471. package/src/models/policiesMappers.ts +0 -49
  472. package/src/models/productsMappers.ts +0 -54
  473. package/src/models/transactionsMappers.ts +0 -50
@@ -1,112 +1,352 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/invoicesMappers";
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";
15
13
  import * as Parameters from "../models/parameters";
16
- import { BillingManagementClientContext } from "../billingManagementClientContext";
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";
17
46
 
18
- /** Class representing a Invoices. */
19
- export class Invoices {
20
- private readonly client: BillingManagementClientContext;
47
+ /// <reference lib="esnext.asynciterable" />
48
+ /** Class containing Invoices operations. */
49
+ export class InvoicesImpl implements Invoices {
50
+ private readonly client: BillingManagementClient;
21
51
 
22
52
  /**
23
- * Create a Invoices.
24
- * @param {BillingManagementClientContext} client Reference to the service client.
53
+ * Initialize a new instance of the class Invoices class.
54
+ * @param client Reference to the service client
25
55
  */
26
- constructor(client: BillingManagementClientContext) {
56
+ constructor(client: BillingManagementClient) {
27
57
  this.client = client;
28
58
  }
29
59
 
30
60
  /**
31
61
  * Lists the invoices for a billing account for a given start date and end date. The operation is
32
- * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft
33
- * Customer Agreement.
62
+ * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
63
+ * Agreement.
34
64
  * @param billingAccountName The ID that uniquely identifies a billing account.
35
65
  * @param periodStartDate The start date to fetch the invoices. The date should be specified in
36
- * MM-DD-YYYY format.
37
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
38
- * MM-DD-YYYY format.
39
- * @param [options] The optional parameters
40
- * @returns Promise<Models.InvoicesListByBillingAccountResponse>
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.
41
70
  */
42
- listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingAccountResponse>;
43
- /**
44
- * @param billingAccountName The ID that uniquely identifies a billing account.
45
- * @param periodStartDate The start date to fetch the invoices. The date should be specified in
46
- * MM-DD-YYYY format.
47
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
48
- * MM-DD-YYYY format.
49
- * @param callback The callback
50
- */
51
- listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
52
- /**
53
- * @param billingAccountName The ID that uniquely identifies a billing account.
54
- * @param periodStartDate The start date to fetch the invoices. The date should be specified in
55
- * MM-DD-YYYY format.
56
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
57
- * MM-DD-YYYY format.
58
- * @param options The optional parameters
59
- * @param callback The callback
60
- */
61
- listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
62
- listByBillingAccount(billingAccountName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingAccountResponse> {
63
- return this.client.sendOperationRequest(
64
- {
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(
65
117
  billingAccountName,
66
118
  periodStartDate,
67
119
  periodEndDate,
120
+ continuationToken,
68
121
  options
69
- },
70
- listByBillingAccountOperationSpec,
71
- callback) as Promise<Models.InvoicesListByBillingAccountResponse>;
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
+ }
72
142
  }
73
143
 
74
144
  /**
75
145
  * Lists the invoices for a billing profile for a given start date and end date. The operation is
76
- * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft
77
- * Customer Agreement.
146
+ * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer
147
+ * Agreement.
78
148
  * @param billingAccountName The ID that uniquely identifies a billing account.
79
149
  * @param billingProfileName The ID that uniquely identifies a billing profile.
80
150
  * @param periodStartDate The start date to fetch the invoices. The date should be specified in
81
- * MM-DD-YYYY format.
82
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
83
- * MM-DD-YYYY format.
84
- * @param [options] The optional parameters
85
- * @returns Promise<Models.InvoicesListByBillingProfileResponse>
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.
86
155
  */
87
- listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingProfileResponse>;
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
+
88
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.
89
312
  * @param billingAccountName The ID that uniquely identifies a billing account.
90
- * @param billingProfileName The ID that uniquely identifies a billing profile.
91
313
  * @param periodStartDate The start date to fetch the invoices. The date should be specified in
92
- * MM-DD-YYYY format.
93
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
94
- * MM-DD-YYYY format.
95
- * @param callback The callback
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.
96
318
  */
97
- listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
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
+
98
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.
99
335
  * @param billingAccountName The ID that uniquely identifies a billing account.
100
336
  * @param billingProfileName The ID that uniquely identifies a billing profile.
101
337
  * @param periodStartDate The start date to fetch the invoices. The date should be specified in
102
- * MM-DD-YYYY format.
103
- * @param periodEndDate The end date to fetch the invoices. The date should be specified in
104
- * MM-DD-YYYY format.
105
- * @param options The optional parameters
106
- * @param callback The callback
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.
107
342
  */
108
- listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
109
- listByBillingProfile(billingAccountName: string, billingProfileName: string, periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingProfileResponse> {
343
+ private _listByBillingProfile(
344
+ billingAccountName: string,
345
+ billingProfileName: string,
346
+ periodStartDate: string,
347
+ periodEndDate: string,
348
+ options?: InvoicesListByBillingProfileOptionalParams
349
+ ): Promise<InvoicesListByBillingProfileResponse> {
110
350
  return this.client.sendOperationRequest(
111
351
  {
112
352
  billingAccountName,
@@ -115,365 +355,514 @@ export class Invoices {
115
355
  periodEndDate,
116
356
  options
117
357
  },
118
- listByBillingProfileOperationSpec,
119
- callback) as Promise<Models.InvoicesListByBillingProfileResponse>;
358
+ listByBillingProfileOperationSpec
359
+ );
120
360
  }
121
361
 
122
362
  /**
123
- * Gets an invoice by billing account name and ID. The operation is supported for billing accounts
124
- * with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
125
- * @param billingAccountName The ID that uniquely identifies a billing account.
126
- * @param invoiceName The ID that uniquely identifies an invoice.
127
- * @param [options] The optional parameters
128
- * @returns Promise<Models.InvoicesGetResponse>
129
- */
130
- get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesGetResponse>;
131
- /**
132
- * @param billingAccountName The ID that uniquely identifies a billing account.
133
- * @param invoiceName The ID that uniquely identifies an invoice.
134
- * @param callback The callback
135
- */
136
- get(billingAccountName: string, invoiceName: string, callback: msRest.ServiceCallback<Models.Invoice>): void;
137
- /**
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.
138
365
  * @param billingAccountName The ID that uniquely identifies a billing account.
139
366
  * @param invoiceName The ID that uniquely identifies an invoice.
140
- * @param options The optional parameters
141
- * @param callback The callback
367
+ * @param options The options parameters.
142
368
  */
143
- get(billingAccountName: string, invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Invoice>): void;
144
- get(billingAccountName: string, invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Invoice>, callback?: msRest.ServiceCallback<Models.Invoice>): Promise<Models.InvoicesGetResponse> {
369
+ get(
370
+ billingAccountName: string,
371
+ invoiceName: string,
372
+ options?: InvoicesGetOptionalParams
373
+ ): Promise<InvoicesGetResponse> {
145
374
  return this.client.sendOperationRequest(
146
- {
147
- billingAccountName,
148
- invoiceName,
149
- options
150
- },
151
- getOperationSpec,
152
- callback) as Promise<Models.InvoicesGetResponse>;
375
+ { billingAccountName, invoiceName, options },
376
+ getOperationSpec
377
+ );
153
378
  }
154
379
 
155
380
  /**
156
- * Gets an invoice by ID. The operation is supported for billing accounts with agreement type
157
- * Microsoft Partner Agreement or Microsoft Customer Agreement.
158
- * @param invoiceName The ID that uniquely identifies an invoice.
159
- * @param [options] The optional parameters
160
- * @returns Promise<Models.InvoicesGetByIdResponse>
161
- */
162
- getById(invoiceName: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesGetByIdResponse>;
163
- /**
381
+ * Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft
382
+ * Partner Agreement or Microsoft Customer Agreement.
164
383
  * @param invoiceName The ID that uniquely identifies an invoice.
165
- * @param callback The callback
384
+ * @param options The options parameters.
166
385
  */
167
- getById(invoiceName: string, callback: msRest.ServiceCallback<Models.Invoice>): void;
386
+ getById(
387
+ invoiceName: string,
388
+ options?: InvoicesGetByIdOptionalParams
389
+ ): Promise<InvoicesGetByIdResponse> {
390
+ return this.client.sendOperationRequest(
391
+ { invoiceName, options },
392
+ getByIdOperationSpec
393
+ );
394
+ }
395
+
168
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.
169
400
  * @param invoiceName The ID that uniquely identifies an invoice.
170
- * @param options The optional parameters
171
- * @param callback The callback
401
+ * @param downloadToken Download token with document source and document ID.
402
+ * @param options The options parameters.
172
403
  */
173
- getById(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Invoice>): void;
174
- getById(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Invoice>, callback?: msRest.ServiceCallback<Models.Invoice>): Promise<Models.InvoicesGetByIdResponse> {
175
- return this.client.sendOperationRequest(
176
- {
177
- invoiceName,
178
- options
179
- },
180
- getByIdOperationSpec,
181
- callback) as Promise<Models.InvoicesGetByIdResponse>;
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
+ });
182
464
  }
183
465
 
184
466
  /**
185
- * Gets a URL to download an invoice. The operation is supported for billing accounts with
186
- * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
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.
187
469
  * @param billingAccountName The ID that uniquely identifies a billing account.
188
470
  * @param invoiceName The ID that uniquely identifies an invoice.
189
471
  * @param downloadToken Download token with document source and document ID.
190
- * @param [options] The optional parameters
191
- * @returns Promise<Models.InvoicesDownloadInvoiceResponse>
472
+ * @param options The options parameters.
192
473
  */
193
- downloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesDownloadInvoiceResponse> {
194
- return this.beginDownloadInvoice(billingAccountName,invoiceName,downloadToken,options)
195
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.InvoicesDownloadInvoiceResponse>;
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();
196
487
  }
197
488
 
198
489
  /**
199
- * Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes)
200
- * as a zip file. The operation is supported for billing accounts with agreement type Microsoft
201
- * Partner Agreement or Microsoft Customer Agreement.
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.
202
493
  * @param billingAccountName The ID that uniquely identifies a billing account.
203
494
  * @param downloadUrls An array of download urls for individual documents
204
- * @param [options] The optional parameters
205
- * @returns Promise<Models.InvoicesDownloadMultipleModernInvoiceResponse>
495
+ * @param options The options parameters.
206
496
  */
207
- downloadMultipleModernInvoice(billingAccountName: string, downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise<Models.InvoicesDownloadMultipleModernInvoiceResponse> {
208
- return this.beginDownloadMultipleModernInvoice(billingAccountName,downloadUrls,options)
209
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.InvoicesDownloadMultipleModernInvoiceResponse>;
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
+ });
210
558
  }
211
559
 
212
560
  /**
213
- * Lists the invoices for a subscription.
214
- * @param periodStartDate Invoice period start date.
215
- * @param periodEndDate Invoice period end date.
216
- * @param [options] The optional parameters
217
- * @returns Promise<Models.InvoicesListByBillingSubscriptionResponse>
218
- */
219
- listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingSubscriptionResponse>;
220
- /**
221
- * @param periodStartDate Invoice period start date.
222
- * @param periodEndDate Invoice period end date.
223
- * @param callback The callback
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.
224
567
  */
225
- listByBillingSubscription(periodStartDate: string, periodEndDate: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
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
+
226
581
  /**
582
+ * Lists the invoices for a subscription.
227
583
  * @param periodStartDate Invoice period start date.
228
584
  * @param periodEndDate Invoice period end date.
229
- * @param options The optional parameters
230
- * @param callback The callback
585
+ * @param options The options parameters.
231
586
  */
232
- listByBillingSubscription(periodStartDate: string, periodEndDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
233
- listByBillingSubscription(periodStartDate: string, periodEndDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingSubscriptionResponse> {
587
+ private _listByBillingSubscription(
588
+ periodStartDate: string,
589
+ periodEndDate: string,
590
+ options?: InvoicesListByBillingSubscriptionOptionalParams
591
+ ): Promise<InvoicesListByBillingSubscriptionResponse> {
234
592
  return this.client.sendOperationRequest(
235
- {
236
- periodStartDate,
237
- periodEndDate,
238
- options
239
- },
240
- listByBillingSubscriptionOperationSpec,
241
- callback) as Promise<Models.InvoicesListByBillingSubscriptionResponse>;
593
+ { periodStartDate, periodEndDate, options },
594
+ listByBillingSubscriptionOperationSpec
595
+ );
242
596
  }
243
597
 
244
598
  /**
245
599
  * Gets an invoice by subscription ID and invoice ID.
246
600
  * @param invoiceName The ID that uniquely identifies an invoice.
247
- * @param [options] The optional parameters
248
- * @returns Promise<Models.InvoicesGetBySubscriptionAndInvoiceIdResponse>
249
- */
250
- getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesGetBySubscriptionAndInvoiceIdResponse>;
251
- /**
252
- * @param invoiceName The ID that uniquely identifies an invoice.
253
- * @param callback The callback
601
+ * @param options The options parameters.
254
602
  */
255
- getBySubscriptionAndInvoiceId(invoiceName: string, callback: msRest.ServiceCallback<Models.Invoice>): void;
256
- /**
257
- * @param invoiceName The ID that uniquely identifies an invoice.
258
- * @param options The optional parameters
259
- * @param callback The callback
260
- */
261
- getBySubscriptionAndInvoiceId(invoiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Invoice>): void;
262
- getBySubscriptionAndInvoiceId(invoiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Invoice>, callback?: msRest.ServiceCallback<Models.Invoice>): Promise<Models.InvoicesGetBySubscriptionAndInvoiceIdResponse> {
603
+ getBySubscriptionAndInvoiceId(
604
+ invoiceName: string,
605
+ options?: InvoicesGetBySubscriptionAndInvoiceIdOptionalParams
606
+ ): Promise<InvoicesGetBySubscriptionAndInvoiceIdResponse> {
263
607
  return this.client.sendOperationRequest(
264
- {
265
- invoiceName,
266
- options
267
- },
268
- getBySubscriptionAndInvoiceIdOperationSpec,
269
- callback) as Promise<Models.InvoicesGetBySubscriptionAndInvoiceIdResponse>;
608
+ { invoiceName, options },
609
+ getBySubscriptionAndInvoiceIdOperationSpec
610
+ );
270
611
  }
271
612
 
272
613
  /**
273
614
  * Gets a URL to download an invoice.
274
615
  * @param invoiceName The ID that uniquely identifies an invoice.
275
616
  * @param downloadToken Download token with document source and document ID.
276
- * @param [options] The optional parameters
277
- * @returns Promise<Models.InvoicesDownloadBillingSubscriptionInvoiceResponse>
617
+ * @param options The options parameters.
278
618
  */
279
- downloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesDownloadBillingSubscriptionInvoiceResponse> {
280
- return this.beginDownloadBillingSubscriptionInvoice(invoiceName,downloadToken,options)
281
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.InvoicesDownloadBillingSubscriptionInvoiceResponse>;
282
- }
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
+ };
283
667
 
284
- /**
285
- * Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as
286
- * a zip file.
287
- * @param downloadUrls An array of download urls for individual documents
288
- * @param [options] The optional parameters
289
- * @returns Promise<Models.InvoicesDownloadMultipleBillingSubscriptionInvoiceResponse>
290
- */
291
- downloadMultipleBillingSubscriptionInvoice(downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise<Models.InvoicesDownloadMultipleBillingSubscriptionInvoiceResponse> {
292
- return this.beginDownloadMultipleBillingSubscriptionInvoice(downloadUrls,options)
293
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.InvoicesDownloadMultipleBillingSubscriptionInvoiceResponse>;
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
+ });
294
678
  }
295
679
 
296
680
  /**
297
- * Gets a URL to download an invoice. The operation is supported for billing accounts with
298
- * agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
299
- * @param billingAccountName The ID that uniquely identifies a billing account.
681
+ * Gets a URL to download an invoice.
300
682
  * @param invoiceName The ID that uniquely identifies an invoice.
301
683
  * @param downloadToken Download token with document source and document ID.
302
- * @param [options] The optional parameters
303
- * @returns Promise<msRestAzure.LROPoller>
684
+ * @param options The options parameters.
304
685
  */
305
- beginDownloadInvoice(billingAccountName: string, invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
306
- return this.client.sendLRORequest(
307
- {
308
- billingAccountName,
309
- invoiceName,
310
- downloadToken,
311
- options
312
- },
313
- beginDownloadInvoiceOperationSpec,
314
- options);
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();
315
697
  }
316
698
 
317
699
  /**
318
- * Gets a URL to download an multiple invoices documents (invoice pdf, tax receipts, credit notes)
319
- * as a zip file. The operation is supported for billing accounts with agreement type Microsoft
320
- * Partner Agreement or Microsoft Customer Agreement.
321
- * @param billingAccountName The ID that uniquely identifies a billing account.
700
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
701
+ * file.
322
702
  * @param downloadUrls An array of download urls for individual documents
323
- * @param [options] The optional parameters
324
- * @returns Promise<msRestAzure.LROPoller>
703
+ * @param options The options parameters.
325
704
  */
326
- beginDownloadMultipleModernInvoice(billingAccountName: string, downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
327
- return this.client.sendLRORequest(
328
- {
329
- billingAccountName,
330
- downloadUrls,
331
- options
332
- },
333
- beginDownloadMultipleModernInvoiceOperationSpec,
334
- options);
335
- }
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
+ };
336
754
 
337
- /**
338
- * Gets a URL to download an invoice.
339
- * @param invoiceName The ID that uniquely identifies an invoice.
340
- * @param downloadToken Download token with document source and document ID.
341
- * @param [options] The optional parameters
342
- * @returns Promise<msRestAzure.LROPoller>
343
- */
344
- beginDownloadBillingSubscriptionInvoice(invoiceName: string, downloadToken: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
345
- return this.client.sendLRORequest(
346
- {
347
- invoiceName,
348
- downloadToken,
349
- options
350
- },
351
- beginDownloadBillingSubscriptionInvoiceOperationSpec,
352
- options);
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
+ });
353
765
  }
354
766
 
355
767
  /**
356
- * Gets a URL to download multiple invoices documents (invoice pdf, tax receipts, credit notes) as
357
- * a zip file.
768
+ * Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip
769
+ * file.
358
770
  * @param downloadUrls An array of download urls for individual documents
359
- * @param [options] The optional parameters
360
- * @returns Promise<msRestAzure.LROPoller>
771
+ * @param options The options parameters.
361
772
  */
362
- beginDownloadMultipleBillingSubscriptionInvoice(downloadUrls: string[], options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
363
- return this.client.sendLRORequest(
364
- {
365
- downloadUrls,
366
- options
367
- },
368
- beginDownloadMultipleBillingSubscriptionInvoiceOperationSpec,
369
- options);
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();
370
782
  }
371
783
 
372
784
  /**
373
- * Lists the invoices for a billing account for a given start date and end date. The operation is
374
- * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft
375
- * Customer Agreement.
376
- * @param nextPageLink The NextLink from the previous successful call to List operation.
377
- * @param [options] The optional parameters
378
- * @returns Promise<Models.InvoicesListByBillingAccountNextResponse>
379
- */
380
- listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingAccountNextResponse>;
381
- /**
382
- * @param nextPageLink The NextLink from the previous successful call to List operation.
383
- * @param callback The callback
384
- */
385
- listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
386
- /**
387
- * @param nextPageLink The NextLink from the previous successful call to List operation.
388
- * @param options The optional parameters
389
- * @param callback The callback
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.
390
793
  */
391
- listByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
392
- listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingAccountNextResponse> {
794
+ private _listByBillingAccountNext(
795
+ billingAccountName: string,
796
+ periodStartDate: string,
797
+ periodEndDate: string,
798
+ nextLink: string,
799
+ options?: InvoicesListByBillingAccountNextOptionalParams
800
+ ): Promise<InvoicesListByBillingAccountNextResponse> {
393
801
  return this.client.sendOperationRequest(
394
- {
395
- nextPageLink,
396
- options
397
- },
398
- listByBillingAccountNextOperationSpec,
399
- callback) as Promise<Models.InvoicesListByBillingAccountNextResponse>;
802
+ { billingAccountName, periodStartDate, periodEndDate, nextLink, options },
803
+ listByBillingAccountNextOperationSpec
804
+ );
400
805
  }
401
806
 
402
807
  /**
403
- * Lists the invoices for a billing profile for a given start date and end date. The operation is
404
- * supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft
405
- * Customer Agreement.
406
- * @param nextPageLink The NextLink from the previous successful call to List operation.
407
- * @param [options] The optional parameters
408
- * @returns Promise<Models.InvoicesListByBillingProfileNextResponse>
409
- */
410
- listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingProfileNextResponse>;
411
- /**
412
- * @param nextPageLink The NextLink from the previous successful call to List operation.
413
- * @param callback The callback
414
- */
415
- listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
416
- /**
417
- * @param nextPageLink The NextLink from the previous successful call to List operation.
418
- * @param options The optional parameters
419
- * @param callback The callback
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.
420
817
  */
421
- listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
422
- listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingProfileNextResponse> {
818
+ private _listByBillingProfileNext(
819
+ billingAccountName: string,
820
+ billingProfileName: string,
821
+ periodStartDate: string,
822
+ periodEndDate: string,
823
+ nextLink: string,
824
+ options?: InvoicesListByBillingProfileNextOptionalParams
825
+ ): Promise<InvoicesListByBillingProfileNextResponse> {
423
826
  return this.client.sendOperationRequest(
424
827
  {
425
- nextPageLink,
828
+ billingAccountName,
829
+ billingProfileName,
830
+ periodStartDate,
831
+ periodEndDate,
832
+ nextLink,
426
833
  options
427
834
  },
428
- listByBillingProfileNextOperationSpec,
429
- callback) as Promise<Models.InvoicesListByBillingProfileNextResponse>;
835
+ listByBillingProfileNextOperationSpec
836
+ );
430
837
  }
431
838
 
432
839
  /**
433
- * Lists the invoices for a subscription.
434
- * @param nextPageLink The NextLink from the previous successful call to List operation.
435
- * @param [options] The optional parameters
436
- * @returns Promise<Models.InvoicesListByBillingSubscriptionNextResponse>
437
- */
438
- listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.InvoicesListByBillingSubscriptionNextResponse>;
439
- /**
440
- * @param nextPageLink The NextLink from the previous successful call to List operation.
441
- * @param callback The callback
442
- */
443
- listByBillingSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
444
- /**
445
- * @param nextPageLink The NextLink from the previous successful call to List operation.
446
- * @param options The optional parameters
447
- * @param callback The callback
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.
448
846
  */
449
- listByBillingSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.InvoiceListResult>): void;
450
- listByBillingSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.InvoiceListResult>, callback?: msRest.ServiceCallback<Models.InvoiceListResult>): Promise<Models.InvoicesListByBillingSubscriptionNextResponse> {
847
+ private _listByBillingSubscriptionNext(
848
+ periodStartDate: string,
849
+ periodEndDate: string,
850
+ nextLink: string,
851
+ options?: InvoicesListByBillingSubscriptionNextOptionalParams
852
+ ): Promise<InvoicesListByBillingSubscriptionNextResponse> {
451
853
  return this.client.sendOperationRequest(
452
- {
453
- nextPageLink,
454
- options
455
- },
456
- listByBillingSubscriptionNextOperationSpec,
457
- callback) as Promise<Models.InvoicesListByBillingSubscriptionNextResponse>;
854
+ { periodStartDate, periodEndDate, nextLink, options },
855
+ listByBillingSubscriptionNextOperationSpec
856
+ );
458
857
  }
459
858
  }
460
-
461
859
  // Operation Specifications
462
- const serializer = new msRest.Serializer(Mappers);
463
- const listByBillingAccountOperationSpec: msRest.OperationSpec = {
860
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
861
+
862
+ const listByBillingAccountOperationSpec: coreClient.OperationSpec = {
863
+ path:
864
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices",
464
865
  httpMethod: "GET",
465
- path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices",
466
- urlParameters: [
467
- Parameters.billingAccountName
468
- ],
469
- queryParameters: [
470
- Parameters.apiVersion0,
471
- Parameters.periodStartDate,
472
- Parameters.periodEndDate
473
- ],
474
- headerParameters: [
475
- Parameters.acceptLanguage
476
- ],
477
866
  responses: {
478
867
  200: {
479
868
  bodyMapper: Mappers.InvoiceListResult
@@ -482,24 +871,19 @@ const listByBillingAccountOperationSpec: msRest.OperationSpec = {
482
871
  bodyMapper: Mappers.ErrorResponse
483
872
  }
484
873
  },
485
- serializer
486
- };
487
-
488
- const listByBillingProfileOperationSpec: msRest.OperationSpec = {
489
- httpMethod: "GET",
490
- path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices",
491
- urlParameters: [
492
- Parameters.billingAccountName,
493
- Parameters.billingProfileName
494
- ],
495
874
  queryParameters: [
496
- Parameters.apiVersion0,
875
+ Parameters.apiVersion,
497
876
  Parameters.periodStartDate,
498
877
  Parameters.periodEndDate
499
878
  ],
500
- headerParameters: [
501
- Parameters.acceptLanguage
502
- ],
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",
503
887
  responses: {
504
888
  200: {
505
889
  bodyMapper: Mappers.InvoiceListResult
@@ -508,22 +892,23 @@ const listByBillingProfileOperationSpec: msRest.OperationSpec = {
508
892
  bodyMapper: Mappers.ErrorResponse
509
893
  }
510
894
  },
511
- serializer
512
- };
513
-
514
- const getOperationSpec: msRest.OperationSpec = {
515
- httpMethod: "GET",
516
- path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}",
517
- urlParameters: [
518
- Parameters.billingAccountName,
519
- Parameters.invoiceName
520
- ],
521
895
  queryParameters: [
522
- Parameters.apiVersion0
896
+ Parameters.apiVersion,
897
+ Parameters.periodStartDate,
898
+ Parameters.periodEndDate
523
899
  ],
524
- headerParameters: [
525
- Parameters.acceptLanguage
900
+ urlParameters: [
901
+ Parameters.$host,
902
+ Parameters.billingAccountName,
903
+ Parameters.billingProfileName
526
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",
527
912
  responses: {
528
913
  200: {
529
914
  bodyMapper: Mappers.Invoice
@@ -532,21 +917,19 @@ const getOperationSpec: msRest.OperationSpec = {
532
917
  bodyMapper: Mappers.ErrorResponse
533
918
  }
534
919
  },
535
- serializer
536
- };
537
-
538
- const getByIdOperationSpec: msRest.OperationSpec = {
539
- httpMethod: "GET",
540
- path: "providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}",
920
+ queryParameters: [Parameters.apiVersion],
541
921
  urlParameters: [
922
+ Parameters.$host,
923
+ Parameters.billingAccountName,
542
924
  Parameters.invoiceName
543
925
  ],
544
- queryParameters: [
545
- Parameters.apiVersion0
546
- ],
547
- headerParameters: [
548
- Parameters.acceptLanguage
549
- ],
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",
550
933
  responses: {
551
934
  200: {
552
935
  bodyMapper: Mappers.Invoice
@@ -555,214 +938,172 @@ const getByIdOperationSpec: msRest.OperationSpec = {
555
938
  bodyMapper: Mappers.ErrorResponse
556
939
  }
557
940
  },
941
+ queryParameters: [Parameters.apiVersion],
942
+ urlParameters: [Parameters.$host, Parameters.invoiceName],
943
+ headerParameters: [Parameters.accept],
558
944
  serializer
559
945
  };
560
-
561
- const listByBillingSubscriptionOperationSpec: msRest.OperationSpec = {
562
- httpMethod: "GET",
563
- path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices",
564
- urlParameters: [
565
- Parameters.subscriptionId
566
- ],
567
- queryParameters: [
568
- Parameters.periodStartDate,
569
- Parameters.periodEndDate,
570
- Parameters.apiVersion0
571
- ],
572
- headerParameters: [
573
- Parameters.acceptLanguage
574
- ],
946
+ const downloadInvoiceOperationSpec: coreClient.OperationSpec = {
947
+ path:
948
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download",
949
+ httpMethod: "POST",
575
950
  responses: {
576
951
  200: {
577
- bodyMapper: Mappers.InvoiceListResult
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
578
962
  },
579
963
  default: {
580
964
  bodyMapper: Mappers.ErrorResponse
581
965
  }
582
966
  },
583
- serializer
584
- };
585
-
586
- const getBySubscriptionAndInvoiceIdOperationSpec: msRest.OperationSpec = {
587
- httpMethod: "GET",
588
- path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}",
967
+ queryParameters: [Parameters.apiVersion, Parameters.downloadToken],
589
968
  urlParameters: [
590
- Parameters.subscriptionId,
969
+ Parameters.$host,
970
+ Parameters.billingAccountName,
591
971
  Parameters.invoiceName
592
972
  ],
593
- queryParameters: [
594
- Parameters.apiVersion0
595
- ],
596
- headerParameters: [
597
- Parameters.acceptLanguage
598
- ],
973
+ headerParameters: [Parameters.accept],
974
+ serializer
975
+ };
976
+ const downloadMultipleBillingProfileInvoicesOperationSpec: coreClient.OperationSpec = {
977
+ path:
978
+ "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments",
979
+ httpMethod: "POST",
599
980
  responses: {
600
981
  200: {
601
- bodyMapper: Mappers.Invoice
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
602
992
  },
603
993
  default: {
604
994
  bodyMapper: Mappers.ErrorResponse
605
995
  }
606
996
  },
997
+ requestBody: Parameters.downloadUrls,
998
+ queryParameters: [Parameters.apiVersion],
999
+ urlParameters: [Parameters.$host, Parameters.billingAccountName],
1000
+ headerParameters: [Parameters.accept, Parameters.contentType],
1001
+ mediaType: "json",
607
1002
  serializer
608
1003
  };
609
-
610
- const beginDownloadInvoiceOperationSpec: msRest.OperationSpec = {
611
- httpMethod: "POST",
612
- path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download",
613
- urlParameters: [
614
- Parameters.billingAccountName,
615
- Parameters.invoiceName
616
- ],
617
- queryParameters: [
618
- Parameters.apiVersion0,
619
- Parameters.downloadToken
620
- ],
621
- headerParameters: [
622
- Parameters.acceptLanguage
623
- ],
1004
+ const listByBillingSubscriptionOperationSpec: coreClient.OperationSpec = {
1005
+ path:
1006
+ "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices",
1007
+ httpMethod: "GET",
624
1008
  responses: {
625
1009
  200: {
626
- bodyMapper: Mappers.DownloadUrl,
627
- headersMapper: Mappers.InvoicesDownloadInvoiceHeaders
628
- },
629
- 202: {
630
- headersMapper: Mappers.InvoicesDownloadInvoiceHeaders
1010
+ bodyMapper: Mappers.InvoiceListResult
631
1011
  },
632
1012
  default: {
633
- bodyMapper: Mappers.ErrorResponse,
634
- headersMapper: Mappers.InvoicesDownloadInvoiceHeaders
1013
+ bodyMapper: Mappers.ErrorResponse
635
1014
  }
636
1015
  },
637
- serializer
638
- };
639
-
640
- const beginDownloadMultipleModernInvoiceOperationSpec: msRest.OperationSpec = {
641
- httpMethod: "POST",
642
- path: "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments",
643
- urlParameters: [
644
- Parameters.billingAccountName
645
- ],
646
1016
  queryParameters: [
647
- Parameters.apiVersion0
648
- ],
649
- headerParameters: [
650
- Parameters.acceptLanguage
1017
+ Parameters.apiVersion,
1018
+ Parameters.periodStartDate,
1019
+ Parameters.periodEndDate
651
1020
  ],
652
- requestBody: {
653
- parameterPath: "downloadUrls",
654
- mapper: {
655
- required: true,
656
- serializedName: "downloadUrls",
657
- type: {
658
- name: "Sequence",
659
- element: {
660
- type: {
661
- name: "String"
662
- }
663
- }
664
- }
665
- }
666
- },
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",
667
1029
  responses: {
668
1030
  200: {
669
- bodyMapper: Mappers.DownloadUrl,
670
- headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders
671
- },
672
- 202: {
673
- headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders
1031
+ bodyMapper: Mappers.Invoice
674
1032
  },
675
1033
  default: {
676
- bodyMapper: Mappers.ErrorResponse,
677
- headersMapper: Mappers.InvoicesDownloadMultipleModernInvoiceHeaders
1034
+ bodyMapper: Mappers.ErrorResponse
678
1035
  }
679
1036
  },
680
- serializer
681
- };
682
-
683
- const beginDownloadBillingSubscriptionInvoiceOperationSpec: msRest.OperationSpec = {
684
- httpMethod: "POST",
685
- path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download",
1037
+ queryParameters: [Parameters.apiVersion],
686
1038
  urlParameters: [
1039
+ Parameters.$host,
687
1040
  Parameters.subscriptionId,
688
1041
  Parameters.invoiceName
689
1042
  ],
690
- queryParameters: [
691
- Parameters.apiVersion0,
692
- Parameters.downloadToken
693
- ],
694
- headerParameters: [
695
- Parameters.acceptLanguage
696
- ],
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",
697
1050
  responses: {
698
1051
  200: {
699
- bodyMapper: Mappers.DownloadUrl,
700
- headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders
1052
+ bodyMapper: Mappers.DownloadUrl
1053
+ },
1054
+ 201: {
1055
+ bodyMapper: Mappers.DownloadUrl
701
1056
  },
702
1057
  202: {
703
- headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders
1058
+ bodyMapper: Mappers.DownloadUrl
1059
+ },
1060
+ 204: {
1061
+ bodyMapper: Mappers.DownloadUrl
704
1062
  },
705
1063
  default: {
706
- bodyMapper: Mappers.ErrorResponse,
707
- headersMapper: Mappers.InvoicesDownloadBillingSubscriptionInvoiceHeaders
1064
+ bodyMapper: Mappers.ErrorResponse
708
1065
  }
709
1066
  },
1067
+ queryParameters: [Parameters.apiVersion, Parameters.downloadToken],
1068
+ urlParameters: [
1069
+ Parameters.$host,
1070
+ Parameters.subscriptionId,
1071
+ Parameters.invoiceName
1072
+ ],
1073
+ headerParameters: [Parameters.accept],
710
1074
  serializer
711
1075
  };
712
-
713
- const beginDownloadMultipleBillingSubscriptionInvoiceOperationSpec: msRest.OperationSpec = {
1076
+ const downloadMultipleBillingSubscriptionInvoicesOperationSpec: coreClient.OperationSpec = {
1077
+ path:
1078
+ "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments",
714
1079
  httpMethod: "POST",
715
- path: "providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments",
716
- urlParameters: [
717
- Parameters.subscriptionId
718
- ],
719
- queryParameters: [
720
- Parameters.apiVersion0
721
- ],
722
- headerParameters: [
723
- Parameters.acceptLanguage
724
- ],
725
- requestBody: {
726
- parameterPath: "downloadUrls",
727
- mapper: {
728
- required: true,
729
- serializedName: "downloadUrls",
730
- type: {
731
- name: "Sequence",
732
- element: {
733
- type: {
734
- name: "String"
735
- }
736
- }
737
- }
738
- }
739
- },
740
1080
  responses: {
741
1081
  200: {
742
- bodyMapper: Mappers.DownloadUrl,
743
- headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders
1082
+ bodyMapper: Mappers.DownloadUrl
1083
+ },
1084
+ 201: {
1085
+ bodyMapper: Mappers.DownloadUrl
744
1086
  },
745
1087
  202: {
746
- headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders
1088
+ bodyMapper: Mappers.DownloadUrl
1089
+ },
1090
+ 204: {
1091
+ bodyMapper: Mappers.DownloadUrl
747
1092
  },
748
1093
  default: {
749
- bodyMapper: Mappers.ErrorResponse,
750
- headersMapper: Mappers.InvoicesDownloadMultipleBillingSubscriptionInvoiceHeaders
1094
+ bodyMapper: Mappers.ErrorResponse
751
1095
  }
752
1096
  },
1097
+ requestBody: Parameters.downloadUrls,
1098
+ queryParameters: [Parameters.apiVersion],
1099
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
1100
+ headerParameters: [Parameters.accept, Parameters.contentType],
1101
+ mediaType: "json",
753
1102
  serializer
754
1103
  };
755
-
756
- const listByBillingAccountNextOperationSpec: msRest.OperationSpec = {
757
- httpMethod: "GET",
758
- baseUrl: "https://management.azure.com",
1104
+ const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {
759
1105
  path: "{nextLink}",
760
- urlParameters: [
761
- Parameters.nextPageLink
762
- ],
763
- headerParameters: [
764
- Parameters.acceptLanguage
765
- ],
1106
+ httpMethod: "GET",
766
1107
  responses: {
767
1108
  200: {
768
1109
  bodyMapper: Mappers.InvoiceListResult
@@ -771,19 +1112,22 @@ const listByBillingAccountNextOperationSpec: msRest.OperationSpec = {
771
1112
  bodyMapper: Mappers.ErrorResponse
772
1113
  }
773
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],
774
1126
  serializer
775
1127
  };
776
-
777
- const listByBillingProfileNextOperationSpec: msRest.OperationSpec = {
778
- httpMethod: "GET",
779
- baseUrl: "https://management.azure.com",
1128
+ const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = {
780
1129
  path: "{nextLink}",
781
- urlParameters: [
782
- Parameters.nextPageLink
783
- ],
784
- headerParameters: [
785
- Parameters.acceptLanguage
786
- ],
1130
+ httpMethod: "GET",
787
1131
  responses: {
788
1132
  200: {
789
1133
  bodyMapper: Mappers.InvoiceListResult
@@ -792,19 +1136,23 @@ const listByBillingProfileNextOperationSpec: msRest.OperationSpec = {
792
1136
  bodyMapper: Mappers.ErrorResponse
793
1137
  }
794
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],
795
1151
  serializer
796
1152
  };
797
-
798
- const listByBillingSubscriptionNextOperationSpec: msRest.OperationSpec = {
799
- httpMethod: "GET",
800
- baseUrl: "https://management.azure.com",
1153
+ const listByBillingSubscriptionNextOperationSpec: coreClient.OperationSpec = {
801
1154
  path: "{nextLink}",
802
- urlParameters: [
803
- Parameters.nextPageLink
804
- ],
805
- headerParameters: [
806
- Parameters.acceptLanguage
807
- ],
1155
+ httpMethod: "GET",
808
1156
  responses: {
809
1157
  200: {
810
1158
  bodyMapper: Mappers.InvoiceListResult
@@ -813,5 +1161,16 @@ const listByBillingSubscriptionNextOperationSpec: msRest.OperationSpec = {
813
1161
  bodyMapper: Mappers.ErrorResponse
814
1162
  }
815
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],
816
1175
  serializer
817
1176
  };