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