Class: Azure::MarketplaceOrdering::Mgmt::V2015_06_01::MarketplaceAgreements
- Inherits:
-
Object
- Object
- Azure::MarketplaceOrdering::Mgmt::V2015_06_01::MarketplaceAgreements
- Includes:
- MsRestAzure
- Defined in:
- lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb
Overview
REST API for MarketplaceOrdering Agreements.
Instance Attribute Summary collapse
-
#client ⇒ MarketplaceOrderingAgreements
readonly
Reference to the MarketplaceOrderingAgreements.
Instance Method Summary collapse
-
#cancel(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Cancel marketplace terms.
-
#cancel_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Cancel marketplace terms.
-
#cancel_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancel marketplace terms.
-
#create(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ AgreementTerms
Save marketplace terms.
-
#create_async(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Save marketplace terms.
-
#create_with_http_info(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Save marketplace terms.
-
#get(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Get marketplace terms.
-
#get_agreement(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Get marketplace agreement.
-
#get_agreement_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Get marketplace agreement.
-
#get_agreement_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get marketplace agreement.
-
#get_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Get marketplace terms.
-
#get_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get marketplace terms.
-
#initialize(client) ⇒ MarketplaceAgreements
constructor
Creates and initializes a new instance of the MarketplaceAgreements class.
-
#list(custom_headers: nil) ⇒ Array
List marketplace agreements in the subscription.
-
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
List marketplace agreements in the subscription.
-
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List marketplace agreements in the subscription.
-
#sign(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Sign marketplace terms.
-
#sign_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Sign marketplace terms.
-
#sign_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sign marketplace terms.
Constructor Details
#initialize(client) ⇒ MarketplaceAgreements
Creates and initializes a new instance of the MarketplaceAgreements class.
17 18 19 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ MarketplaceOrderingAgreements (readonly)
Returns reference to the MarketplaceOrderingAgreements.
22 23 24 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 22 def client @client end |
Instance Method Details
#cancel(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Cancel marketplace terms.
deployed. will be added to the HTTP request.
349 350 351 352 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 349 def cancel(publisher_id, offer_id, plan_id, custom_headers:nil) response = cancel_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#cancel_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Cancel marketplace terms.
deployed. to the HTTP request.
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 382 def cancel_async(publisher_id, offer_id, plan_id, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? fail ArgumentError, 'offer_id is nil' if offer_id.nil? fail ArgumentError, 'plan_id is nil' if plan_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#cancel_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Cancel marketplace terms.
deployed. will be added to the HTTP request.
366 367 368 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 366 def cancel_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil) cancel_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! end |
#create(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ AgreementTerms
Save marketplace terms.
deployed. Marketplace Terms operation. will be added to the HTTP request.
138 139 140 141 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 138 def create(publisher_id, offer_id, plan_id, parameters, custom_headers:nil) response = create_async(publisher_id, offer_id, plan_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Save marketplace terms.
deployed. Marketplace Terms operation. to the HTTP request.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 175 def create_async(publisher_id, offer_id, plan_id, parameters, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? offer_type = 'virtualmachine' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? fail ArgumentError, 'offer_id is nil' if offer_id.nil? fail ArgumentError, 'plan_id is nil' if plan_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'offerType' => offer_type,'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_with_http_info(publisher_id, offer_id, plan_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Save marketplace terms.
deployed. Marketplace Terms operation. will be added to the HTTP request.
157 158 159 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 157 def create_with_http_info(publisher_id, offer_id, plan_id, parameters, custom_headers:nil) create_async(publisher_id, offer_id, plan_id, parameters, custom_headers:custom_headers).value! end |
#get(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Get marketplace terms.
deployed. will be added to the HTTP request.
36 37 38 39 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 36 def get(publisher_id, offer_id, plan_id, custom_headers:nil) response = get_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_agreement(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Get marketplace agreement.
deployed. will be added to the HTTP request.
448 449 450 451 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 448 def get_agreement(publisher_id, offer_id, plan_id, custom_headers:nil) response = get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_agreement_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Get marketplace agreement.
deployed. to the HTTP request.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 481 def get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? fail ArgumentError, 'offer_id is nil' if offer_id.nil? fail ArgumentError, 'plan_id is nil' if plan_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_agreement_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get marketplace agreement.
deployed. will be added to the HTTP request.
465 466 467 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 465 def get_agreement_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil) get_agreement_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! end |
#get_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Get marketplace terms.
deployed. to the HTTP request.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 69 def get_async(publisher_id, offer_id, plan_id, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? offer_type = 'virtualmachine' fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? fail ArgumentError, 'offer_id is nil' if offer_id.nil? fail ArgumentError, 'plan_id is nil' if plan_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'offerType' => offer_type,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get marketplace terms.
deployed. will be added to the HTTP request.
53 54 55 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 53 def get_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil) get_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! end |
#list(custom_headers: nil) ⇒ Array
List marketplace agreements in the subscription.
will be added to the HTTP request.
543 544 545 546 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 543 def list(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
List marketplace agreements in the subscription.
to the HTTP request.
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 568 def list_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'AgreementTermsElementType', type: { name: 'Composite', class_name: 'AgreementTerms' } } } } result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List marketplace agreements in the subscription.
will be added to the HTTP request.
556 557 558 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 556 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end |
#sign(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ AgreementTerms
Sign marketplace terms.
deployed. will be added to the HTTP request.
250 251 252 253 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 250 def sign(publisher_id, offer_id, plan_id, custom_headers:nil) response = sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#sign_async(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ Concurrent::Promise
Sign marketplace terms.
deployed. to the HTTP request.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 283 def sign_async(publisher_id, offer_id, plan_id, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'publisher_id is nil' if publisher_id.nil? fail ArgumentError, 'offer_id is nil' if offer_id.nil? fail ArgumentError, 'plan_id is nil' if plan_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'publisherId' => publisher_id,'offerId' => offer_id,'planId' => plan_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MarketplaceOrdering::Mgmt::V2015_06_01::Models::AgreementTerms.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#sign_with_http_info(publisher_id, offer_id, plan_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sign marketplace terms.
deployed. will be added to the HTTP request.
267 268 269 |
# File 'lib/2015-06-01/generated/azure_mgmt_marketplace_ordering/marketplace_agreements.rb', line 267 def sign_with_http_info(publisher_id, offer_id, plan_id, custom_headers:nil) sign_async(publisher_id, offer_id, plan_id, custom_headers:custom_headers).value! end |