azure_mgmt_consumption 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  3. data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  4. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  5. data/lib/2018-01-31/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  6. data/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb +28 -12
  7. data/lib/2018-03-31/generated/azure_mgmt_consumption.rb +84 -0
  8. data/lib/2018-03-31/generated/azure_mgmt_consumption/budgets.rb +993 -0
  9. data/lib/2018-03-31/generated/azure_mgmt_consumption/consumption_management_client.rb +289 -0
  10. data/lib/2018-03-31/generated/azure_mgmt_consumption/cost_tags_operations.rb +233 -0
  11. data/lib/2018-03-31/generated/azure_mgmt_consumption/get_balances_by_billing_account.rb +120 -0
  12. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces.rb +528 -0
  13. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_billing_account.rb +536 -0
  14. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_department.rb +536 -0
  15. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_enrollment_accounts.rb +536 -0
  16. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  17. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  18. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  19. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  20. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  21. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  22. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  23. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  24. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tag.rb +46 -0
  25. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tags.rb +90 -0
  26. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  27. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  28. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  29. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  30. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  31. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  32. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  33. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  34. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  35. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  36. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  37. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  38. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  39. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +134 -0
  40. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  41. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  42. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  43. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  44. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  45. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations.rb +224 -0
  46. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  47. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  48. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +101 -0
  49. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  50. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  51. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  52. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tags.rb +90 -0
  53. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  54. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
  55. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  56. data/lib/2018-03-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  57. data/lib/2018-03-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  58. data/lib/2018-03-31/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  59. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservation_recommendations_operations.rb +226 -0
  60. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  61. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  62. data/lib/2018-03-31/generated/azure_mgmt_consumption/tags_operations.rb +113 -0
  63. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details.rb +577 -0
  64. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_billing_account.rb +599 -0
  65. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_department.rb +592 -0
  66. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_enrollment_account.rb +599 -0
  67. data/lib/2018-05-31/generated/azure_mgmt_consumption.rb +49 -0
  68. data/lib/2018-05-31/generated/azure_mgmt_consumption/consumption_management_client.rb +144 -0
  69. data/lib/2018-05-31/generated/azure_mgmt_consumption/forecasts.rb +122 -0
  70. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  71. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  72. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  73. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  74. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  75. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  76. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  77. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  78. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  79. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  80. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  81. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  82. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  83. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  84. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  85. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  86. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_detail.rb +403 -0
  87. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  88. data/lib/2018-05-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  89. data/lib/2018-05-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  90. data/lib/2018-05-31/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  91. data/lib/2018-05-31/generated/azure_mgmt_consumption/usage_details.rb +2289 -0
  92. data/lib/2018-06-30/generated/azure_mgmt_consumption.rb +85 -0
  93. data/lib/2018-06-30/generated/azure_mgmt_consumption/balances.rb +210 -0
  94. data/lib/2018-06-30/generated/azure_mgmt_consumption/budgets.rb +993 -0
  95. data/lib/2018-06-30/generated/azure_mgmt_consumption/consumption_management_client.rb +176 -0
  96. data/lib/2018-06-30/generated/azure_mgmt_consumption/cost_tags.rb +233 -0
  97. data/lib/2018-06-30/generated/azure_mgmt_consumption/forecasts.rb +122 -0
  98. data/lib/2018-06-30/generated/azure_mgmt_consumption/marketplaces.rb +2058 -0
  99. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  100. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  101. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  102. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  103. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  104. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  105. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  106. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  107. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  108. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  109. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag.rb +90 -0
  110. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag_properties.rb +46 -0
  111. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  112. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  113. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  114. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  115. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  116. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  117. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  118. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  119. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  120. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  121. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  122. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  123. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  124. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  125. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  126. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  127. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  128. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  129. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  130. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  131. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  132. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_detail.rb +187 -0
  133. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  134. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +224 -0
  135. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  136. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  137. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  138. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  139. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  140. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  141. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  142. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  143. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_detail.rb +415 -0
  144. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  145. data/lib/2018-06-30/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  146. data/lib/2018-06-30/generated/azure_mgmt_consumption/operations.rb +216 -0
  147. data/lib/2018-06-30/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  148. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservation_recommendations.rb +226 -0
  149. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  150. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  151. data/lib/2018-06-30/generated/azure_mgmt_consumption/tags.rb +113 -0
  152. data/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb +2289 -0
  153. data/lib/azure_mgmt_consumption.rb +4 -1
  154. data/lib/profiles/latest/modules/consumption_profile_module.rb +160 -78
  155. data/lib/version.rb +1 -1
  156. metadata +150 -4
