public async void DirectDebit_MandateInfo(string mandateId, string referenceId = null) { try { ClearDebug(); PAYNLSDK.API.DirectDebit.Info.Request request = new PAYNLSDK.API.DirectDebit.Info.Request(mandateId) { ReferenceId = referenceId }; InitRequestDebug(request); await APISettings.Client.PerformRequestAsync(request); DebugRawResponse(request); tbMain.Text = request.Response.ToString(); } catch (ErrorException ee) { AddDebug("~~EXCEPTION~~"); AddDebug(ee.Message); } }
static public async Task <API.DirectDebit.Info.Response> InfoAsync(IClient client, string mandateId, string referenceId = null, CancellationToken cancellationToken = default) { var request = new DirectDebitInfo(mandateId) { ReferenceId = referenceId }; await client.PerformRequestAsync(request, cancellationToken).ConfigureAwait(false); return(request.Response); }