azure_mgmt_consumption 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +4 -1
  3. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/operations.rb +15 -13
  4. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/usage_details.rb +15 -13
  5. data/lib/2017-11-30/generated/azure_mgmt_consumption.rb +12 -5
  6. data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +12 -1
  7. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  8. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  9. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +56 -0
  10. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  11. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +57 -0
  12. data/lib/2017-11-30/generated/azure_mgmt_consumption/operations.rb +15 -13
  13. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_details.rb +129 -0
  14. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_summaries.rb +135 -0
  15. data/lib/2017-11-30/generated/azure_mgmt_consumption/usage_details.rb +15 -13
  16. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption.rb +42 -0
  17. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/budgets.rb +384 -0
  18. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +138 -0
  19. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budget.rb +160 -0
  20. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  21. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budgets_list_result.rb +57 -0
  22. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  23. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  24. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  25. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/notification.rb +115 -0
  26. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  27. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  28. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  29. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  30. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  31. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  32. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  33. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/operations.rb +216 -0
  34. data/lib/2018-01-31/generated/azure_mgmt_consumption.rb +62 -0
  35. data/lib/2018-01-31/generated/azure_mgmt_consumption/budgets.rb +993 -0
  36. data/lib/2018-01-31/generated/azure_mgmt_consumption/consumption_management_client.rb +155 -0
  37. data/lib/2018-01-31/generated/azure_mgmt_consumption/marketplaces.rb +521 -0
  38. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  39. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  40. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  41. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  42. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  43. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  44. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  45. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  46. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/filters.rb +106 -0
  47. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  48. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  49. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  50. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  51. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  52. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  53. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  54. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  55. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +134 -0
  56. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  57. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  58. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  59. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  60. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  61. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +101 -0
  62. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  63. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  64. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
  65. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  66. data/lib/2018-01-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  67. data/lib/2018-01-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  68. data/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb +246 -0
  69. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  70. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  71. data/lib/2018-01-31/generated/azure_mgmt_consumption/usage_details.rb +553 -0
  72. data/lib/azure_mgmt_consumption.rb +2 -0
  73. data/lib/profiles/latest/consumption_latest_profile_client.rb +28 -9
  74. data/lib/profiles/latest/consumption_module_definition.rb +0 -1
  75. data/lib/profiles/latest/modules/consumption_profile_module.rb +153 -48
  76. data/lib/version.rb +1 -1
  77. metadata +65 -2
