azure_mgmt_billing 0.15.2 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-02-27-preview/generated/azure_mgmt_billing.rb +38 -0
  3. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/billing_client.rb +136 -0
  4. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/invoices.rb +472 -0
  5. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/download_url.rb +61 -0
  6. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/error_details.rb +71 -0
  7. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/error_response.rb +48 -0
  8. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/invoice.rb +99 -0
  9. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +101 -0
  10. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation.rb +59 -0
  11. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation_display.rb +72 -0
  12. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +103 -0
  13. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/resource.rb +80 -0
  14. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/module_definition.rb +9 -0
  15. data/lib/2017-02-27-preview/generated/azure_mgmt_billing/operations.rb +217 -0
  16. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_management_client.rb +10 -6
  17. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_periods.rb +21 -18
  18. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/invoices.rb +27 -23
  19. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb +1 -1
  20. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +1 -1
  21. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +1 -1
  22. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/resource.rb +9 -0
  23. data/lib/2017-04-24-preview/generated/azure_mgmt_billing/operations.rb +15 -13
  24. data/lib/2018-03-01-preview/generated/azure_mgmt_billing.rb +44 -0
  25. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/billing_management_client.rb +144 -0
  26. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/billing_periods.rb +371 -0
  27. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/enrollment_accounts.rb +303 -0
  28. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/invoices.rb +503 -0
  29. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/billing_period.rb +107 -0
  30. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb +101 -0
  31. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/download_url.rb +61 -0
  32. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account.rb +74 -0
  33. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account_list_result.rb +100 -0
  34. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/error_details.rb +71 -0
  35. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/error_response.rb +48 -0
  36. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/invoice.rb +120 -0
  37. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +101 -0
  38. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation.rb +59 -0
  39. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation_display.rb +72 -0
  40. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +103 -0
  41. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/resource.rb +80 -0
  42. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/module_definition.rb +9 -0
  43. data/lib/2018-03-01-preview/generated/azure_mgmt_billing/operations.rb +216 -0
  44. data/lib/azure_mgmt_billing.rb +2 -0
  45. data/lib/profiles/latest/billing_latest_profile_client.rb +28 -9
  46. data/lib/profiles/latest/billing_module_definition.rb +0 -1
  47. data/lib/profiles/latest/modules/billing_profile_module.rb +87 -58
  48. data/lib/version.rb +1 -1
  49. metadata +39 -5
@@ -41,8 +41,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
41
41
  #
42
42
  # @return [Array<BillingPeriod>] operation results.
43
43
  #
