/// <summary> /// update an instance of payments with different phases of payment flows. /// </summary> /// <param name="pathCallSid"> The SID of the call that will create the resource. </param> /// <param name="pathSid"> The SID of Payments session </param> /// <param name="idempotencyKey"> A unique token for each payment session that should be provided to maintain /// idempotency of the session. </param> /// <param name="statusCallback"> The URL we should call to send status of payment session. </param> /// <param name="pathAccountSid"> The SID of the Account that will update the resource </param> /// <param name="capture"> Specific payment source information to expect. </param> /// <param name="status"> Instruction to complete or cancel the transaction. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Payment </returns> public static PaymentResource Update(string pathCallSid, string pathSid, string idempotencyKey, Uri statusCallback, string pathAccountSid = null, PaymentResource.CaptureEnum capture = null, PaymentResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdatePaymentOptions(pathCallSid, pathSid, idempotencyKey, statusCallback) { PathAccountSid = pathAccountSid, Capture = capture, Status = status }; return(Update(options, client)); }
/// <summary> /// update an instance of payments with different phases of payment flows. /// </summary> /// <param name="pathCallSid"> The SID of the call that will create the resource. </param> /// <param name="pathSid"> The SID of Payments session </param> /// <param name="idempotencyKey"> A unique token for each payment session that should be provided to maintain /// idempotency of the session. </param> /// <param name="statusCallback"> The URL we should call to send status of payment session. </param> /// <param name="pathAccountSid"> The SID of the Account that will update the resource </param> /// <param name="capture"> Specific payment source information to expect. </param> /// <param name="status"> Instruction to complete or cancel the transaction. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Payment </returns> public static async System.Threading.Tasks.Task <PaymentResource> UpdateAsync(string pathCallSid, string pathSid, string idempotencyKey, Uri statusCallback, string pathAccountSid = null, PaymentResource.CaptureEnum capture = null, PaymentResource.StatusEnum status = null, ITwilioRestClient client = null) { var options = new UpdatePaymentOptions(pathCallSid, pathSid, idempotencyKey, statusCallback) { PathAccountSid = pathAccountSid, Capture = capture, Status = status }; return(await UpdateAsync(options, client)); }