@@ -0,0 +1,449 @@
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_01_31
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class ReservationsDetails
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the ReservationsDetails 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 reservations details for provided date range.
27
+ #
28
+ # @param reservation_order_id [String] Order Id of the reservation
29
+ # @param filter [String] Filter reservation details by date range. The
30
+ # properties/UsageDate for start date and end date. The filter supports 'le'
31
+ # and 'ge'
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ReservationDetails>] operation results.
36
+ #
37
+ def list_by_reservation_order(reservation_order_id, filter, custom_headers:nil)
38
+ first_page = list_by_reservation_order_as_lazy(reservation_order_id, filter, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Lists the reservations details for provided date range.
44
+ #
45
+ # @param reservation_order_id [String] Order Id of the reservation
46
+ # @param filter [String] Filter reservation details by date range. The
47
+ # properties/UsageDate for start date and end date. The filter supports 'le'
48
+ # and 'ge'
49
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
+ # will be added to the HTTP request.
51
+ #
52
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
53
+ #
54
+ def list_by_reservation_order_with_http_info(reservation_order_id, filter, custom_headers:nil)
55
+ list_by_reservation_order_async(reservation_order_id, filter, custom_headers:custom_headers).value!
56
+ end
57
+
58
+ #
59
+ # Lists the reservations details for provided date range.
60
+ #
61
+ # @param reservation_order_id [String] Order Id of the reservation
62
+ # @param filter [String] Filter reservation details by date range. The
63
+ # properties/UsageDate for start date and end date. The filter supports 'le'
64
+ # and 'ge'
65
+ # @param [Hash{String => String}] A hash of custom headers that will be added
66
+ # to the HTTP request.
67
+ #
68
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
69
+ #
70
+ def list_by_reservation_order_async(reservation_order_id, filter, custom_headers:nil)
71
+ fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
72
+ fail ArgumentError, 'filter is nil' if filter.nil?
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+ path_template = 'providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails'
83
+
84
+ request_url = @base_url || @client.base_url
85
+
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'reservationOrderId' => reservation_order_id},
89
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
90
+ headers: request_headers.merge(custom_headers || {}),
91
+ base_url: request_url
92
+ }
93
+ promise = @client.make_request_async(:get, path_template, options)
94
+
95
+ promise = promise.then do |result|
96
+ http_response = result.response
97
+ status_code = http_response.status
98
+ response_content = http_response.body
99
+ unless status_code == 200
100
+ error_model = JSON.load(response_content)
101
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
102
+ end
103
+
104
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ # Deserialize Response
106
+ if status_code == 200
107
+ begin
108
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
109
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationDetailsListResult.mapper()
110
+ result.body = @client.deserialize(result_mapper, parsed_response)
111
+ rescue Exception => e
112
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
113
+ end
114
+ end
115
+
116
+ result
117
+ end
118
+
119
+ promise.execute
120
+ end
121
+
122
+ #
123
+ # Lists the reservations details for provided date range.
124
+ #
125
+ # @param reservation_order_id [String] Order Id of the reservation
126
+ # @param reservation_id [String] Id of the reservation
127
+ # @param filter [String] Filter reservation details by date range. The
128
+ # properties/UsageDate for start date and end date. The filter supports 'le'
129
+ # and 'ge'
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [Array<ReservationDetails>] operation results.
134
+ #
135
+ def list_by_reservation_order_and_reservation(reservation_order_id, reservation_id, filter, custom_headers:nil)
136
+ first_page = list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, filter, custom_headers:custom_headers)
137
+ first_page.get_all_items
138
+ end
139
+
140
+ #
141
+ # Lists the reservations details for provided date range.
142
+ #
143
+ # @param reservation_order_id [String] Order Id of the reservation
144
+ # @param reservation_id [String] Id of the reservation
145
+ # @param filter [String] Filter reservation details by date range. The
146
+ # properties/UsageDate for start date and end date. The filter supports 'le'
147
+ # and 'ge'
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
152
+ #
153
+ def list_by_reservation_order_and_reservation_with_http_info(reservation_order_id, reservation_id, filter, custom_headers:nil)
154
+ list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, filter, custom_headers:custom_headers).value!
155
+ end
156
+
157
+ #
158
+ # Lists the reservations details for provided date range.
159
+ #
160
+ # @param reservation_order_id [String] Order Id of the reservation
161
+ # @param reservation_id [String] Id of the reservation
162
+ # @param filter [String] Filter reservation details by date range. The
163
+ # properties/UsageDate for start date and end date. The filter supports 'le'
164
+ # and 'ge'
165
+ # @param [Hash{String => String}] A hash of custom headers that will be added
166
+ # to the HTTP request.
167
+ #
168
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
169
+ #
170
+ def list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, filter, custom_headers:nil)
171
+ fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
172
+ fail ArgumentError, 'reservation_id is nil' if reservation_id.nil?
173
+ fail ArgumentError, 'filter is nil' if filter.nil?
174
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
175
+
176
+
177
+ request_headers = {}
178
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
179
+
180
+ # Set Headers
181
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
182
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
183
+ path_template = 'providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails'
184
+
185
+ request_url = @base_url || @client.base_url
186
+
187
+ options = {
188
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
189
+ path_params: {'reservationOrderId' => reservation_order_id,'reservationId' => reservation_id},
190
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
191
+ headers: request_headers.merge(custom_headers || {}),
192
+ base_url: request_url
193
+ }
194
+ promise = @client.make_request_async(:get, path_template, options)
195
+
196
+ promise = promise.then do |result|
197
+ http_response = result.response
198
+ status_code = http_response.status
199
+ response_content = http_response.body
200
+ unless status_code == 200
201
+ error_model = JSON.load(response_content)
202
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
203
+ end
204
+
205
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
206
+ # Deserialize Response
207
+ if status_code == 200
208
+ begin
209
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
210
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationDetailsListResult.mapper()
211
+ result.body = @client.deserialize(result_mapper, parsed_response)
212
+ rescue Exception => e
213
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
214
+ end
215
+ end
216
+
217
+ result
218
+ end
219
+
220
+ promise.execute
221
+ end
222
+
223
+ #
224
+ # Lists the reservations details for provided date range.
225
+ #
226
+ # @param next_page_link [String] The NextLink from the previous successful call
227
+ # to List operation.
228
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
229
+ # will be added to the HTTP request.
230
+ #
231
+ # @return [ReservationDetailsListResult] operation results.
232
+ #
233
+ def list_by_reservation_order_next(next_page_link, custom_headers:nil)
234
+ response = list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers).value!
235
+ response.body unless response.nil?
236
+ end
237
+
238
+ #
239
+ # Lists the reservations details for provided date range.
240
+ #
241
+ # @param next_page_link [String] The NextLink from the previous successful call
242
+ # to List operation.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
247
+ #
248
+ def list_by_reservation_order_next_with_http_info(next_page_link, custom_headers:nil)
249
+ list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers).value!
250
+ end
251
+
252
+ #
253
+ # Lists the reservations details for provided date range.
254
+ #
255
+ # @param next_page_link [String] The NextLink from the previous successful call
256
+ # to List operation.
257
+ # @param [Hash{String => String}] A hash of custom headers that will be added
258
+ # to the HTTP request.
259
+ #
260
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
261
+ #
262
+ def list_by_reservation_order_next_async(next_page_link, custom_headers:nil)
263
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
264
+
265
+
266
+ request_headers = {}
267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
268
+
269
+ # Set Headers
270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
272
+ path_template = '{nextLink}'
273
+
274
+ request_url = @base_url || @client.base_url
275
+
276
+ options = {
277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
+ skip_encoding_path_params: {'nextLink' => next_page_link},
279
+ headers: request_headers.merge(custom_headers || {}),
280
+ base_url: request_url
281
+ }
282
+ promise = @client.make_request_async(:get, path_template, options)
283
+
284
+ promise = promise.then do |result|
285
+ http_response = result.response
286
+ status_code = http_response.status
287
+ response_content = http_response.body
288
+ unless status_code == 200
289
+ error_model = JSON.load(response_content)
290
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
291
+ end
292
+
293
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
294
+ # Deserialize Response
295
+ if status_code == 200
296
+ begin
297
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
298
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationDetailsListResult.mapper()
299
+ result.body = @client.deserialize(result_mapper, parsed_response)
300
+ rescue Exception => e
301
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
302
+ end
303
+ end
304
+
305
+ result
306
+ end
307
+
308
+ promise.execute
309
+ end
310
+
311
+ #
312
+ # Lists the reservations details for provided date range.
313
+ #
314
+ # @param next_page_link [String] The NextLink from the previous successful call
315
+ # to List operation.
316
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
317
+ # will be added to the HTTP request.
318
+ #
319
+ # @return [ReservationDetailsListResult] operation results.
320
+ #
321
+ def list_by_reservation_order_and_reservation_next(next_page_link, custom_headers:nil)
322
+ response = list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers).value!
323
+ response.body unless response.nil?
324
+ end
325
+
326
+ #
327
+ # Lists the reservations details for provided date range.
328
+ #
329
+ # @param next_page_link [String] The NextLink from the previous successful call
330
+ # to List operation.
331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
332
+ # will be added to the HTTP request.
333
+ #
334
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
335
+ #
336
+ def list_by_reservation_order_and_reservation_next_with_http_info(next_page_link, custom_headers:nil)
337
+ list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers).value!
338
+ end
339
+
340
+ #
341
+ # Lists the reservations details for provided date range.
342
+ #
343
+ # @param next_page_link [String] The NextLink from the previous successful call
344
+ # to List operation.
345
+ # @param [Hash{String => String}] A hash of custom headers that will be added
346
+ # to the HTTP request.
347
+ #
348
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
349
+ #
350
+ def list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:nil)
351
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
352
+
353
+
354
+ request_headers = {}
355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
356
+
357
+ # Set Headers
358
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
+ path_template = '{nextLink}'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ skip_encoding_path_params: {'nextLink' => next_page_link},
367
+ headers: request_headers.merge(custom_headers || {}),
368
+ base_url: request_url
369
+ }
370
+ promise = @client.make_request_async(:get, path_template, options)
371
+
372
+ promise = promise.then do |result|
373
+ http_response = result.response
374
+ status_code = http_response.status
375
+ response_content = http_response.body
376
+ unless status_code == 200
377
+ error_model = JSON.load(response_content)
378
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
379
+ end
380
+
381
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
382
+ # Deserialize Response
383
+ if status_code == 200
384
+ begin
385
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
386
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationDetailsListResult.mapper()
387
+ result.body = @client.deserialize(result_mapper, parsed_response)
388
+ rescue Exception => e
389
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
390
+ end
391
+ end
392
+
393
+ result
394
+ end
395
+
396
+ promise.execute
397
+ end
398
+
399
+ #
400
+ # Lists the reservations details for provided date range.
401
+ #
402
+ # @param reservation_order_id [String] Order Id of the reservation
403
+ # @param filter [String] Filter reservation details by date range. The
404
+ # properties/UsageDate for start date and end date. The filter supports 'le'
405
+ # and 'ge'
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ # @return [ReservationDetailsListResult] which provide lazy access to pages of
410
+ # the response.
411
+ #
412
+ def list_by_reservation_order_as_lazy(reservation_order_id, filter, custom_headers:nil)
413
+ response = list_by_reservation_order_async(reservation_order_id, filter, custom_headers:custom_headers).value!
414
+ unless response.nil?
415
+ page = response.body
416
+ page.next_method = Proc.new do |next_page_link|
417
+ list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers)
418
+ end
419
+ page
420
+ end
421
+ end
422
+
423
+ #
424
+ # Lists the reservations details for provided date range.
425
+ #
426
+ # @param reservation_order_id [String] Order Id of the reservation
427
+ # @param reservation_id [String] Id of the reservation
428
+ # @param filter [String] Filter reservation details by date range. The
429
+ # properties/UsageDate for start date and end date. The filter supports 'le'
430
+ # and 'ge'
431
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
432
+ # will be added to the HTTP request.
433
+ #
434
+ # @return [ReservationDetailsListResult] which provide lazy access to pages of
435
+ # the response.
436
+ #
437
+ def list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, filter, custom_headers:nil)
438
+ response = list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, filter, custom_headers:custom_headers).value!
439
+ unless response.nil?
440
+ page = response.body
441
+ page.next_method = Proc.new do |next_page_link|
442
+ list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers)
443
+ end
444
+ page
445
+ end
446
+ end
447
+
448
+ end
449
+ end
@@ -0,0 +1,465 @@
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_01_31
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class ReservationsSummaries
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the ReservationsSummaries 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 reservations summaries for daily or monthly grain.
27
+ #
28
+ # @param reservation_order_id [String] Order Id of the reservation
29
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
30
+ # 'DailyGrain', 'MonthlyGrain'
31
+ # @param filter [String] Required only for daily grain. The
32
+ # properties/UsageDate for start date and end date. The filter supports 'le'
33
+ # and 'ge'
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [Array<ReservationSummaries>] operation results.
38
+ #
39
+ def list_by_reservation_order(reservation_order_id, grain, filter:nil, custom_headers:nil)
40
+ first_page = list_by_reservation_order_as_lazy(reservation_order_id, grain, filter:filter, custom_headers:custom_headers)
41
+ first_page.get_all_items
42
+ end
43
+
44
+ #
45
+ # Lists the reservations summaries for daily or monthly grain.
46
+ #
47
+ # @param reservation_order_id [String] Order Id of the reservation
48
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
49
+ # 'DailyGrain', 'MonthlyGrain'
50
+ # @param filter [String] Required only for daily grain. The
51
+ # properties/UsageDate for start date and end date. The filter supports 'le'
52
+ # and 'ge'
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def list_by_reservation_order_with_http_info(reservation_order_id, grain, filter:nil, custom_headers:nil)
59
+ list_by_reservation_order_async(reservation_order_id, grain, filter:filter, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Lists the reservations summaries for daily or monthly grain.
64
+ #
65
+ # @param reservation_order_id [String] Order Id of the reservation
66
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
67
+ # 'DailyGrain', 'MonthlyGrain'
68
+ # @param filter [String] Required only for daily grain. The
69
+ # properties/UsageDate for start date and end date. The filter supports 'le'
70
+ # and 'ge'
71
+ # @param [Hash{String => String}] A hash of custom headers that will be added
72
+ # to the HTTP request.
73
+ #
74
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
75
+ #
76
+ def list_by_reservation_order_async(reservation_order_id, grain, filter:nil, custom_headers:nil)
77
+ fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
78
+ fail ArgumentError, 'grain is nil' if grain.nil?
79
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
+
81
+
82
+ request_headers = {}
83
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
84
+
85
+ # Set Headers
86
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
87
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
88
+ path_template = 'providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries'
89
+
90
+ request_url = @base_url || @client.base_url
91
+
92
+ options = {
93
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
94
+ path_params: {'reservationOrderId' => reservation_order_id},
95
+ query_params: {'grain' => grain,'$filter' => filter,'api-version' => @client.api_version},
96
+ headers: request_headers.merge(custom_headers || {}),
97
+ base_url: request_url
98
+ }
99
+ promise = @client.make_request_async(:get, path_template, options)
100
+
101
+ promise = promise.then do |result|
102
+ http_response = result.response
103
+ status_code = http_response.status
104
+ response_content = http_response.body
105
+ unless status_code == 200
106
+ error_model = JSON.load(response_content)
107
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
108
+ end
109
+
110
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
+ # Deserialize Response
112
+ if status_code == 200
113
+ begin
114
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
115
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationSummariesListResult.mapper()
116
+ result.body = @client.deserialize(result_mapper, parsed_response)
117
+ rescue Exception => e
118
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
119
+ end
120
+ end
121
+
122
+ result
123
+ end
124
+
125
+ promise.execute
126
+ end
127
+
128
+ #
129
+ # Lists the reservations summaries for daily or monthly grain.
130
+ #
131
+ # @param reservation_order_id [String] Order Id of the reservation
132
+ # @param reservation_id [String] Id of the reservation
133
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
134
+ # 'DailyGrain', 'MonthlyGrain'
135
+ # @param filter [String] Required only for daily grain. The
136
+ # properties/UsageDate for start date and end date. The filter supports 'le'
137
+ # and 'ge'
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [Array<ReservationSummaries>] operation results.
142
+ #
143
+ def list_by_reservation_order_and_reservation(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
144
+ first_page = list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, grain, filter:filter, custom_headers:custom_headers)
145
+ first_page.get_all_items
146
+ end
147
+
148
+ #
149
+ # Lists the reservations summaries for daily or monthly grain.
150
+ #
151
+ # @param reservation_order_id [String] Order Id of the reservation
152
+ # @param reservation_id [String] Id of the reservation
153
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
154
+ # 'DailyGrain', 'MonthlyGrain'
155
+ # @param filter [String] Required only for daily grain. The
156
+ # properties/UsageDate for start date and end date. The filter supports 'le'
157
+ # and 'ge'
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
162
+ #
163
+ def list_by_reservation_order_and_reservation_with_http_info(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
164
+ list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, grain, filter:filter, custom_headers:custom_headers).value!
165
+ end
166
+
167
+ #
168
+ # Lists the reservations summaries for daily or monthly grain.
169
+ #
170
+ # @param reservation_order_id [String] Order Id of the reservation
171
+ # @param reservation_id [String] Id of the reservation
172
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
173
+ # 'DailyGrain', 'MonthlyGrain'
174
+ # @param filter [String] Required only for daily grain. The
175
+ # properties/UsageDate for start date and end date. The filter supports 'le'
176
+ # and 'ge'
177
+ # @param [Hash{String => String}] A hash of custom headers that will be added
178
+ # to the HTTP request.
179
+ #
180
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
181
+ #
182
+ def list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
183
+ fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
184
+ fail ArgumentError, 'reservation_id is nil' if reservation_id.nil?
185
+ fail ArgumentError, 'grain is nil' if grain.nil?
186
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
187
+
188
+
189
+ request_headers = {}
190
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
191
+
192
+ # Set Headers
193
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
194
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
195
+ path_template = 'providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries'
196
+
197
+ request_url = @base_url || @client.base_url
198
+
199
+ options = {
200
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
201
+ path_params: {'reservationOrderId' => reservation_order_id,'reservationId' => reservation_id},
202
+ query_params: {'grain' => grain,'$filter' => filter,'api-version' => @client.api_version},
203
+ headers: request_headers.merge(custom_headers || {}),
204
+ base_url: request_url
205
+ }
206
+ promise = @client.make_request_async(:get, path_template, options)
207
+
208
+ promise = promise.then do |result|
209
+ http_response = result.response
210
+ status_code = http_response.status
211
+ response_content = http_response.body
212
+ unless status_code == 200
213
+ error_model = JSON.load(response_content)
214
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
215
+ end
216
+
217
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
218
+ # Deserialize Response
219
+ if status_code == 200
220
+ begin
221
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
222
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationSummariesListResult.mapper()
223
+ result.body = @client.deserialize(result_mapper, parsed_response)
224
+ rescue Exception => e
225
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
226
+ end
227
+ end
228
+
229
+ result
230
+ end
231
+
232
+ promise.execute
233
+ end
234
+
235
+ #
236
+ # Lists the reservations summaries for daily or monthly grain.
237
+ #
238
+ # @param next_page_link [String] The NextLink from the previous successful call
239
+ # to List operation.
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ # @return [ReservationSummariesListResult] operation results.
244
+ #
245
+ def list_by_reservation_order_next(next_page_link, custom_headers:nil)
246
+ response = list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers).value!
247
+ response.body unless response.nil?
248
+ end
249
+
250
+ #
251
+ # Lists the reservations summaries for daily or monthly grain.
252
+ #
253
+ # @param next_page_link [String] The NextLink from the previous successful call
254
+ # to List operation.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
259
+ #
260
+ def list_by_reservation_order_next_with_http_info(next_page_link, custom_headers:nil)
261
+ list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers).value!
262
+ end
263
+
264
+ #
265
+ # Lists the reservations summaries for daily or monthly grain.
266
+ #
267
+ # @param next_page_link [String] The NextLink from the previous successful call
268
+ # to List operation.
269
+ # @param [Hash{String => String}] A hash of custom headers that will be added
270
+ # to the HTTP request.
271
+ #
272
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
273
+ #
274
+ def list_by_reservation_order_next_async(next_page_link, custom_headers:nil)
275
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
276
+
277
+
278
+ request_headers = {}
279
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
280
+
281
+ # Set Headers
282
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
283
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
284
+ path_template = '{nextLink}'
285
+
286
+ request_url = @base_url || @client.base_url
287
+
288
+ options = {
289
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
290
+ skip_encoding_path_params: {'nextLink' => next_page_link},
291
+ headers: request_headers.merge(custom_headers || {}),
292
+ base_url: request_url
293
+ }
294
+ promise = @client.make_request_async(:get, path_template, options)
295
+
296
+ promise = promise.then do |result|
297
+ http_response = result.response
298
+ status_code = http_response.status
299
+ response_content = http_response.body
300
+ unless status_code == 200
301
+ error_model = JSON.load(response_content)
302
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
303
+ end
304
+
305
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
306
+ # Deserialize Response
307
+ if status_code == 200
308
+ begin
309
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
310
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationSummariesListResult.mapper()
311
+ result.body = @client.deserialize(result_mapper, parsed_response)
312
+ rescue Exception => e
313
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
314
+ end
315
+ end
316
+
317
+ result
318
+ end
319
+
320
+ promise.execute
321
+ end
322
+
323
+ #
324
+ # Lists the reservations summaries for daily or monthly grain.
325
+ #
326
+ # @param next_page_link [String] The NextLink from the previous successful call
327
+ # to List operation.
328
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
329
+ # will be added to the HTTP request.
330
+ #
331
+ # @return [ReservationSummariesListResult] operation results.
332
+ #
333
+ def list_by_reservation_order_and_reservation_next(next_page_link, custom_headers:nil)
334
+ response = list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers).value!
335
+ response.body unless response.nil?
336
+ end
337
+
338
+ #
339
+ # Lists the reservations summaries for daily or monthly grain.
340
+ #
341
+ # @param next_page_link [String] The NextLink from the previous successful call
342
+ # to List operation.
343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
+ # will be added to the HTTP request.
345
+ #
346
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
347
+ #
348
+ def list_by_reservation_order_and_reservation_next_with_http_info(next_page_link, custom_headers:nil)
349
+ list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers).value!
350
+ end
351
+
352
+ #
353
+ # Lists the reservations summaries for daily or monthly grain.
354
+ #
355
+ # @param next_page_link [String] The NextLink from the previous successful call
356
+ # to List operation.
357
+ # @param [Hash{String => String}] A hash of custom headers that will be added
358
+ # to the HTTP request.
359
+ #
360
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
361
+ #
362
+ def list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:nil)
363
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
364
+
365
+
366
+ request_headers = {}
367
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
368
+
369
+ # Set Headers
370
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
371
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
372
+ path_template = '{nextLink}'
373
+
374
+ request_url = @base_url || @client.base_url
375
+
376
+ options = {
377
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
378
+ skip_encoding_path_params: {'nextLink' => next_page_link},
379
+ headers: request_headers.merge(custom_headers || {}),
380
+ base_url: request_url
381
+ }
382
+ promise = @client.make_request_async(:get, path_template, options)
383
+
384
+ promise = promise.then do |result|
385
+ http_response = result.response
386
+ status_code = http_response.status
387
+ response_content = http_response.body
388
+ unless status_code == 200
389
+ error_model = JSON.load(response_content)
390
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
391
+ end
392
+
393
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
394
+ # Deserialize Response
395
+ if status_code == 200
396
+ begin
397
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
398
+ result_mapper = Azure::Consumption::Mgmt::V2018_01_31::Models::ReservationSummariesListResult.mapper()
399
+ result.body = @client.deserialize(result_mapper, parsed_response)
400
+ rescue Exception => e
401
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
402
+ end
403
+ end
404
+
405
+ result
406
+ end
407
+
408
+ promise.execute
409
+ end
410
+
411
+ #
412
+ # Lists the reservations summaries for daily or monthly grain.
413
+ #
414
+ # @param reservation_order_id [String] Order Id of the reservation
415
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
416
+ # 'DailyGrain', 'MonthlyGrain'
417
+ # @param filter [String] Required only for daily grain. The
418
+ # properties/UsageDate for start date and end date. The filter supports 'le'
419
+ # and 'ge'
420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
421
+ # will be added to the HTTP request.
422
+ #
423
+ # @return [ReservationSummariesListResult] which provide lazy access to pages
424
+ # of the response.
425
+ #
426
+ def list_by_reservation_order_as_lazy(reservation_order_id, grain, filter:nil, custom_headers:nil)
427
+ response = list_by_reservation_order_async(reservation_order_id, grain, filter:filter, custom_headers:custom_headers).value!
428
+ unless response.nil?
429
+ page = response.body
430
+ page.next_method = Proc.new do |next_page_link|
431
+ list_by_reservation_order_next_async(next_page_link, custom_headers:custom_headers)
432
+ end
433
+ page
434
+ end
435
+ end
436
+
437
+ #
438
+ # Lists the reservations summaries for daily or monthly grain.
439
+ #
440
+ # @param reservation_order_id [String] Order Id of the reservation
441
+ # @param reservation_id [String] Id of the reservation
442
+ # @param grain [Datagrain] Can be daily or monthly. Possible values include:
443
+ # 'DailyGrain', 'MonthlyGrain'
444
+ # @param filter [String] Required only for daily grain. The
445
+ # properties/UsageDate for start date and end date. The filter supports 'le'
446
+ # and 'ge'
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ # @return [ReservationSummariesListResult] which provide lazy access to pages
451
+ # of the response.
452
+ #
453
+ def list_by_reservation_order_and_reservation_as_lazy(reservation_order_id, reservation_id, grain, filter:nil, custom_headers:nil)
454
+ response = list_by_reservation_order_and_reservation_async(reservation_order_id, reservation_id, grain, filter:filter, custom_headers:custom_headers).value!
455
+ unless response.nil?
456
+ page = response.body
457
+ page.next_method = Proc.new do |next_page_link|
458
+ list_by_reservation_order_and_reservation_next_async(next_page_link, custom_headers:custom_headers)
459
+ end
460
+ page
461
+ end
462
+ end
463
+
464
+ end
465
+ end