azure_mgmt_marketplace_ordering 0.17.2 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6ffe2d98aa048185d9e770f6f053c52a0c5d0cfe9f452b4f67976004bae2e26
4
- data.tar.gz: cf893966d34bd656c611ddc310d551240d2382721aef939114b91a0d38e542f7
3
+ metadata.gz: cc878fe927e36523c7f831ecfee9f82ddbf5c3dff4af338b7ea9711c29df734a
4
+ data.tar.gz: d647070d90e128ec6b4307412b0fb8d0f658efde31b6143fbcbe0209b2d13c31
5
5
  SHA512:
6
- metadata.gz: ffdc3520f9678b41f565b5c4c440693b6a19d5b4928678f40fd4ab21bcd743b1227b4c4d33cce5571dd2b2d7cbaf6bad17bb063fb237164788d7ea2f5167f778
7
- data.tar.gz: 26f24efb06dc7dfaffa4f0ae2c11921597efb7e79beaab8df9fc26ed616632420ae27fd17c0ba0c4db523eab9761870c4897c91c0ca80e0373a7f6130edae833
6
+ metadata.gz: 98fa838b5326767a912465aca46f9883a9d31a8586409cbb45fa8d81fcf1d1fc93c10b75e3ca6a97e708bff3642c97ac0c47067f55759169080dad0ff06207b5
7
+ data.tar.gz: f92307ca4fa09ee3de77095a4d266b97df033dc578f7d8bd311446320c67c5c0d0a2f977abdac2a9bd0b6f6a678905eee786ebc6ea83c35f41e3cd33bfb1f05c
@@ -235,5 +235,402 @@ module Azure::MarketplaceOrdering::Mgmt::V2015_06_01
235
235
  promise.execute
236
236
  end
237
237
 