44
- def list(filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
45
- first_page = list_as_lazy(filter, skiptoken, top, custom_headers)
44
+ def list(filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
45
+ first_page = list_as_lazy(filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers)
46
46
  first_page.get_all_items
47
47
  end
48
48
 
@@ -64,8 +64,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
64
64
  #
65
65
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
66
  #
67
- def list_with_http_info(filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
68
- list_async(filter, skiptoken, top, custom_headers).value!
67
+ def list_with_http_info(filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
68
+ list_async(filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
69
69
  end
70
70
 
71
71
  #
@@ -86,7 +86,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
86
86
  #
87
87
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
88
88
  #
89
- def list_async(filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
89
+ def list_async(filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
90
90
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
91
91
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
92
92
  fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '100'" if !top.nil? && top > 100
@@ -94,6 +94,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
94
94
 
95
95
 
96
96
  request_headers = {}
97
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
97
98
 
98
99
  # Set Headers
99
100
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -147,8 +148,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
147
148
  #
148
149
  # @return [BillingPeriod] operation results.
149
150
  #
150
- def get(billing_period_name, custom_headers = nil)
151
- response = get_async(billing_period_name, custom_headers).value!
151
+ def get(billing_period_name, custom_headers:nil)
152
+ response = get_async(billing_period_name, custom_headers:custom_headers).value!
152
153
  response.body unless response.nil?
153
154
  end
154
155
 
@@ -161,8 +162,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
161
162
  #
162
163
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
163
164
  #
164
- def get_with_http_info(billing_period_name, custom_headers = nil)
165
- get_async(billing_period_name, custom_headers).value!
165
+ def get_with_http_info(billing_period_name, custom_headers:nil)
166
+ get_async(billing_period_name, custom_headers:custom_headers).value!
166
167
  end
167
168
 
168
169
  #
@@ -174,13 +175,14 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
174
175
  #
175
176
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
176
177
  #
177
- def get_async(billing_period_name, custom_headers = nil)
178
+ def get_async(billing_period_name, custom_headers:nil)
178
179
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
180
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
180
181
  fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
181
182
 
182
183
 
183
184
  request_headers = {}
185
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
184
186
 
185
187
  # Set Headers
186
188
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -236,8 +238,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
236
238
  #
237
239
  # @return [BillingPeriodsListResult] operation results.
238
240
  #
239
- def list_next(next_page_link, custom_headers = nil)
240
- response = list_next_async(next_page_link, custom_headers).value!
241
+ def list_next(next_page_link, custom_headers:nil)
242
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
241
243
  response.body unless response.nil?
242
244
  end
243
245
 
@@ -252,8 +254,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
252
254
  #
253
255
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
254
256
  #
255
- def list_next_with_http_info(next_page_link, custom_headers = nil)
256
- list_next_async(next_page_link, custom_headers).value!
257
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
258
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
257
259
  end
258
260
 
259
261
  #
@@ -267,11 +269,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
267
269
  #
268
270
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
269
271
  #
270
- def list_next_async(next_page_link, custom_headers = nil)
272
+ def list_next_async(next_page_link, custom_headers:nil)
271
273
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
272
274
 
273
275
 
274
276
  request_headers = {}
277
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
275
278
 
276
279
  # Set Headers
277
280
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -334,12 +337,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
334
337
  # @return [BillingPeriodsListResult] which provide lazy access to pages of the
335
338
  # response.
336
339
  #
337
- def list_as_lazy(filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
338
- response = list_async(filter, skiptoken, top, custom_headers).value!
340
+ def list_as_lazy(filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
341
+ response = list_async(filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
339
342
  unless response.nil?
340
343
  page = response.body
341
344
  page.next_method = Proc.new do |next_page_link|
342
- list_next_async(next_page_link, custom_headers)
345
+ list_next_async(next_page_link, custom_headers:custom_headers)
343
346
  end
344
347
  page
345
348
  end
@@ -47,8 +47,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
47
47
  #
48
48
  # @return [Array<Invoice>] operation results.
49
49
  #
50
- def list(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
51
- first_page = list_as_lazy(expand, filter, skiptoken, top, custom_headers)
50
+ def list(expand:nil, filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
51
+ first_page = list_as_lazy(expand:expand, filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers)
52
52
  first_page.get_all_items
53
53
  end
54
54
 
@@ -76,8 +76,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
76
76
  #
77
77
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
78
78
  #
79
- def list_with_http_info(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
80
- list_async(expand, filter, skiptoken, top, custom_headers).value!
79
+ def list_with_http_info(expand:nil, filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
80
+ list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
81
81
  end
82
82
 
83
83
  #
@@ -104,7 +104,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
104
104
  #
105
105
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
106
106
  #
107
- def list_async(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
107
+ def list_async(expand:nil, filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
108
108
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
109
109
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
110
110
  fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '100'" if !top.nil? && top > 100
@@ -112,6 +112,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
112
112
 
113
113
 
114
114
  request_headers = {}
115
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
115
116
 
116
117
  # Set Headers
117
118
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -166,8 +167,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
166
167
  #
167
168
  # @return [Invoice] operation results.
168
169
  #
169
- def get(invoice_name, custom_headers = nil)
170
- response = get_async(invoice_name, custom_headers).value!
170
+ def get(invoice_name, custom_headers:nil)
171
+ response = get_async(invoice_name, custom_headers:custom_headers).value!
171
172
  response.body unless response.nil?
172
173
  end
173
174
 
@@ -181,8 +182,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
181
182
  #
182
183
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
183
184
  #
184
- def get_with_http_info(invoice_name, custom_headers = nil)
185
- get_async(invoice_name, custom_headers).value!
185
+ def get_with_http_info(invoice_name, custom_headers:nil)
186
+ get_async(invoice_name, custom_headers:custom_headers).value!
186
187
  end
187
188
 
188
189
  #
@@ -195,13 +196,14 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
195
196
  #
196
197
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
197
198
  #
198
- def get_async(invoice_name, custom_headers = nil)
199
+ def get_async(invoice_name, custom_headers:nil)
199
200
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
200
201
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
201
202
  fail ArgumentError, 'invoice_name is nil' if invoice_name.nil?
202
203
 
203
204
 
204
205
  request_headers = {}
206
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
205
207
 
206
208
  # Set Headers
207
209
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -255,8 +257,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
255
257
  #
256
258
  # @return [Invoice] operation results.
257
259
  #
258
- def get_latest(custom_headers = nil)
259
- response = get_latest_async(custom_headers).value!
260
+ def get_latest(custom_headers:nil)
261
+ response = get_latest_async(custom_headers:custom_headers).value!
260
262
  response.body unless response.nil?
261
263
  end
262
264
 
@@ -269,8 +271,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
269
271
  #
270
272
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
271
273
  #
272
- def get_latest_with_http_info(custom_headers = nil)
273
- get_latest_async(custom_headers).value!
274
+ def get_latest_with_http_info(custom_headers:nil)
275
+ get_latest_async(custom_headers:custom_headers).value!
274
276
  end
275
277
 
276
278
  #
@@ -282,12 +284,13 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
282
284
  #
283
285
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
284
286
  #
285
- def get_latest_async(custom_headers = nil)
287
+ def get_latest_async(custom_headers:nil)
286
288
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
287
289
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
288
290
 
289
291
 
290
292
  request_headers = {}
293
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
291
294
 
292
295
  # Set Headers
293
296
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -345,8 +348,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
345
348
  #
346
349
  # @return [InvoicesListResult] operation results.
347
350
  #
348
- def list_next(next_page_link, custom_headers = nil)
349
- response = list_next_async(next_page_link, custom_headers).value!
351
+ def list_next(next_page_link, custom_headers:nil)
352
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
350
353
  response.body unless response.nil?
351
354
  end
352
355
 
@@ -363,8 +366,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
363
366
  #
364
367
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
365
368
  #
366
- def list_next_with_http_info(next_page_link, custom_headers = nil)
367
- list_next_async(next_page_link, custom_headers).value!
369
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
370
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
368
371
  end
369
372
 
370
373
  #
@@ -380,11 +383,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
380
383
  #
381
384
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
382
385
  #
383
- def list_next_async(next_page_link, custom_headers = nil)
386
+ def list_next_async(next_page_link, custom_headers:nil)
384
387
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
385
388
 
386
389
 
387
390
  request_headers = {}
391
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
388
392
 
389
393
  # Set Headers
390
394
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -453,12 +457,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
453
457
  # @return [InvoicesListResult] which provide lazy access to pages of the
454
458
  # response.
455
459
  #
456
- def list_as_lazy(expand = nil, filter = nil, skiptoken = nil, top = nil, custom_headers = nil)
457
- response = list_async(expand, filter, skiptoken, top, custom_headers).value!
460
+ def list_as_lazy(expand:nil, filter:nil, skiptoken:nil, top:nil, custom_headers:nil)
461
+ response = list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value!
458
462
  unless response.nil?
459
463
  page = response.body
460
464
  page.next_method = Proc.new do |next_page_link|
461
- list_next_async(next_page_link, custom_headers)
465
+ list_next_async(next_page_link, custom_headers:custom_headers)
462
466
  end
463
467
  page
464
468
  end
@@ -31,7 +31,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -31,7 +31,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -33,7 +33,7 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -22,6 +22,15 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
22
22
  attr_accessor :type
23
23
 
24
24
 
25
+ # @return [String] the name of the resource group of the resource.
26
+ def resource_group
27
+ unless self.id.nil?
28
+ groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
29
+ groups.captures[0].strip if groups
30
+ end
31
+ end
32
+
33
+
25
34
  #
26
35
  # Mapper for Resource class as Ruby Hash.
27
36
  # This will be used for serialization/deserialization.
@@ -31,8 +31,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
31
31
  #
32
32
  # @return [Array<Operation>] operation results.
33
33
  #
34
- def list(custom_headers = nil)
35
- first_page = list_as_lazy(custom_headers)
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
36
  first_page.get_all_items
37
37
  end
38
38
 
@@ -44,8 +44,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
44
44
  #
45
45
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
46
  #
47
- def list_with_http_info(custom_headers = nil)
48
- list_async(custom_headers).value!
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
49
  end
50
50
 
51
51
  #
@@ -56,11 +56,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
56
56
  #
57
57
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
58
58
  #
59
- def list_async(custom_headers = nil)
59
+ def list_async(custom_headers:nil)
60
60
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
61
61
 
62
62
 
63
63
  request_headers = {}
64
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
65
 
65
66
  # Set Headers
66
67
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -114,8 +115,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
114
115
  #
115
116
  # @return [OperationListResult] operation results.
116
117
  #
117
- def list_next(next_page_link, custom_headers = nil)
118
- response = list_next_async(next_page_link, custom_headers).value!
118
+ def list_next(next_page_link, custom_headers:nil)
119
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
119
120
  response.body unless response.nil?
120
121
  end
121
122
 
@@ -129,8 +130,8 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
129
130
  #
130
131
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
131
132
  #
132
- def list_next_with_http_info(next_page_link, custom_headers = nil)
133
- list_next_async(next_page_link, custom_headers).value!
133
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
134
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
134
135
  end
135
136
 
136
137
  #
@@ -143,11 +144,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
143
144
  #
144
145
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
145
146
  #
146
- def list_next_async(next_page_link, custom_headers = nil)
147
+ def list_next_async(next_page_link, custom_headers:nil)
147
148
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
148
149
 
149
150
 
150
151
  request_headers = {}
152
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
151
153
 
152
154
  # Set Headers
153
155
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -200,12 +202,12 @@ module Azure::Billing::Mgmt::V2017_04_24_preview
200
202
  # @return [OperationListResult] which provide lazy access to pages of the
201
203
  # response.
202
204
  #
203
- def list_as_lazy(custom_headers = nil)
204
- response = list_async(custom_headers).value!
205
+ def list_as_lazy(custom_headers:nil)
206
+ response = list_async(custom_headers:custom_headers).value!
205
207
  unless response.nil?
206
208
  page = response.body
207
209
  page.next_method = Proc.new do |next_page_link|
208
- list_next_async(next_page_link, custom_headers)
210
+ list_next_async(next_page_link, custom_headers:custom_headers)
209
211
  end
210
212
  page
211
213
  end
@@ -0,0 +1,44 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-03-01-preview/generated/azure_mgmt_billing/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Billing::Mgmt::V2018_03_01_preview
23
+ autoload :EnrollmentAccounts, '2018-03-01-preview/generated/azure_mgmt_billing/enrollment_accounts.rb'
24
+ autoload :BillingPeriods, '2018-03-01-preview/generated/azure_mgmt_billing/billing_periods.rb'
25
+ autoload :Invoices, '2018-03-01-preview/generated/azure_mgmt_billing/invoices.rb'
26
+ autoload :Operations, '2018-03-01-preview/generated/azure_mgmt_billing/operations.rb'
27
+ autoload :BillingManagementClient, '2018-03-01-preview/generated/azure_mgmt_billing/billing_management_client.rb'
28
+
29
+ module Models
30
+ autoload :ErrorResponse, '2018-03-01-preview/generated/azure_mgmt_billing/models/error_response.rb'
31
+ autoload :ErrorDetails, '2018-03-01-preview/generated/azure_mgmt_billing/models/error_details.rb'
32
+ autoload :OperationListResult, '2018-03-01-preview/generated/azure_mgmt_billing/models/operation_list_result.rb'
33
+ autoload :Resource, '2018-03-01-preview/generated/azure_mgmt_billing/models/resource.rb'
34
+ autoload :DownloadUrl, '2018-03-01-preview/generated/azure_mgmt_billing/models/download_url.rb'
35
+ autoload :InvoicesListResult, '2018-03-01-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb'
36
+ autoload :BillingPeriodsListResult, '2018-03-01-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb'
37
+ autoload :OperationDisplay, '2018-03-01-preview/generated/azure_mgmt_billing/models/operation_display.rb'
38
+ autoload :EnrollmentAccountListResult, '2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account_list_result.rb'
39
+ autoload :Operation, '2018-03-01-preview/generated/azure_mgmt_billing/models/operation.rb'
40
+ autoload :EnrollmentAccount, '2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account.rb'
41
+ autoload :BillingPeriod, '2018-03-01-preview/generated/azure_mgmt_billing/models/billing_period.rb'
42
+ autoload :Invoice, '2018-03-01-preview/generated/azure_mgmt_billing/models/invoice.rb'
43
+ end
44
+ end