/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> public static IList <Filing> GetFilings(this IFilingOperations operations) { return(Task.Factory.StartNew((object s) => { return ((IFilingOperations)s).GetFilingsAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> /// <param name='id'> /// Required. /// </param> public static Filing Delete(this IFilingOperations operations, int id) { return(Task.Factory.StartNew((object s) => { return ((IFilingOperations)s).DeleteAsync(id); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> /// <param name='filingTypeId'> /// Required. /// </param> /// <param name='payerName'> /// Required. /// </param> public static Filing Post(this IFilingOperations operations, int filingTypeId, string payerName) { return(Task.Factory.StartNew((object s) => { return ((IFilingOperations)s).PostAsync(filingTypeId, payerName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the BoomTaxApi class. /// </summary> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public BoomTaxApi(params DelegatingHandler[] handlers) : base(handlers) { this._efileRequest = new EfileRequestOperations(this); this._efileResponse = new EfileResponseOperations(this); this._filing = new FilingOperations(this); this._filingType = new FilingTypeOperations(this); this._form1094C = new Form1094COperations(this); this._form1095C = new Form1095COperations(this); this._baseUri = new Uri("http://api.boomtax.com"); }
/// <summary> /// Initializes a new instance of the BoomTaxApi class. /// </summary> public BoomTaxApi() : base() { this._efileRequest = new EfileRequestOperations(this); this._efileResponse = new EfileResponseOperations(this); this._filing = new FilingOperations(this); this._filingType = new FilingTypeOperations(this); this._form1094C = new Form1094COperations(this); this._form1095C = new Form1095COperations(this); this._baseUri = new Uri("http://api.boomtax.com"); }
/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <IList <Filing> > GetFilingsAsync(this IFilingOperations operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <BoomTax.Api.SampleProject.Models.Filing> > result = await operations.GetFilingsWithOperationResponseAsync(cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> /// <param name='id'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <Filing> DeleteAsync(this IFilingOperations operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <BoomTax.Api.SampleProject.Models.Filing> result = await operations.DeleteWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <param name='operations'> /// Reference to the BoomTax.Api.SampleProject.IFilingOperations. /// </param> /// <param name='filingTypeId'> /// Required. /// </param> /// <param name='payerName'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <Filing> PostAsync(this IFilingOperations operations, int filingTypeId, string payerName, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <BoomTax.Api.SampleProject.Models.Filing> result = await operations.PostWithOperationResponseAsync(filingTypeId, payerName, cancellationToken).ConfigureAwait(false); return(result.Body); }