238
+ #
239
+ # Sign marketplace terms.
240
+ #
241
+ # @param publisher_id [String] Publisher identifier string of image being
242
+ # deployed.
243
+ # @param offer_id [String] Offer identifier string of image being deployed.
244
+ # @param plan_id [String] Plan identifier string of image being deployed.
245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
+ # will be added to the HTTP request.
247
+ #
248
+ # @return [AgreementTerms] operation results.
249
+ #
250
+ def sign(publisher_id, offer_id, plan_id, custom_headers:nil)
251
+ response = sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
252
+ response.body unless response.nil?
253
+ end
254
+
255
+ #
256
+ # Sign marketplace terms.
257
+ #
258
+ # @param publisher_id [String] Publisher identifier string of image being
259
+ # deployed.
260
+ # @param offer_id [String] Offer identifier string of image being deployed.
261
+ # @param plan_id [String] Plan identifier string of image being deployed.
262
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
263
+ # will be added to the HTTP request.
264
+ #
265
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
266
+ #
267
+ def sign_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil)
268
+ sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
269
+ end
270
+
271
+ #
272
+ # Sign marketplace terms.
273
+ #
274
+ # @param publisher_id [String] Publisher identifier string of image being
275
+ # deployed.
276
+ # @param offer_id [String] Offer identifier string of image being deployed.
277
+ # @param plan_id [String] Plan identifier string of image being deployed.
278
+ # @param [Hash{String => String}] A hash of custom headers that will be added
279
+ # to the HTTP request.
280
+ #
281
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
282
+ #
283
+ def sign_async(publisher_id, offer_id, plan_id, custom_headers:nil)
284
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
285
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
286
+ fail ArgumentError, 'publisher_id is nil' if publisher_id.nil?
287
+ fail ArgumentError, 'offer_id is nil' if offer_id.nil?
288
+ fail ArgumentError, 'plan_id is nil' if plan_id.nil?
289
+
290
+
291
+ request_headers = {}
292
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
293
+
294
+ # Set Headers
295
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
296
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
297
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign'
298
+
299
+ request_url = @base_url || @client.base_url
300
+
301
+ options = {
302
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
303
+ path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id},
304
+ query_params: {'api-version' => @client.api_version},
305
+ headers: request_headers.merge(custom_headers || {}),
306
+ base_url: request_url
307
+ }
308
+ promise = @client.make_request_async(:put, path_template, options)
309
+
310
+ promise = promise.then do |result|
311
+ http_response = result.response
312
+ status_code = http_response.status
313
+ response_content = http_response.body
314
+ unless status_code == 200
315
+ error_model = JSON.load(response_content)
316
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
317
+ end
318
+
319
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
320
+ # Deserialize Response
321
+ if status_code == 200
322
+ begin
323
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
324
+ result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper()
325
+ result.body = @client.deserialize(result_mapper, parsed_response)
326
+ rescue Exception => e
327
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
328
+ end
329
+ end
330
+
331
+ result
332
+ end
333
+
334
+ promise.execute
335
+ end
336
+
337
+ #
338
+ # Cancel marketplace terms.
339
+ #
340
+ # @param publisher_id [String] Publisher identifier string of image being
341
+ # deployed.
342
+ # @param offer_id [String] Offer identifier string of image being deployed.
343
+ # @param plan_id [String] Plan identifier string of image being deployed.
344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
+ # will be added to the HTTP request.
346
+ #
347
+ # @return [AgreementTerms] operation results.
348
+ #
349
+ def cancel(publisher_id, offer_id, plan_id, custom_headers:nil)
350
+ response = cancel_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
351
+ response.body unless response.nil?
352
+ end
353
+
354
+ #
355
+ # Cancel marketplace terms.
356
+ #
357
+ # @param publisher_id [String] Publisher identifier string of image being
358
+ # deployed.
359
+ # @param offer_id [String] Offer identifier string of image being deployed.
360
+ # @param plan_id [String] Plan identifier string of image being deployed.
361
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
362
+ # will be added to the HTTP request.
363
+ #
364
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
365
+ #
366
+ def cancel_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil)
367
+ cancel_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
368
+ end
369
+
370
+ #
371
+ # Cancel marketplace terms.
372
+ #
373
+ # @param publisher_id [String] Publisher identifier string of image being
374
+ # deployed.
375
+ # @param offer_id [String] Offer identifier string of image being deployed.
376
+ # @param plan_id [String] Plan identifier string of image being deployed.
377
+ # @param [Hash{String => String}] A hash of custom headers that will be added
378
+ # to the HTTP request.
379
+ #
380
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
381
+ #
382
+ def cancel_async(publisher_id, offer_id, plan_id, custom_headers:nil)
383
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
384
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
385
+ fail ArgumentError, 'publisher_id is nil' if publisher_id.nil?
386
+ fail ArgumentError, 'offer_id is nil' if offer_id.nil?
387
+ fail ArgumentError, 'plan_id is nil' if plan_id.nil?
388
+
389
+
390
+ request_headers = {}
391
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
392
+
393
+ # Set Headers
394
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
395
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
396
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel'
397
+
398
+ request_url = @base_url || @client.base_url
399
+
400
+ options = {
401
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
402
+ path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id},
403
+ query_params: {'api-version' => @client.api_version},
404
+ headers: request_headers.merge(custom_headers || {}),
405
+ base_url: request_url
406
+ }
407
+ promise = @client.make_request_async(:put, path_template, options)
408
+
409
+ promise = promise.then do |result|
410
+ http_response = result.response
411
+ status_code = http_response.status
412
+ response_content = http_response.body
413
+ unless status_code == 200
414
+ error_model = JSON.load(response_content)
415
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
416
+ end
417
+
418
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
419
+ # Deserialize Response
420
+ if status_code == 200
421
+ begin
422
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
423
+ result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper()
424
+ result.body = @client.deserialize(result_mapper, parsed_response)
425
+ rescue Exception => e
426
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
427
+ end
428
+ end
429
+
430
+ result
431
+ end
432
+
433
+ promise.execute
434
+ end
435
+
436
+ #
437
+ # Get marketplace agreement.
438
+ #
439
+ # @param publisher_id [String] Publisher identifier string of image being
440
+ # deployed.
441
+ # @param offer_id [String] Offer identifier string of image being deployed.
442
+ # @param plan_id [String] Plan identifier string of image being deployed.
443
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
444
+ # will be added to the HTTP request.
445
+ #
446
+ # @return [AgreementTerms] operation results.
447
+ #
448
+ def get_agreement(publisher_id, offer_id, plan_id, custom_headers:nil)
449
+ response = get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
450
+ response.body unless response.nil?
451
+ end
452
+
453
+ #
454
+ # Get marketplace agreement.
455
+ #
456
+ # @param publisher_id [String] Publisher identifier string of image being
457
+ # deployed.
458
+ # @param offer_id [String] Offer identifier string of image being deployed.
459
+ # @param plan_id [String] Plan identifier string of image being deployed.
460
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
461
+ # will be added to the HTTP request.
462
+ #
463
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
464
+ #
465
+ def get_agreement_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil)
466
+ get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value!
467
+ end
468
+
469
+ #
470
+ # Get marketplace agreement.
471
+ #
472
+ # @param publisher_id [String] Publisher identifier string of image being
473
+ # deployed.
474
+ # @param offer_id [String] Offer identifier string of image being deployed.
475
+ # @param plan_id [String] Plan identifier string of image being deployed.
476
+ # @param [Hash{String => String}] A hash of custom headers that will be added
477
+ # to the HTTP request.
478
+ #
479
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
480
+ #
481
+ def get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:nil)
482
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
483
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
484
+ fail ArgumentError, 'publisher_id is nil' if publisher_id.nil?
485
+ fail ArgumentError, 'offer_id is nil' if offer_id.nil?
486
+ fail ArgumentError, 'plan_id is nil' if plan_id.nil?
487
+
488
+
489
+ request_headers = {}
490
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
491
+
492
+ # Set Headers
493
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
494
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
495
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}'
496
+
497
+ request_url = @base_url || @client.base_url
498
+
499
+ options = {
500
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
501
+ path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id},
502
+ query_params: {'api-version' => @client.api_version},
503
+ headers: request_headers.merge(custom_headers || {}),
504
+ base_url: request_url
505
+ }
506
+ promise = @client.make_request_async(:get, path_template, options)
507
+
508
+ promise = promise.then do |result|
509
+ http_response = result.response
510
+ status_code = http_response.status
511
+ response_content = http_response.body
512
+ unless status_code == 200
513
+ error_model = JSON.load(response_content)
514
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
515
+ end
516
+
517
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
518
+ # Deserialize Response
519
+ if status_code == 200
520
+ begin
521
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
522
+ result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper()
523
+ result.body = @client.deserialize(result_mapper, parsed_response)
524
+ rescue Exception => e
525
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
526
+ end
527
+ end
528
+
529
+ result
530
+ end
531
+
532
+ promise.execute
533
+ end
534
+
535
+ #
536
+ # List marketplace agreements in the subscription.
537
+ #
538
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
539
+ # will be added to the HTTP request.
540
+ #
541
+ # @return [Array] operation results.
542
+ #
543
+ def list(custom_headers:nil)
544
+ response = list_async(custom_headers:custom_headers).value!
545
+ response.body unless response.nil?
546
+ end
547
+
548
+ #
549
+ # List marketplace agreements in the subscription.
550
+ #
551
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
552
+ # will be added to the HTTP request.
553
+ #
554
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
555
+ #
556
+ def list_with_http_info(custom_headers:nil)
557
+ list_async(custom_headers:custom_headers).value!
558
+ end
559
+
560
+ #
561
+ # List marketplace agreements in the subscription.
562
+ #
563
+ # @param [Hash{String => String}] A hash of custom headers that will be added
564
+ # to the HTTP request.
565
+ #
566
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
567
+ #
568
+ def list_async(custom_headers:nil)
569
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
570
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
571
+
572
+
573
+ request_headers = {}
574
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
575
+
576
+ # Set Headers
577
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
578
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
579
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements'
580
+
581
+ request_url = @base_url || @client.base_url
582
+
583
+ options = {
584
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
585
+ path_params: {'subscriptionId' => @client.subscription_id},
586
+ query_params: {'api-version' => @client.api_version},
587
+ headers: request_headers.merge(custom_headers || {}),
588
+ base_url: request_url
589
+ }
590
+ promise = @client.make_request_async(:get, path_template, options)
591
+
592
+ promise = promise.then do |result|
593
+ http_response = result.response
594
+ status_code = http_response.status
595
+ response_content = http_response.body
596
+ unless status_code == 200
597
+ error_model = JSON.load(response_content)
598
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
599
+ end
600
+
601
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
602
+ # Deserialize Response
603
+ if status_code == 200
604
+ begin
605
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
606
+ result_mapper = {
607
+ client_side_validation: true,
608
+ required: false,
609
+ serialized_name: 'parsed_response',
610
+ type: {
611
+ name: 'Sequence',
612
+ element: {
613
+ client_side_validation: true,
614
+ required: false,
615
+ serialized_name: 'AgreementTermsElementType',
616
+ type: {
617
+ name: 'Composite',
618
+ class_name: 'AgreementTerms'
619
+ }
620
+ }
621
+ }
622
+ }
623
+ result.body = @client.deserialize(result_mapper, parsed_response)
624
+ rescue Exception => e
625
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
626
+ end
627
+ end
628
+
629
+ result
630
+ end
631
+
632
+ promise.execute
633
+ end
634
+
238
635
  end
239
636
  end
@@ -129,7 +129,7 @@ module Azure::MarketplaceOrdering::Mgmt::V2015_06_01
129
129
  #
130
130
  def add_telemetry
131
131
  sdk_information = 'azure_mgmt_marketplace_ordering'
132
- sdk_information = "#{sdk_information}/0.17.2"
132
+ sdk_information = "#{sdk_information}/0.17.3"
133
133
  add_user_agent_information(sdk_information)
134
134
  end
135
135
  end
@@ -6,8 +6,8 @@
6
6
  module Azure::MarketplaceOrdering::Mgmt::V2015_06_01
7
7
  module Models
8
8
  #
9
- # Error reponse indicates Microsoft.MarketplaceOrdering service is not able
10
- # to process the incoming request. The reason is provided in the error
9
+ # Error response indicates Microsoft.MarketplaceOrdering service is not
10
+ # able to process the incoming request. The reason is provided in the error
11
11
  # message.
12
12
  #
13
13
  class ErrorResponse
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::MarketplaceOrdering::Mgmt
6
- VERSION = '0.17.2'
6
+ VERSION = '0.17.3'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_marketplace_ordering
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.2
4
+ version: 0.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation