Language

BillingBenefits.ValidatePurchase Method

Definition

Overloads

ValidatePurchase(ISavingsPlanPurchaseValidateRequest, Func<HttpResponseMessage, Task<ISavingsPlanValidateResponse>,Task>, Func<HttpResponseMessage, Task<IErrorResponse>,Task>, IEventListener, ISendAsync)

Validate savings plan purchase.

public System.Threading.Tasks.Task ValidatePurchase(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest body, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse>,System.Threading.Tasks.Task> onOk, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IErrorResponse>,System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender);
member this.ValidatePurchase : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse>, System.Threading.Tasks.Task> * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IErrorResponse>, System.Threading.Tasks.Task> * Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener * Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync -> System.Threading.Tasks.Task
Public Function ValidatePurchase (body As ISavingsPlanPurchaseValidateRequest, onOk As Func(Of HttpResponseMessage, Task(Of ISavingsPlanValidateResponse), Task), onDefault As Func(Of HttpResponseMessage, Task(Of IErrorResponse), Task), eventListener As IEventListener, sender As ISendAsync) As Task

Parameters

body
ISavingsPlanPurchaseValidateRequest

Request body for validating the purchase of a savings plan

onOk
Func<HttpResponseMessage,Task<ISavingsPlanValidateResponse>,Task>

a delegate that is called when the remote service returns 200 (OK).

onDefault
Func<HttpResponseMessage,Task<IErrorResponse>,Task>

a delegate that is called when the remote service returns default (any response code not handled elsewhere).

eventListener
IEventListener

an IEventListener instance that will receive events.

sender
ISendAsync

an instance of an Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync pipeline to use to make the request.

Returns

A Task that will be complete when handling of the response is completed.

Applies to

ValidatePurchase(ISavingsPlanPurchaseValidateRequest, Func<HttpResponseMessage, Task<ISavingsPlanValidateResponse>,Task>, Func<HttpResponseMessage, Task<IErrorResponse>,Task>, IEventListener, ISendAsync, SerializationMode)

public System.Threading.Tasks.Task ValidatePurchase(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanPurchaseValidateRequest body, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanValidateResponse>,System.Threading.Tasks.Task> onOk, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IErrorResponse>,System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode.IncludeCreateOrUpdate);
member this.ValidatePurchase : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanPurchaseValidateRequest * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanValidateResponse>, System.Threading.Tasks.Task> * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IErrorResponse>, System.Threading.Tasks.Task> * Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener * Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync * Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode -> System.Threading.Tasks.Task
Public Function ValidatePurchase (body As ISavingsPlanPurchaseValidateRequest, onOk As Func(Of HttpResponseMessage, Task(Of ISavingsPlanValidateResponse), Task), onDefault As Func(Of HttpResponseMessage, Task(Of IErrorResponse), Task), eventListener As IEventListener, sender As ISendAsync, Optional serializationMode As SerializationMode = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode.IncludeCreateOrUpdate) As Task

Parameters

eventListener
IEventListener
sender
ISendAsync
serializationMode
SerializationMode

Returns

Applies to