@@ -0,0 +1,2058 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Consumption::Mgmt::V2018_06_30
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class Marketplaces
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Marketplaces class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Lists the marketplaces for a scope by subscriptionId and current billing
27
+ # period. Marketplaces are available via this API only for May 1, 2014 or
28
+ # later.
29
+ #
30
+ # @param filter [String] May be used to filter marketplaces by
31
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
32
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
33
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
34
+ # currently support 'ne', 'or', or 'not'.
35
+ # @param top [Integer] May be used to limit the number of results to the most
36
+ # recent N marketplaces.
37
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
38
+ # returned a partial result. If a previous response contains a nextLink
39
+ # element, the value of the nextLink element will include a skiptoken parameter
40
+ # that specifies a starting point to use for subsequent calls.
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [Array<Marketplace>] operation results.
45
+ #
46
+ def list(filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
47
+ first_page = list_as_lazy(filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
48
+ first_page.get_all_items
49
+ end
50
+
51
+ #
52
+ # Lists the marketplaces for a scope by subscriptionId and current billing
53
+ # period. Marketplaces are available via this API only for May 1, 2014 or
54
+ # later.
55
+ #
56
+ # @param filter [String] May be used to filter marketplaces by
57
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
58
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
59
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
60
+ # currently support 'ne', 'or', or 'not'.
61
+ # @param top [Integer] May be used to limit the number of results to the most
62
+ # recent N marketplaces.
63
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
64
+ # returned a partial result. If a previous response contains a nextLink
65
+ # element, the value of the nextLink element will include a skiptoken parameter
66
+ # that specifies a starting point to use for subsequent calls.
67
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
68
+ # will be added to the HTTP request.
69
+ #
70
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
71
+ #
72
+ def list_with_http_info(filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
73
+ list_async(filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
74
+ end
75
+
76
+ #
77
+ # Lists the marketplaces for a scope by subscriptionId and current billing
78
+ # period. Marketplaces are available via this API only for May 1, 2014 or
79
+ # later.
80
+ #
81
+ # @param filter [String] May be used to filter marketplaces by
82
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
83
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
84
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
85
+ # currently support 'ne', 'or', or 'not'.
86
+ # @param top [Integer] May be used to limit the number of results to the most
87
+ # recent N marketplaces.
88
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
89
+ # returned a partial result. If a previous response contains a nextLink
90
+ # element, the value of the nextLink element will include a skiptoken parameter
91
+ # that specifies a starting point to use for subsequent calls.
92
+ # @param [Hash{String => String}] A hash of custom headers that will be added
93
+ # to the HTTP request.
94
+ #
95
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
96
+ #
97
+ def list_async(filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
98
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
99
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
100
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
101
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
102
+
103
+
104
+ request_headers = {}
105
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
106
+
107
+ # Set Headers
108
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
109
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
110
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Consumption/marketplaces'
111
+
112
+ request_url = @base_url || @client.base_url
113
+
114
+ options = {
115
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
116
+ path_params: {'subscriptionId' => @client.subscription_id},
117
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
118
+ headers: request_headers.merge(custom_headers || {}),
119
+ base_url: request_url
120
+ }
121
+ promise = @client.make_request_async(:get, path_template, options)
122
+
123
+ promise = promise.then do |result|
124
+ http_response = result.response
125
+ status_code = http_response.status
126
+ response_content = http_response.body
127
+ unless status_code == 200
128
+ error_model = JSON.load(response_content)
129
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
130
+ end
131
+
132
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
133
+ # Deserialize Response
134
+ if status_code == 200
135
+ begin
136
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
137
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
138
+ result.body = @client.deserialize(result_mapper, parsed_response)
139
+ rescue Exception => e
140
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
141
+ end
142
+ end
143
+
144
+ result
145
+ end
146
+
147
+ promise.execute
148
+ end
149
+
150
+ #
151
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
152
+ # Marketplaces are available via this API only for May 1, 2014 or later.
153
+ #
154
+ # @param billing_period_name [String] Billing Period Name.
155
+ # @param filter [String] May be used to filter marketplaces by
156
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
157
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
158
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
159
+ # currently support 'ne', 'or', or 'not'.
160
+ # @param top [Integer] May be used to limit the number of results to the most
161
+ # recent N marketplaces.
162
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
163
+ # returned a partial result. If a previous response contains a nextLink
164
+ # element, the value of the nextLink element will include a skiptoken parameter
165
+ # that specifies a starting point to use for subsequent calls.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [Array<Marketplace>] operation results.
170
+ #
171
+ def list_by_billing_period(billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
172
+ first_page = list_by_billing_period_as_lazy(billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
173
+ first_page.get_all_items
174
+ end
175
+
176
+ #
177
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
178
+ # Marketplaces are available via this API only for May 1, 2014 or later.
179
+ #
180
+ # @param billing_period_name [String] Billing Period Name.
181
+ # @param filter [String] May be used to filter marketplaces by
182
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
183
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
184
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
185
+ # currently support 'ne', 'or', or 'not'.
186
+ # @param top [Integer] May be used to limit the number of results to the most
187
+ # recent N marketplaces.
188
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
189
+ # returned a partial result. If a previous response contains a nextLink
190
+ # element, the value of the nextLink element will include a skiptoken parameter
191
+ # that specifies a starting point to use for subsequent calls.
192
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
193
+ # will be added to the HTTP request.
194
+ #
195
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
196
+ #
197
+ def list_by_billing_period_with_http_info(billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
198
+ list_by_billing_period_async(billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
199
+ end
200
+
201
+ #
202
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
203
+ # Marketplaces are available via this API only for May 1, 2014 or later.
204
+ #
205
+ # @param billing_period_name [String] Billing Period Name.
206
+ # @param filter [String] May be used to filter marketplaces by
207
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
208
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
209
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
210
+ # currently support 'ne', 'or', or 'not'.
211
+ # @param top [Integer] May be used to limit the number of results to the most
212
+ # recent N marketplaces.
213
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
214
+ # returned a partial result. If a previous response contains a nextLink
215
+ # element, the value of the nextLink element will include a skiptoken parameter
216
+ # that specifies a starting point to use for subsequent calls.
217
+ # @param [Hash{String => String}] A hash of custom headers that will be added
218
+ # to the HTTP request.
219
+ #
220
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
221
+ #
222
+ def list_by_billing_period_async(billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
223
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
224
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
225
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
226
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
227
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
228
+
229
+
230
+ request_headers = {}
231
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
232
+
233
+ # Set Headers
234
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
235
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
236
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces'
237
+
238
+ request_url = @base_url || @client.base_url
239
+
240
+ options = {
241
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
242
+ path_params: {'subscriptionId' => @client.subscription_id,'billingPeriodName' => billing_period_name},
243
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
244
+ headers: request_headers.merge(custom_headers || {}),
245
+ base_url: request_url
246
+ }
247
+ promise = @client.make_request_async(:get, path_template, options)
248
+
249
+ promise = promise.then do |result|
250
+ http_response = result.response
251
+ status_code = http_response.status
252
+ response_content = http_response.body
253
+ unless status_code == 200
254
+ error_model = JSON.load(response_content)
255
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
256
+ end
257
+
258
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
259
+ # Deserialize Response
260
+ if status_code == 200
261
+ begin
262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
263
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
264
+ result.body = @client.deserialize(result_mapper, parsed_response)
265
+ rescue Exception => e
266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
267
+ end
268
+ end
269
+
270
+ result
271
+ end
272
+
273
+ promise.execute
274
+ end
275
+
276
+ #
277
+ # Lists the marketplaces for a scope by billingAccountId and current billing
278
+ # period. Marketplaces are available via this API only for May 1, 2014 or
279
+ # later.
280
+ #
281
+ # @param billing_account_id [String] BillingAccount ID
282
+ # @param filter [String] May be used to filter marketplaces by
283
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
284
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
285
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
286
+ # currently support 'ne', 'or', or 'not'.
287
+ # @param top [Integer] May be used to limit the number of results to the most
288
+ # recent N marketplaces.
289
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
290
+ # returned a partial result. If a previous response contains a nextLink
291
+ # element, the value of the nextLink element will include a skiptoken parameter
292
+ # that specifies a starting point to use for subsequent calls.
293
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
294
+ # will be added to the HTTP request.
295
+ #
296
+ # @return [Array<Marketplace>] operation results.
297
+ #
298
+ def list_by_billing_account(billing_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
299
+ first_page = list_by_billing_account_as_lazy(billing_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
300
+ first_page.get_all_items
301
+ end
302
+
303
+ #
304
+ # Lists the marketplaces for a scope by billingAccountId and current billing
305
+ # period. Marketplaces are available via this API only for May 1, 2014 or
306
+ # later.
307
+ #
308
+ # @param billing_account_id [String] BillingAccount ID
309
+ # @param filter [String] May be used to filter marketplaces by
310
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
311
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
312
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
313
+ # currently support 'ne', 'or', or 'not'.
314
+ # @param top [Integer] May be used to limit the number of results to the most
315
+ # recent N marketplaces.
316
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
317
+ # returned a partial result. If a previous response contains a nextLink
318
+ # element, the value of the nextLink element will include a skiptoken parameter
319
+ # that specifies a starting point to use for subsequent calls.
320
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
321
+ # will be added to the HTTP request.
322
+ #
323
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
324
+ #
325
+ def list_by_billing_account_with_http_info(billing_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
326
+ list_by_billing_account_async(billing_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
327
+ end
328
+
329
+ #
330
+ # Lists the marketplaces for a scope by billingAccountId and current billing
331
+ # period. Marketplaces are available via this API only for May 1, 2014 or
332
+ # later.
333
+ #
334
+ # @param billing_account_id [String] BillingAccount ID
335
+ # @param filter [String] May be used to filter marketplaces by
336
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
337
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
338
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
339
+ # currently support 'ne', 'or', or 'not'.
340
+ # @param top [Integer] May be used to limit the number of results to the most
341
+ # recent N marketplaces.
342
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
343
+ # returned a partial result. If a previous response contains a nextLink
344
+ # element, the value of the nextLink element will include a skiptoken parameter
345
+ # that specifies a starting point to use for subsequent calls.
346
+ # @param [Hash{String => String}] A hash of custom headers that will be added
347
+ # to the HTTP request.
348
+ #
349
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
350
+ #
351
+ def list_by_billing_account_async(billing_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
352
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
353
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
354
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
355
+ fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil?
356
+
357
+
358
+ request_headers = {}
359
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
360
+
361
+ # Set Headers
362
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
363
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
364
+ path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/marketplaces'
365
+
366
+ request_url = @base_url || @client.base_url
367
+
368
+ options = {
369
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
370
+ path_params: {'billingAccountId' => billing_account_id},
371
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
372
+ headers: request_headers.merge(custom_headers || {}),
373
+ base_url: request_url
374
+ }
375
+ promise = @client.make_request_async(:get, path_template, options)
376
+
377
+ promise = promise.then do |result|
378
+ http_response = result.response
379
+ status_code = http_response.status
380
+ response_content = http_response.body
381
+ unless status_code == 200
382
+ error_model = JSON.load(response_content)
383
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
384
+ end
385
+
386
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
387
+ # Deserialize Response
388
+ if status_code == 200
389
+ begin
390
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
391
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
392
+ result.body = @client.deserialize(result_mapper, parsed_response)
393
+ rescue Exception => e
394
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
395
+ end
396
+ end
397
+
398
+ result
399
+ end
400
+
401
+ promise.execute
402
+ end
403
+
404
+ #
405
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
406
+ # Marketplaces are available via this API only for May 1, 2014 or later.
407
+ #
408
+ # @param billing_account_id [String] BillingAccount ID
409
+ # @param billing_period_name [String] Billing Period Name.
410
+ # @param filter [String] May be used to filter marketplaces by
411
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
412
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
413
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
414
+ # currently support 'ne', 'or', or 'not'.
415
+ # @param top [Integer] May be used to limit the number of results to the most
416
+ # recent N marketplaces.
417
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
418
+ # returned a partial result. If a previous response contains a nextLink
419
+ # element, the value of the nextLink element will include a skiptoken parameter
420
+ # that specifies a starting point to use for subsequent calls.
421
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
422
+ # will be added to the HTTP request.
423
+ #
424
+ # @return [Array<Marketplace>] operation results.
425
+ #
426
+ def list_for_billing_period_by_billing_account(billing_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
427
+ first_page = list_for_billing_period_by_billing_account_as_lazy(billing_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
428
+ first_page.get_all_items
429
+ end
430
+
431
+ #
432
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
433
+ # Marketplaces are available via this API only for May 1, 2014 or later.
434
+ #
435
+ # @param billing_account_id [String] BillingAccount ID
436
+ # @param billing_period_name [String] Billing Period Name.
437
+ # @param filter [String] May be used to filter marketplaces by
438
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
439
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
440
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
441
+ # currently support 'ne', 'or', or 'not'.
442
+ # @param top [Integer] May be used to limit the number of results to the most
443
+ # recent N marketplaces.
444
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
445
+ # returned a partial result. If a previous response contains a nextLink
446
+ # element, the value of the nextLink element will include a skiptoken parameter
447
+ # that specifies a starting point to use for subsequent calls.
448
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
449
+ # will be added to the HTTP request.
450
+ #
451
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
452
+ #
453
+ def list_for_billing_period_by_billing_account_with_http_info(billing_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
454
+ list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
455
+ end
456
+
457
+ #
458
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
459
+ # Marketplaces are available via this API only for May 1, 2014 or later.
460
+ #
461
+ # @param billing_account_id [String] BillingAccount ID
462
+ # @param billing_period_name [String] Billing Period Name.
463
+ # @param filter [String] May be used to filter marketplaces by
464
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
465
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
466
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
467
+ # currently support 'ne', 'or', or 'not'.
468
+ # @param top [Integer] May be used to limit the number of results to the most
469
+ # recent N marketplaces.
470
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
471
+ # returned a partial result. If a previous response contains a nextLink
472
+ # element, the value of the nextLink element will include a skiptoken parameter
473
+ # that specifies a starting point to use for subsequent calls.
474
+ # @param [Hash{String => String}] A hash of custom headers that will be added
475
+ # to the HTTP request.
476
+ #
477
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
478
+ #
479
+ def list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
480
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
481
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
482
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
483
+ fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil?
484
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
485
+
486
+
487
+ request_headers = {}
488
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
489
+
490
+ # Set Headers
491
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
492
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
493
+ path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces'
494
+
495
+ request_url = @base_url || @client.base_url
496
+
497
+ options = {
498
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
499
+ path_params: {'billingAccountId' => billing_account_id,'billingPeriodName' => billing_period_name},
500
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
501
+ headers: request_headers.merge(custom_headers || {}),
502
+ base_url: request_url
503
+ }
504
+ promise = @client.make_request_async(:get, path_template, options)
505
+
506
+ promise = promise.then do |result|
507
+ http_response = result.response
508
+ status_code = http_response.status
509
+ response_content = http_response.body
510
+ unless status_code == 200
511
+ error_model = JSON.load(response_content)
512
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
513
+ end
514
+
515
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
516
+ # Deserialize Response
517
+ if status_code == 200
518
+ begin
519
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
520
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
521
+ result.body = @client.deserialize(result_mapper, parsed_response)
522
+ rescue Exception => e
523
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
524
+ end
525
+ end
526
+
527
+ result
528
+ end
529
+
530
+ promise.execute
531
+ end
532
+
533
+ #
534
+ # Lists the marketplaces for a scope by departmentId and current billing
535
+ # period. Marketplaces are available via this API only for May 1, 2014 or
536
+ # later.
537
+ #
538
+ # @param department_id [String] Department ID
539
+ # @param filter [String] May be used to filter marketplaces by
540
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
541
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
542
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
543
+ # currently support 'ne', 'or', or 'not'.
544
+ # @param top [Integer] May be used to limit the number of results to the most
545
+ # recent N marketplaces.
546
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
547
+ # returned a partial result. If a previous response contains a nextLink
548
+ # element, the value of the nextLink element will include a skiptoken parameter
549
+ # that specifies a starting point to use for subsequent calls.
550
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
+ # will be added to the HTTP request.
552
+ #
553
+ # @return [Array<Marketplace>] operation results.
554
+ #
555
+ def list_by_department(department_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
556
+ first_page = list_by_department_as_lazy(department_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
557
+ first_page.get_all_items
558
+ end
559
+
560
+ #
561
+ # Lists the marketplaces for a scope by departmentId and current billing
562
+ # period. Marketplaces are available via this API only for May 1, 2014 or
563
+ # later.
564
+ #
565
+ # @param department_id [String] Department ID
566
+ # @param filter [String] May be used to filter marketplaces by
567
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
568
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
569
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
570
+ # currently support 'ne', 'or', or 'not'.
571
+ # @param top [Integer] May be used to limit the number of results to the most
572
+ # recent N marketplaces.
573
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
574
+ # returned a partial result. If a previous response contains a nextLink
575
+ # element, the value of the nextLink element will include a skiptoken parameter
576
+ # that specifies a starting point to use for subsequent calls.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
581
+ #
582
+ def list_by_department_with_http_info(department_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
583
+ list_by_department_async(department_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
584
+ end
585
+
586
+ #
587
+ # Lists the marketplaces for a scope by departmentId and current billing
588
+ # period. Marketplaces are available via this API only for May 1, 2014 or
589
+ # later.
590
+ #
591
+ # @param department_id [String] Department ID
592
+ # @param filter [String] May be used to filter marketplaces by
593
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
594
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
595
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
596
+ # currently support 'ne', 'or', or 'not'.
597
+ # @param top [Integer] May be used to limit the number of results to the most
598
+ # recent N marketplaces.
599
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
600
+ # returned a partial result. If a previous response contains a nextLink
601
+ # element, the value of the nextLink element will include a skiptoken parameter
602
+ # that specifies a starting point to use for subsequent calls.
603
+ # @param [Hash{String => String}] A hash of custom headers that will be added
604
+ # to the HTTP request.
605
+ #
606
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
607
+ #
608
+ def list_by_department_async(department_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
609
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
610
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
611
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
612
+ fail ArgumentError, 'department_id is nil' if department_id.nil?
613
+
614
+
615
+ request_headers = {}
616
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
617
+
618
+ # Set Headers
619
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
620
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
621
+ path_template = 'providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/marketplaces'
622
+
623
+ request_url = @base_url || @client.base_url
624
+
625
+ options = {
626
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
627
+ path_params: {'departmentId' => department_id},
628
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
629
+ headers: request_headers.merge(custom_headers || {}),
630
+ base_url: request_url
631
+ }
632
+ promise = @client.make_request_async(:get, path_template, options)
633
+
634
+ promise = promise.then do |result|
635
+ http_response = result.response
636
+ status_code = http_response.status
637
+ response_content = http_response.body
638
+ unless status_code == 200
639
+ error_model = JSON.load(response_content)
640
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
641
+ end
642
+
643
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
644
+ # Deserialize Response
645
+ if status_code == 200
646
+ begin
647
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
648
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
649
+ result.body = @client.deserialize(result_mapper, parsed_response)
650
+ rescue Exception => e
651
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
652
+ end
653
+ end
654
+
655
+ result
656
+ end
657
+
658
+ promise.execute
659
+ end
660
+
661
+ #
662
+ # Lists the marketplaces for a scope by billing period and departmentId.
663
+ # Marketplaces are available via this API only for May 1, 2014 or later.
664
+ #
665
+ # @param department_id [String] Department ID
666
+ # @param billing_period_name [String] Billing Period Name.
667
+ # @param filter [String] May be used to filter marketplaces by
668
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
669
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
670
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
671
+ # currently support 'ne', 'or', or 'not'.
672
+ # @param top [Integer] May be used to limit the number of results to the most
673
+ # recent N marketplaces.
674
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
675
+ # returned a partial result. If a previous response contains a nextLink
676
+ # element, the value of the nextLink element will include a skiptoken parameter
677
+ # that specifies a starting point to use for subsequent calls.
678
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
679
+ # will be added to the HTTP request.
680
+ #
681
+ # @return [Array<Marketplace>] operation results.
682
+ #
683
+ def list_for_billing_period_by_department(department_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
684
+ first_page = list_for_billing_period_by_department_as_lazy(department_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
685
+ first_page.get_all_items
686
+ end
687
+
688
+ #
689
+ # Lists the marketplaces for a scope by billing period and departmentId.
690
+ # Marketplaces are available via this API only for May 1, 2014 or later.
691
+ #
692
+ # @param department_id [String] Department ID
693
+ # @param billing_period_name [String] Billing Period Name.
694
+ # @param filter [String] May be used to filter marketplaces by
695
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
696
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
697
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
698
+ # currently support 'ne', 'or', or 'not'.
699
+ # @param top [Integer] May be used to limit the number of results to the most
700
+ # recent N marketplaces.
701
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
702
+ # returned a partial result. If a previous response contains a nextLink
703
+ # element, the value of the nextLink element will include a skiptoken parameter
704
+ # that specifies a starting point to use for subsequent calls.
705
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
706
+ # will be added to the HTTP request.
707
+ #
708
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
709
+ #
710
+ def list_for_billing_period_by_department_with_http_info(department_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
711
+ list_for_billing_period_by_department_async(department_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
712
+ end
713
+
714
+ #
715
+ # Lists the marketplaces for a scope by billing period and departmentId.
716
+ # Marketplaces are available via this API only for May 1, 2014 or later.
717
+ #
718
+ # @param department_id [String] Department ID
719
+ # @param billing_period_name [String] Billing Period Name.
720
+ # @param filter [String] May be used to filter marketplaces by
721
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
722
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
723
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
724
+ # currently support 'ne', 'or', or 'not'.
725
+ # @param top [Integer] May be used to limit the number of results to the most
726
+ # recent N marketplaces.
727
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
728
+ # returned a partial result. If a previous response contains a nextLink
729
+ # element, the value of the nextLink element will include a skiptoken parameter
730
+ # that specifies a starting point to use for subsequent calls.
731
+ # @param [Hash{String => String}] A hash of custom headers that will be added
732
+ # to the HTTP request.
733
+ #
734
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
735
+ #
736
+ def list_for_billing_period_by_department_async(department_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
737
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
738
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
739
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
740
+ fail ArgumentError, 'department_id is nil' if department_id.nil?
741
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
742
+
743
+
744
+ request_headers = {}
745
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
746
+
747
+ # Set Headers
748
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
749
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
750
+ path_template = 'providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces'
751
+
752
+ request_url = @base_url || @client.base_url
753
+
754
+ options = {
755
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
756
+ path_params: {'departmentId' => department_id,'billingPeriodName' => billing_period_name},
757
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
758
+ headers: request_headers.merge(custom_headers || {}),
759
+ base_url: request_url
760
+ }
761
+ promise = @client.make_request_async(:get, path_template, options)
762
+
763
+ promise = promise.then do |result|
764
+ http_response = result.response
765
+ status_code = http_response.status
766
+ response_content = http_response.body
767
+ unless status_code == 200
768
+ error_model = JSON.load(response_content)
769
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
770
+ end
771
+
772
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
773
+ # Deserialize Response
774
+ if status_code == 200
775
+ begin
776
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
777
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
778
+ result.body = @client.deserialize(result_mapper, parsed_response)
779
+ rescue Exception => e
780
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
781
+ end
782
+ end
783
+
784
+ result
785
+ end
786
+
787
+ promise.execute
788
+ end
789
+
790
+ #
791
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
792
+ # period. Marketplaces are available via this API only for May 1, 2014 or
793
+ # later.
794
+ #
795
+ # @param enrollment_account_id [String] EnrollmentAccount ID
796
+ # @param filter [String] May be used to filter marketplaces by
797
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
798
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
799
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
800
+ # currently support 'ne', 'or', or 'not'.
801
+ # @param top [Integer] May be used to limit the number of results to the most
802
+ # recent N marketplaces.
803
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
804
+ # returned a partial result. If a previous response contains a nextLink
805
+ # element, the value of the nextLink element will include a skiptoken parameter
806
+ # that specifies a starting point to use for subsequent calls.
807
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
808
+ # will be added to the HTTP request.
809
+ #
810
+ # @return [Array<Marketplace>] operation results.
811
+ #
812
+ def list_by_enrollment_account(enrollment_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
813
+ first_page = list_by_enrollment_account_as_lazy(enrollment_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
814
+ first_page.get_all_items
815
+ end
816
+
817
+ #
818
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
819
+ # period. Marketplaces are available via this API only for May 1, 2014 or
820
+ # later.
821
+ #
822
+ # @param enrollment_account_id [String] EnrollmentAccount ID
823
+ # @param filter [String] May be used to filter marketplaces by
824
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
825
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
826
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
827
+ # currently support 'ne', 'or', or 'not'.
828
+ # @param top [Integer] May be used to limit the number of results to the most
829
+ # recent N marketplaces.
830
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
831
+ # returned a partial result. If a previous response contains a nextLink
832
+ # element, the value of the nextLink element will include a skiptoken parameter
833
+ # that specifies a starting point to use for subsequent calls.
834
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
835
+ # will be added to the HTTP request.
836
+ #
837
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
838
+ #
839
+ def list_by_enrollment_account_with_http_info(enrollment_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
840
+ list_by_enrollment_account_async(enrollment_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
841
+ end
842
+
843
+ #
844
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
845
+ # period. Marketplaces are available via this API only for May 1, 2014 or
846
+ # later.
847
+ #
848
+ # @param enrollment_account_id [String] EnrollmentAccount ID
849
+ # @param filter [String] May be used to filter marketplaces by
850
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
851
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
852
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
853
+ # currently support 'ne', 'or', or 'not'.
854
+ # @param top [Integer] May be used to limit the number of results to the most
855
+ # recent N marketplaces.
856
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
857
+ # returned a partial result. If a previous response contains a nextLink
858
+ # element, the value of the nextLink element will include a skiptoken parameter
859
+ # that specifies a starting point to use for subsequent calls.
860
+ # @param [Hash{String => String}] A hash of custom headers that will be added
861
+ # to the HTTP request.
862
+ #
863
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
864
+ #
865
+ def list_by_enrollment_account_async(enrollment_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
866
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
867
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
868
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
869
+ fail ArgumentError, 'enrollment_account_id is nil' if enrollment_account_id.nil?
870
+
871
+
872
+ request_headers = {}
873
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
874
+
875
+ # Set Headers
876
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
877
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
878
+ path_template = 'providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/marketplaces'
879
+
880
+ request_url = @base_url || @client.base_url
881
+
882
+ options = {
883
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
884
+ path_params: {'enrollmentAccountId' => enrollment_account_id},
885
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
886
+ headers: request_headers.merge(custom_headers || {}),
887
+ base_url: request_url
888
+ }
889
+ promise = @client.make_request_async(:get, path_template, options)
890
+
891
+ promise = promise.then do |result|
892
+ http_response = result.response
893
+ status_code = http_response.status
894
+ response_content = http_response.body
895
+ unless status_code == 200
896
+ error_model = JSON.load(response_content)
897
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
898
+ end
899
+
900
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
901
+ # Deserialize Response
902
+ if status_code == 200
903
+ begin
904
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
905
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
906
+ result.body = @client.deserialize(result_mapper, parsed_response)
907
+ rescue Exception => e
908
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
909
+ end
910
+ end
911
+
912
+ result
913
+ end
914
+
915
+ promise.execute
916
+ end
917
+
918
+ #
919
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
920
+ # Marketplaces are available via this API only for May 1, 2014 or later.
921
+ #
922
+ # @param enrollment_account_id [String] EnrollmentAccount ID
923
+ # @param billing_period_name [String] Billing Period Name.
924
+ # @param filter [String] May be used to filter marketplaces by
925
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
926
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
927
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
928
+ # currently support 'ne', 'or', or 'not'.
929
+ # @param top [Integer] May be used to limit the number of results to the most
930
+ # recent N marketplaces.
931
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
932
+ # returned a partial result. If a previous response contains a nextLink
933
+ # element, the value of the nextLink element will include a skiptoken parameter
934
+ # that specifies a starting point to use for subsequent calls.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ # @return [Array<Marketplace>] operation results.
939
+ #
940
+ def list_for_billing_period_by_enrollment_account(enrollment_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
941
+ first_page = list_for_billing_period_by_enrollment_account_as_lazy(enrollment_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers)
942
+ first_page.get_all_items
943
+ end
944
+
945
+ #
946
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
947
+ # Marketplaces are available via this API only for May 1, 2014 or later.
948
+ #
949
+ # @param enrollment_account_id [String] EnrollmentAccount ID
950
+ # @param billing_period_name [String] Billing Period Name.
951
+ # @param filter [String] May be used to filter marketplaces by
952
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
953
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
954
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
955
+ # currently support 'ne', 'or', or 'not'.
956
+ # @param top [Integer] May be used to limit the number of results to the most
957
+ # recent N marketplaces.
958
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
959
+ # returned a partial result. If a previous response contains a nextLink
960
+ # element, the value of the nextLink element will include a skiptoken parameter
961
+ # that specifies a starting point to use for subsequent calls.
962
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
963
+ # will be added to the HTTP request.
964
+ #
965
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
966
+ #
967
+ def list_for_billing_period_by_enrollment_account_with_http_info(enrollment_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
968
+ list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
969
+ end
970
+
971
+ #
972
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
973
+ # Marketplaces are available via this API only for May 1, 2014 or later.
974
+ #
975
+ # @param enrollment_account_id [String] EnrollmentAccount ID
976
+ # @param billing_period_name [String] Billing Period Name.
977
+ # @param filter [String] May be used to filter marketplaces by
978
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
979
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
980
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
981
+ # currently support 'ne', 'or', or 'not'.
982
+ # @param top [Integer] May be used to limit the number of results to the most
983
+ # recent N marketplaces.
984
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
985
+ # returned a partial result. If a previous response contains a nextLink
986
+ # element, the value of the nextLink element will include a skiptoken parameter
987
+ # that specifies a starting point to use for subsequent calls.
988
+ # @param [Hash{String => String}] A hash of custom headers that will be added
989
+ # to the HTTP request.
990
+ #
991
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
992
+ #
993
+ def list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
994
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
995
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
996
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
997
+ fail ArgumentError, 'enrollment_account_id is nil' if enrollment_account_id.nil?
998
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
999
+
1000
+
1001
+ request_headers = {}
1002
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1003
+
1004
+ # Set Headers
1005
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1006
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1007
+ path_template = 'providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces'
1008
+
1009
+ request_url = @base_url || @client.base_url
1010
+
1011
+ options = {
1012
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1013
+ path_params: {'enrollmentAccountId' => enrollment_account_id,'billingPeriodName' => billing_period_name},
1014
+ query_params: {'$filter' => filter,'$top' => top,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
1015
+ headers: request_headers.merge(custom_headers || {}),
1016
+ base_url: request_url
1017
+ }
1018
+ promise = @client.make_request_async(:get, path_template, options)
1019
+
1020
+ promise = promise.then do |result|
1021
+ http_response = result.response
1022
+ status_code = http_response.status
1023
+ response_content = http_response.body
1024
+ unless status_code == 200
1025
+ error_model = JSON.load(response_content)
1026
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1027
+ end
1028
+
1029
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1030
+ # Deserialize Response
1031
+ if status_code == 200
1032
+ begin
1033
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1034
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1035
+ result.body = @client.deserialize(result_mapper, parsed_response)
1036
+ rescue Exception => e
1037
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1038
+ end
1039
+ end
1040
+
1041
+ result
1042
+ end
1043
+
1044
+ promise.execute
1045
+ end
1046
+
1047
+ #
1048
+ # Lists the marketplaces for a scope by subscriptionId and current billing
1049
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1050
+ # later.
1051
+ #
1052
+ # @param next_page_link [String] The NextLink from the previous successful call
1053
+ # to List operation.
1054
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1055
+ # will be added to the HTTP request.
1056
+ #
1057
+ # @return [MarketplacesListResult] operation results.
1058
+ #
1059
+ def list_next(next_page_link, custom_headers:nil)
1060
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1061
+ response.body unless response.nil?
1062
+ end
1063
+
1064
+ #
1065
+ # Lists the marketplaces for a scope by subscriptionId and current billing
1066
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1067
+ # later.
1068
+ #
1069
+ # @param next_page_link [String] The NextLink from the previous successful call
1070
+ # to List operation.
1071
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1072
+ # will be added to the HTTP request.
1073
+ #
1074
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1075
+ #
1076
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1077
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1078
+ end
1079
+
1080
+ #
1081
+ # Lists the marketplaces for a scope by subscriptionId and current billing
1082
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1083
+ # later.
1084
+ #
1085
+ # @param next_page_link [String] The NextLink from the previous successful call
1086
+ # to List operation.
1087
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1088
+ # to the HTTP request.
1089
+ #
1090
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1091
+ #
1092
+ def list_next_async(next_page_link, custom_headers:nil)
1093
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1094
+
1095
+
1096
+ request_headers = {}
1097
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1098
+
1099
+ # Set Headers
1100
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1101
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1102
+ path_template = '{nextLink}'
1103
+
1104
+ request_url = @base_url || @client.base_url
1105
+
1106
+ options = {
1107
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1108
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1109
+ headers: request_headers.merge(custom_headers || {}),
1110
+ base_url: request_url
1111
+ }
1112
+ promise = @client.make_request_async(:get, path_template, options)
1113
+
1114
+ promise = promise.then do |result|
1115
+ http_response = result.response
1116
+ status_code = http_response.status
1117
+ response_content = http_response.body
1118
+ unless status_code == 200
1119
+ error_model = JSON.load(response_content)
1120
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1121
+ end
1122
+
1123
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1124
+ # Deserialize Response
1125
+ if status_code == 200
1126
+ begin
1127
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1128
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1129
+ result.body = @client.deserialize(result_mapper, parsed_response)
1130
+ rescue Exception => e
1131
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1132
+ end
1133
+ end
1134
+
1135
+ result
1136
+ end
1137
+
1138
+ promise.execute
1139
+ end
1140
+
1141
+ #
1142
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
1143
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1144
+ #
1145
+ # @param next_page_link [String] The NextLink from the previous successful call
1146
+ # to List operation.
1147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1148
+ # will be added to the HTTP request.
1149
+ #
1150
+ # @return [MarketplacesListResult] operation results.
1151
+ #
1152
+ def list_by_billing_period_next(next_page_link, custom_headers:nil)
1153
+ response = list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
1154
+ response.body unless response.nil?
1155
+ end
1156
+
1157
+ #
1158
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
1159
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1160
+ #
1161
+ # @param next_page_link [String] The NextLink from the previous successful call
1162
+ # to List operation.
1163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1164
+ # will be added to the HTTP request.
1165
+ #
1166
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1167
+ #
1168
+ def list_by_billing_period_next_with_http_info(next_page_link, custom_headers:nil)
1169
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
1170
+ end
1171
+
1172
+ #
1173
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
1174
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1175
+ #
1176
+ # @param next_page_link [String] The NextLink from the previous successful call
1177
+ # to List operation.
1178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1179
+ # to the HTTP request.
1180
+ #
1181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1182
+ #
1183
+ def list_by_billing_period_next_async(next_page_link, custom_headers:nil)
1184
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1185
+
1186
+
1187
+ request_headers = {}
1188
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1189
+
1190
+ # Set Headers
1191
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1192
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1193
+ path_template = '{nextLink}'
1194
+
1195
+ request_url = @base_url || @client.base_url
1196
+
1197
+ options = {
1198
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1199
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1200
+ headers: request_headers.merge(custom_headers || {}),
1201
+ base_url: request_url
1202
+ }
1203
+ promise = @client.make_request_async(:get, path_template, options)
1204
+
1205
+ promise = promise.then do |result|
1206
+ http_response = result.response
1207
+ status_code = http_response.status
1208
+ response_content = http_response.body
1209
+ unless status_code == 200
1210
+ error_model = JSON.load(response_content)
1211
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1212
+ end
1213
+
1214
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1215
+ # Deserialize Response
1216
+ if status_code == 200
1217
+ begin
1218
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1219
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1220
+ result.body = @client.deserialize(result_mapper, parsed_response)
1221
+ rescue Exception => e
1222
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1223
+ end
1224
+ end
1225
+
1226
+ result
1227
+ end
1228
+
1229
+ promise.execute
1230
+ end
1231
+
1232
+ #
1233
+ # Lists the marketplaces for a scope by billingAccountId and current billing
1234
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1235
+ # later.
1236
+ #
1237
+ # @param next_page_link [String] The NextLink from the previous successful call
1238
+ # to List operation.
1239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1240
+ # will be added to the HTTP request.
1241
+ #
1242
+ # @return [MarketplacesListResult] operation results.
1243
+ #
1244
+ def list_by_billing_account_next(next_page_link, custom_headers:nil)
1245
+ response = list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1246
+ response.body unless response.nil?
1247
+ end
1248
+
1249
+ #
1250
+ # Lists the marketplaces for a scope by billingAccountId and current billing
1251
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1252
+ # later.
1253
+ #
1254
+ # @param next_page_link [String] The NextLink from the previous successful call
1255
+ # to List operation.
1256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1257
+ # will be added to the HTTP request.
1258
+ #
1259
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1260
+ #
1261
+ def list_by_billing_account_next_with_http_info(next_page_link, custom_headers:nil)
1262
+ list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1263
+ end
1264
+
1265
+ #
1266
+ # Lists the marketplaces for a scope by billingAccountId and current billing
1267
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1268
+ # later.
1269
+ #
1270
+ # @param next_page_link [String] The NextLink from the previous successful call
1271
+ # to List operation.
1272
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1273
+ # to the HTTP request.
1274
+ #
1275
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1276
+ #
1277
+ def list_by_billing_account_next_async(next_page_link, custom_headers:nil)
1278
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1279
+
1280
+
1281
+ request_headers = {}
1282
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1283
+
1284
+ # Set Headers
1285
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1286
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1287
+ path_template = '{nextLink}'
1288
+
1289
+ request_url = @base_url || @client.base_url
1290
+
1291
+ options = {
1292
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1293
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1294
+ headers: request_headers.merge(custom_headers || {}),
1295
+ base_url: request_url
1296
+ }
1297
+ promise = @client.make_request_async(:get, path_template, options)
1298
+
1299
+ promise = promise.then do |result|
1300
+ http_response = result.response
1301
+ status_code = http_response.status
1302
+ response_content = http_response.body
1303
+ unless status_code == 200
1304
+ error_model = JSON.load(response_content)
1305
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1306
+ end
1307
+
1308
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1309
+ # Deserialize Response
1310
+ if status_code == 200
1311
+ begin
1312
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1313
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1314
+ result.body = @client.deserialize(result_mapper, parsed_response)
1315
+ rescue Exception => e
1316
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1317
+ end
1318
+ end
1319
+
1320
+ result
1321
+ end
1322
+
1323
+ promise.execute
1324
+ end
1325
+
1326
+ #
1327
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
1328
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1329
+ #
1330
+ # @param next_page_link [String] The NextLink from the previous successful call
1331
+ # to List operation.
1332
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1333
+ # will be added to the HTTP request.
1334
+ #
1335
+ # @return [MarketplacesListResult] operation results.
1336
+ #
1337
+ def list_for_billing_period_by_billing_account_next(next_page_link, custom_headers:nil)
1338
+ response = list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1339
+ response.body unless response.nil?
1340
+ end
1341
+
1342
+ #
1343
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
1344
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1345
+ #
1346
+ # @param next_page_link [String] The NextLink from the previous successful call
1347
+ # to List operation.
1348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1349
+ # will be added to the HTTP request.
1350
+ #
1351
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1352
+ #
1353
+ def list_for_billing_period_by_billing_account_next_with_http_info(next_page_link, custom_headers:nil)
1354
+ list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1355
+ end
1356
+
1357
+ #
1358
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
1359
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1360
+ #
1361
+ # @param next_page_link [String] The NextLink from the previous successful call
1362
+ # to List operation.
1363
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1364
+ # to the HTTP request.
1365
+ #
1366
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1367
+ #
1368
+ def list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:nil)
1369
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1370
+
1371
+
1372
+ request_headers = {}
1373
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1374
+
1375
+ # Set Headers
1376
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1377
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1378
+ path_template = '{nextLink}'
1379
+
1380
+ request_url = @base_url || @client.base_url
1381
+
1382
+ options = {
1383
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1384
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1385
+ headers: request_headers.merge(custom_headers || {}),
1386
+ base_url: request_url
1387
+ }
1388
+ promise = @client.make_request_async(:get, path_template, options)
1389
+
1390
+ promise = promise.then do |result|
1391
+ http_response = result.response
1392
+ status_code = http_response.status
1393
+ response_content = http_response.body
1394
+ unless status_code == 200
1395
+ error_model = JSON.load(response_content)
1396
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1397
+ end
1398
+
1399
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1400
+ # Deserialize Response
1401
+ if status_code == 200
1402
+ begin
1403
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1404
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1405
+ result.body = @client.deserialize(result_mapper, parsed_response)
1406
+ rescue Exception => e
1407
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1408
+ end
1409
+ end
1410
+
1411
+ result
1412
+ end
1413
+
1414
+ promise.execute
1415
+ end
1416
+
1417
+ #
1418
+ # Lists the marketplaces for a scope by departmentId and current billing
1419
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1420
+ # later.
1421
+ #
1422
+ # @param next_page_link [String] The NextLink from the previous successful call
1423
+ # to List operation.
1424
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1425
+ # will be added to the HTTP request.
1426
+ #
1427
+ # @return [MarketplacesListResult] operation results.
1428
+ #
1429
+ def list_by_department_next(next_page_link, custom_headers:nil)
1430
+ response = list_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1431
+ response.body unless response.nil?
1432
+ end
1433
+
1434
+ #
1435
+ # Lists the marketplaces for a scope by departmentId and current billing
1436
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1437
+ # later.
1438
+ #
1439
+ # @param next_page_link [String] The NextLink from the previous successful call
1440
+ # to List operation.
1441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1442
+ # will be added to the HTTP request.
1443
+ #
1444
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1445
+ #
1446
+ def list_by_department_next_with_http_info(next_page_link, custom_headers:nil)
1447
+ list_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1448
+ end
1449
+
1450
+ #
1451
+ # Lists the marketplaces for a scope by departmentId and current billing
1452
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1453
+ # later.
1454
+ #
1455
+ # @param next_page_link [String] The NextLink from the previous successful call
1456
+ # to List operation.
1457
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1458
+ # to the HTTP request.
1459
+ #
1460
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1461
+ #
1462
+ def list_by_department_next_async(next_page_link, custom_headers:nil)
1463
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1464
+
1465
+
1466
+ request_headers = {}
1467
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1468
+
1469
+ # Set Headers
1470
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1471
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1472
+ path_template = '{nextLink}'
1473
+
1474
+ request_url = @base_url || @client.base_url
1475
+
1476
+ options = {
1477
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1478
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1479
+ headers: request_headers.merge(custom_headers || {}),
1480
+ base_url: request_url
1481
+ }
1482
+ promise = @client.make_request_async(:get, path_template, options)
1483
+
1484
+ promise = promise.then do |result|
1485
+ http_response = result.response
1486
+ status_code = http_response.status
1487
+ response_content = http_response.body
1488
+ unless status_code == 200
1489
+ error_model = JSON.load(response_content)
1490
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1491
+ end
1492
+
1493
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1494
+ # Deserialize Response
1495
+ if status_code == 200
1496
+ begin
1497
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1498
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1499
+ result.body = @client.deserialize(result_mapper, parsed_response)
1500
+ rescue Exception => e
1501
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1502
+ end
1503
+ end
1504
+
1505
+ result
1506
+ end
1507
+
1508
+ promise.execute
1509
+ end
1510
+
1511
+ #
1512
+ # Lists the marketplaces for a scope by billing period and departmentId.
1513
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1514
+ #
1515
+ # @param next_page_link [String] The NextLink from the previous successful call
1516
+ # to List operation.
1517
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1518
+ # will be added to the HTTP request.
1519
+ #
1520
+ # @return [MarketplacesListResult] operation results.
1521
+ #
1522
+ def list_for_billing_period_by_department_next(next_page_link, custom_headers:nil)
1523
+ response = list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1524
+ response.body unless response.nil?
1525
+ end
1526
+
1527
+ #
1528
+ # Lists the marketplaces for a scope by billing period and departmentId.
1529
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1530
+ #
1531
+ # @param next_page_link [String] The NextLink from the previous successful call
1532
+ # to List operation.
1533
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1534
+ # will be added to the HTTP request.
1535
+ #
1536
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1537
+ #
1538
+ def list_for_billing_period_by_department_next_with_http_info(next_page_link, custom_headers:nil)
1539
+ list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1540
+ end
1541
+
1542
+ #
1543
+ # Lists the marketplaces for a scope by billing period and departmentId.
1544
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1545
+ #
1546
+ # @param next_page_link [String] The NextLink from the previous successful call
1547
+ # to List operation.
1548
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1549
+ # to the HTTP request.
1550
+ #
1551
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1552
+ #
1553
+ def list_for_billing_period_by_department_next_async(next_page_link, custom_headers:nil)
1554
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1555
+
1556
+
1557
+ request_headers = {}
1558
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1559
+
1560
+ # Set Headers
1561
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1562
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1563
+ path_template = '{nextLink}'
1564
+
1565
+ request_url = @base_url || @client.base_url
1566
+
1567
+ options = {
1568
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1569
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1570
+ headers: request_headers.merge(custom_headers || {}),
1571
+ base_url: request_url
1572
+ }
1573
+ promise = @client.make_request_async(:get, path_template, options)
1574
+
1575
+ promise = promise.then do |result|
1576
+ http_response = result.response
1577
+ status_code = http_response.status
1578
+ response_content = http_response.body
1579
+ unless status_code == 200
1580
+ error_model = JSON.load(response_content)
1581
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1582
+ end
1583
+
1584
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1585
+ # Deserialize Response
1586
+ if status_code == 200
1587
+ begin
1588
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1589
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1590
+ result.body = @client.deserialize(result_mapper, parsed_response)
1591
+ rescue Exception => e
1592
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1593
+ end
1594
+ end
1595
+
1596
+ result
1597
+ end
1598
+
1599
+ promise.execute
1600
+ end
1601
+
1602
+ #
1603
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
1604
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1605
+ # later.
1606
+ #
1607
+ # @param next_page_link [String] The NextLink from the previous successful call
1608
+ # to List operation.
1609
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1610
+ # will be added to the HTTP request.
1611
+ #
1612
+ # @return [MarketplacesListResult] operation results.
1613
+ #
1614
+ def list_by_enrollment_account_next(next_page_link, custom_headers:nil)
1615
+ response = list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1616
+ response.body unless response.nil?
1617
+ end
1618
+
1619
+ #
1620
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
1621
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1622
+ # later.
1623
+ #
1624
+ # @param next_page_link [String] The NextLink from the previous successful call
1625
+ # to List operation.
1626
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1627
+ # will be added to the HTTP request.
1628
+ #
1629
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1630
+ #
1631
+ def list_by_enrollment_account_next_with_http_info(next_page_link, custom_headers:nil)
1632
+ list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1633
+ end
1634
+
1635
+ #
1636
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
1637
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1638
+ # later.
1639
+ #
1640
+ # @param next_page_link [String] The NextLink from the previous successful call
1641
+ # to List operation.
1642
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1643
+ # to the HTTP request.
1644
+ #
1645
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1646
+ #
1647
+ def list_by_enrollment_account_next_async(next_page_link, custom_headers:nil)
1648
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1649
+
1650
+
1651
+ request_headers = {}
1652
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1653
+
1654
+ # Set Headers
1655
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1656
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1657
+ path_template = '{nextLink}'
1658
+
1659
+ request_url = @base_url || @client.base_url
1660
+
1661
+ options = {
1662
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1663
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1664
+ headers: request_headers.merge(custom_headers || {}),
1665
+ base_url: request_url
1666
+ }
1667
+ promise = @client.make_request_async(:get, path_template, options)
1668
+
1669
+ promise = promise.then do |result|
1670
+ http_response = result.response
1671
+ status_code = http_response.status
1672
+ response_content = http_response.body
1673
+ unless status_code == 200
1674
+ error_model = JSON.load(response_content)
1675
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1676
+ end
1677
+
1678
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1679
+ # Deserialize Response
1680
+ if status_code == 200
1681
+ begin
1682
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1683
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1684
+ result.body = @client.deserialize(result_mapper, parsed_response)
1685
+ rescue Exception => e
1686
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1687
+ end
1688
+ end
1689
+
1690
+ result
1691
+ end
1692
+
1693
+ promise.execute
1694
+ end
1695
+
1696
+ #
1697
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
1698
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1699
+ #
1700
+ # @param next_page_link [String] The NextLink from the previous successful call
1701
+ # to List operation.
1702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1703
+ # will be added to the HTTP request.
1704
+ #
1705
+ # @return [MarketplacesListResult] operation results.
1706
+ #
1707
+ def list_for_billing_period_by_enrollment_account_next(next_page_link, custom_headers:nil)
1708
+ response = list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1709
+ response.body unless response.nil?
1710
+ end
1711
+
1712
+ #
1713
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
1714
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1715
+ #
1716
+ # @param next_page_link [String] The NextLink from the previous successful call
1717
+ # to List operation.
1718
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1719
+ # will be added to the HTTP request.
1720
+ #
1721
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1722
+ #
1723
+ def list_for_billing_period_by_enrollment_account_next_with_http_info(next_page_link, custom_headers:nil)
1724
+ list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1725
+ end
1726
+
1727
+ #
1728
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
1729
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1730
+ #
1731
+ # @param next_page_link [String] The NextLink from the previous successful call
1732
+ # to List operation.
1733
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1734
+ # to the HTTP request.
1735
+ #
1736
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1737
+ #
1738
+ def list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:nil)
1739
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1740
+
1741
+
1742
+ request_headers = {}
1743
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1744
+
1745
+ # Set Headers
1746
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1747
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1748
+ path_template = '{nextLink}'
1749
+
1750
+ request_url = @base_url || @client.base_url
1751
+
1752
+ options = {
1753
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1754
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1755
+ headers: request_headers.merge(custom_headers || {}),
1756
+ base_url: request_url
1757
+ }
1758
+ promise = @client.make_request_async(:get, path_template, options)
1759
+
1760
+ promise = promise.then do |result|
1761
+ http_response = result.response
1762
+ status_code = http_response.status
1763
+ response_content = http_response.body
1764
+ unless status_code == 200
1765
+ error_model = JSON.load(response_content)
1766
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1767
+ end
1768
+
1769
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1770
+ # Deserialize Response
1771
+ if status_code == 200
1772
+ begin
1773
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1774
+ result_mapper = Azure::Consumption::Mgmt::V2018_06_30::Models::MarketplacesListResult.mapper()
1775
+ result.body = @client.deserialize(result_mapper, parsed_response)
1776
+ rescue Exception => e
1777
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1778
+ end
1779
+ end
1780
+
1781
+ result
1782
+ end
1783
+
1784
+ promise.execute
1785
+ end
1786
+
1787
+ #
1788
+ # Lists the marketplaces for a scope by subscriptionId and current billing
1789
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1790
+ # later.
1791
+ #
1792
+ # @param filter [String] May be used to filter marketplaces by
1793
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1794
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1795
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1796
+ # currently support 'ne', 'or', or 'not'.
1797
+ # @param top [Integer] May be used to limit the number of results to the most
1798
+ # recent N marketplaces.
1799
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1800
+ # returned a partial result. If a previous response contains a nextLink
1801
+ # element, the value of the nextLink element will include a skiptoken parameter
1802
+ # that specifies a starting point to use for subsequent calls.
1803
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1804
+ # will be added to the HTTP request.
1805
+ #
1806
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1807
+ # response.
1808
+ #
1809
+ def list_as_lazy(filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1810
+ response = list_async(filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1811
+ unless response.nil?
1812
+ page = response.body
1813
+ page.next_method = Proc.new do |next_page_link|
1814
+ list_next_async(next_page_link, custom_headers:custom_headers)
1815
+ end
1816
+ page
1817
+ end
1818
+ end
1819
+
1820
+ #
1821
+ # Lists the marketplaces for a scope by billing period and subscripotionId.
1822
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1823
+ #
1824
+ # @param billing_period_name [String] Billing Period Name.
1825
+ # @param filter [String] May be used to filter marketplaces by
1826
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1827
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1828
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1829
+ # currently support 'ne', 'or', or 'not'.
1830
+ # @param top [Integer] May be used to limit the number of results to the most
1831
+ # recent N marketplaces.
1832
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1833
+ # returned a partial result. If a previous response contains a nextLink
1834
+ # element, the value of the nextLink element will include a skiptoken parameter
1835
+ # that specifies a starting point to use for subsequent calls.
1836
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1837
+ # will be added to the HTTP request.
1838
+ #
1839
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1840
+ # response.
1841
+ #
1842
+ def list_by_billing_period_as_lazy(billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1843
+ response = list_by_billing_period_async(billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1844
+ unless response.nil?
1845
+ page = response.body
1846
+ page.next_method = Proc.new do |next_page_link|
1847
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers)
1848
+ end
1849
+ page
1850
+ end
1851
+ end
1852
+
1853
+ #
1854
+ # Lists the marketplaces for a scope by billingAccountId and current billing
1855
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1856
+ # later.
1857
+ #
1858
+ # @param billing_account_id [String] BillingAccount ID
1859
+ # @param filter [String] May be used to filter marketplaces by
1860
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1861
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1862
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1863
+ # currently support 'ne', 'or', or 'not'.
1864
+ # @param top [Integer] May be used to limit the number of results to the most
1865
+ # recent N marketplaces.
1866
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1867
+ # returned a partial result. If a previous response contains a nextLink
1868
+ # element, the value of the nextLink element will include a skiptoken parameter
1869
+ # that specifies a starting point to use for subsequent calls.
1870
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1871
+ # will be added to the HTTP request.
1872
+ #
1873
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1874
+ # response.
1875
+ #
1876
+ def list_by_billing_account_as_lazy(billing_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1877
+ response = list_by_billing_account_async(billing_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1878
+ unless response.nil?
1879
+ page = response.body
1880
+ page.next_method = Proc.new do |next_page_link|
1881
+ list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers)
1882
+ end
1883
+ page
1884
+ end
1885
+ end
1886
+
1887
+ #
1888
+ # Lists the marketplaces for a scope by billing period and billingAccountId.
1889
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1890
+ #
1891
+ # @param billing_account_id [String] BillingAccount ID
1892
+ # @param billing_period_name [String] Billing Period Name.
1893
+ # @param filter [String] May be used to filter marketplaces by
1894
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1895
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1896
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1897
+ # currently support 'ne', 'or', or 'not'.
1898
+ # @param top [Integer] May be used to limit the number of results to the most
1899
+ # recent N marketplaces.
1900
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1901
+ # returned a partial result. If a previous response contains a nextLink
1902
+ # element, the value of the nextLink element will include a skiptoken parameter
1903
+ # that specifies a starting point to use for subsequent calls.
1904
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1905
+ # will be added to the HTTP request.
1906
+ #
1907
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1908
+ # response.
1909
+ #
1910
+ def list_for_billing_period_by_billing_account_as_lazy(billing_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1911
+ response = list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1912
+ unless response.nil?
1913
+ page = response.body
1914
+ page.next_method = Proc.new do |next_page_link|
1915
+ list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers)
1916
+ end
1917
+ page
1918
+ end
1919
+ end
1920
+
1921
+ #
1922
+ # Lists the marketplaces for a scope by departmentId and current billing
1923
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1924
+ # later.
1925
+ #
1926
+ # @param department_id [String] Department ID
1927
+ # @param filter [String] May be used to filter marketplaces by
1928
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1929
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1930
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1931
+ # currently support 'ne', 'or', or 'not'.
1932
+ # @param top [Integer] May be used to limit the number of results to the most
1933
+ # recent N marketplaces.
1934
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1935
+ # returned a partial result. If a previous response contains a nextLink
1936
+ # element, the value of the nextLink element will include a skiptoken parameter
1937
+ # that specifies a starting point to use for subsequent calls.
1938
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1939
+ # will be added to the HTTP request.
1940
+ #
1941
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1942
+ # response.
1943
+ #
1944
+ def list_by_department_as_lazy(department_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1945
+ response = list_by_department_async(department_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1946
+ unless response.nil?
1947
+ page = response.body
1948
+ page.next_method = Proc.new do |next_page_link|
1949
+ list_by_department_next_async(next_page_link, custom_headers:custom_headers)
1950
+ end
1951
+ page
1952
+ end
1953
+ end
1954
+
1955
+ #
1956
+ # Lists the marketplaces for a scope by billing period and departmentId.
1957
+ # Marketplaces are available via this API only for May 1, 2014 or later.
1958
+ #
1959
+ # @param department_id [String] Department ID
1960
+ # @param billing_period_name [String] Billing Period Name.
1961
+ # @param filter [String] May be used to filter marketplaces by
1962
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1963
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1964
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1965
+ # currently support 'ne', 'or', or 'not'.
1966
+ # @param top [Integer] May be used to limit the number of results to the most
1967
+ # recent N marketplaces.
1968
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1969
+ # returned a partial result. If a previous response contains a nextLink
1970
+ # element, the value of the nextLink element will include a skiptoken parameter
1971
+ # that specifies a starting point to use for subsequent calls.
1972
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1973
+ # will be added to the HTTP request.
1974
+ #
1975
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
1976
+ # response.
1977
+ #
1978
+ def list_for_billing_period_by_department_as_lazy(department_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
1979
+ response = list_for_billing_period_by_department_async(department_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
1980
+ unless response.nil?
1981
+ page = response.body
1982
+ page.next_method = Proc.new do |next_page_link|
1983
+ list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers)
1984
+ end
1985
+ page
1986
+ end
1987
+ end
1988
+
1989
+ #
1990
+ # Lists the marketplaces for a scope by enrollmentAccountId and current billing
1991
+ # period. Marketplaces are available via this API only for May 1, 2014 or
1992
+ # later.
1993
+ #
1994
+ # @param enrollment_account_id [String] EnrollmentAccount ID
1995
+ # @param filter [String] May be used to filter marketplaces by
1996
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1997
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1998
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1999
+ # currently support 'ne', 'or', or 'not'.
2000
+ # @param top [Integer] May be used to limit the number of results to the most
2001
+ # recent N marketplaces.
2002
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2003
+ # returned a partial result. If a previous response contains a nextLink
2004
+ # element, the value of the nextLink element will include a skiptoken parameter
2005
+ # that specifies a starting point to use for subsequent calls.
2006
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2007
+ # will be added to the HTTP request.
2008
+ #
2009
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
2010
+ # response.
2011
+ #
2012
+ def list_by_enrollment_account_as_lazy(enrollment_account_id, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
2013
+ response = list_by_enrollment_account_async(enrollment_account_id, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
2014
+ unless response.nil?
2015
+ page = response.body
2016
+ page.next_method = Proc.new do |next_page_link|
2017
+ list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers)
2018
+ end
2019
+ page
2020
+ end
2021
+ end
2022
+
2023
+ #
2024
+ # Lists the marketplaces for a scope by billing period and enrollmentAccountId.
2025
+ # Marketplaces are available via this API only for May 1, 2014 or later.
2026
+ #
2027
+ # @param enrollment_account_id [String] EnrollmentAccount ID
2028
+ # @param billing_period_name [String] Billing Period Name.
2029
+ # @param filter [String] May be used to filter marketplaces by
2030
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2031
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
2032
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
2033
+ # currently support 'ne', 'or', or 'not'.
2034
+ # @param top [Integer] May be used to limit the number of results to the most
2035
+ # recent N marketplaces.
2036
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2037
+ # returned a partial result. If a previous response contains a nextLink
2038
+ # element, the value of the nextLink element will include a skiptoken parameter
2039
+ # that specifies a starting point to use for subsequent calls.
2040
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2041
+ # will be added to the HTTP request.
2042
+ #
2043
+ # @return [MarketplacesListResult] which provide lazy access to pages of the
2044
+ # response.
2045
+ #
2046
+ def list_for_billing_period_by_enrollment_account_as_lazy(enrollment_account_id, billing_period_name, filter:nil, top:nil, skiptoken:nil, custom_headers:nil)
2047
+ response = list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, filter:filter, top:top, skiptoken:skiptoken, custom_headers:custom_headers).value!
2048
+ unless response.nil?
2049
+ page = response.body
2050
+ page.next_method = Proc.new do |next_page_link|
2051
+ list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers)
2052
+ end
2053
+ page
2054
+ end
2055
+ end
2056
+
2057
+ end
2058
+ end