示例#1
0
 /// <summary>
 /// Get entities from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoicesGetResponseModel> GetAsync(this IInvoices operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Get entity from invoices by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMinvoice> GetByKeyAsync(this IInvoices operations, string invoiceid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByKeyWithHttpMessagesAsync(invoiceid, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Get entities from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMinvoiceCollection> GetAsync(this IInvoices operations, int?top = default(int?), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(top, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// 請求書の作成
 /// </summary>
 /// <remarks>
 /// 指定した事業所の請求書を作成する
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// 請求書の作成
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoicesResponse> CreateAsync(this IInvoices operations, InvoicesCreateParams parameters = default(InvoicesCreateParams), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// 請求書一覧の取得
 /// </summary>
 /// <remarks>
 /// 指定した事業所の請求書一覧を取得する
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='companyId'>
 /// 事業所ID
 /// </param>
 /// <param name='partnerId'>
 /// 取引先IDで絞込
 /// </param>
 /// <param name='partnerCode'>
 /// 取引先コードで絞込
 /// </param>
 /// <param name='issueDateStart'>
 /// 請求日の開始日(yyyy-mm-dd)
 /// </param>
 /// <param name='issueDateEnd'>
 /// 請求日の終了日(yyyy-mm-dd)
 /// </param>
 /// <param name='dueDateStart'>
 /// 期日の開始日(yyyy-mm-dd)
 /// </param>
 /// <param name='dueDateEnd'>
 /// 期日の終了日(yyyy-mm-dd)
 /// </param>
 /// <param name='invoiceNumber'>
 /// 請求書番号
 /// </param>
 /// <param name='description'>
 /// 概要
 /// </param>
 /// <param name='invoiceStatus'>
 /// 請求書ステータス  (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下,
 /// approved: 承認済み, issued: 発行済み). Possible values include: 'draft',
 /// 'applying', 'remanded', 'rejected', 'approved', 'issued'
 /// </param>
 /// <param name='paymentStatus'>
 /// 入金ステータス  (unsettled: 入金待ち, settled: 入金済み). Possible values include:
 /// 'unsettled', 'settled'
 /// </param>
 /// <param name='offset'>
 /// 取得レコードのオフセット (デフォルト: 0)
 /// </param>
 /// <param name='limit'>
 /// 取得レコードの件数 (デフォルト: 20, 最大: 100)
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoicesIndexResponse> ListAsync(this IInvoices operations, int companyId, int?partnerId = default(int?), string partnerCode = default(string), string issueDateStart = default(string), string issueDateEnd = default(string), string dueDateStart = default(string), string dueDateEnd = default(string), string invoiceNumber = default(string), string description = default(string), string invoiceStatus = default(string), string paymentStatus = default(string), int?offset = default(int?), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(companyId, partnerId, partnerCode, issueDateStart, issueDateEnd, dueDateStart, dueDateEnd, invoiceNumber, description, invoiceStatus, paymentStatus, offset, limit, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Add new entity to invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMinvoice> CreateAsync(this IInvoices operations, MicrosoftDynamicsCRMinvoice body, string prefer = "return=representation", CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, prefer, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#7
0
        public Dictionary <string, string>?Validate(IInvoices translation)
        {
            var errors = new Dictionary <string, string>();

            if (string.IsNullOrWhiteSpace(Subject))
            {
                errors.Add(nameof(Subject), translation.ValidationRequired);
            }

            if (string.IsNullOrWhiteSpace(SequenceNumber))
            {
                errors.Add(nameof(SequenceNumber), translation.ValidationRequired);
            }

            if (IssuerId <= 0)
            {
                errors.Add(nameof(IssuerId), translation.ValidationRequired);
            }

            if (ClientId <= 0)
            {
                errors.Add(nameof(ClientId), translation.ValidationRequired);
            }

            if (errors.Any())
            {
                return(errors);
            }

            return(null);
        }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Accounts                    = new Accounts(this);
     Applications                = new Applications(this);
     Adoxiolegalentities         = new Adoxiolegalentities(this);
     AdoxioLicencetypes          = new AdoxioLicencetypes(this);
     AdoxioTiedhouseassociations = new AdoxioTiedhouseassociations(this);
     AdoxioTiedhouseconnections  = new AdoxioTiedhouseconnections(this);
     Contacts                    = new Contacts(this);
     Invoices                    = new Invoices(this);
     BaseUri = new System.Uri("http://localhost");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
示例#9
0
        /// <summary>
        /// The default constructor of the invoices controller
        /// getting the DI connection configuration, initializing interfaces
        /// and connecting to ERP.
        /// </summary>
        public InvoicesController()
        {
            // Get connection details from configuration file.
            var confPath = Path.Combine(
                HttpRuntime.AppDomainAppPath,
                "Configuration");

            var connectionPath = File.ReadAllText(
                Path.Combine(
                    confPath,
                    "AlalaDocuments.conf"));

            var connection   = JsonConvert.DeserializeObject <DiConnectionModel>(connectionPath);
            var passwordPath = Path.Combine(
                confPath,
                "AlalaDocuments.dat");

            _connector = new DiConnectionMockup(connection, passwordPath); // TODO: Turn this to the actual controller for integration testing.

            _connector.Connect();

            _invoices = new InvoicesMockup(_connector); // TODO: Turn this to the actual controller for integration testing.
        }
示例#10
0
 /// <summary>
 /// Invoke action LockInvoicePricing
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task LockInvoicePricingAsync(this IInvoices operations, string invoiceid, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.LockInvoicePricingWithHttpMessagesAsync(invoiceid, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#11
0
 /// <summary>
 /// 請求書の削除
 /// </summary>
 /// <remarks>
 /// 指定した事業所の請求書を削除する
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='companyId'>
 /// 事業所ID
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DestroyAsync(this IInvoices operations, int id, int companyId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DestroyWithHttpMessagesAsync(id, companyId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#12
0
 /// <summary>
 /// Get entities from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMinvoiceCollection Get(this IInvoices operations, int?top = default(int?), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
示例#13
0
 /// <summary>
 /// Invoke function GetQuantityDecimal
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='entity'>
 /// </param>
 /// <param name='product'>
 /// </param>
 /// <param name='uoM'>
 /// </param>
 public static MicrosoftDynamicsCRMGetQuantityDecimalResponse GetQuantityDecimal(this IInvoices operations, string entity, string product, string uoM)
 {
     return(operations.GetQuantityDecimalAsync(entity, product, uoM).GetAwaiter().GetResult());
 }
示例#14
0
 /// <summary>
 /// Update entity in invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IInvoices operations, string invoiceid, MicrosoftDynamicsCRMinvoice body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(invoiceid, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#15
0
 /// <summary>
 /// Delete entity from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IInvoices operations, string invoiceid, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(invoiceid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#16
0
 /// <summary>
 /// Invoke function GetQuantityDecimal
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='entity'>
 /// </param>
 /// <param name='product'>
 /// </param>
 /// <param name='uoM'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMGetQuantityDecimalResponse> GetQuantityDecimalAsync(this IInvoices operations, string entity, string product, string uoM, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetQuantityDecimalWithHttpMessagesAsync(entity, product, uoM, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#17
0
 /// <summary>
 /// Invoke action LockInvoicePricing
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// </param>
 public static void LockInvoicePricing(this IInvoices operations, string invoiceid)
 {
     operations.LockInvoicePricingAsync(invoiceid).GetAwaiter().GetResult();
 }
示例#18
0
 /// <summary>
 /// Get entity from invoices by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMinvoice GetByKey(this IInvoices operations, string invoiceid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetByKeyAsync(invoiceid, select, expand).GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Get entities from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMinvoiceCollection> GetWithHttpMessages(this IInvoices operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
示例#20
0
 /// <summary>
 /// Delete entity from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void Delete(this IInvoices operations, string invoiceid, string ifMatch = default(string))
 {
     operations.DeleteAsync(invoiceid, ifMatch).GetAwaiter().GetResult();
 }
示例#21
0
 /// <summary>
 /// Add new entity to invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMinvoice> CreateWithHttpMessages(this IInvoices operations, MicrosoftDynamicsCRMinvoice body, string prefer = "return=representation", Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.CreateWithHttpMessagesAsync(body, prefer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
示例#22
0
 /// <summary>
 /// Update entity in invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void Update(this IInvoices operations, string invoiceid, MicrosoftDynamicsCRMinvoice body)
 {
     operations.UpdateAsync(invoiceid, body).GetAwaiter().GetResult();
 }
示例#23
0
 /// <summary>
 /// Get entity from invoices by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid of invoice
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMinvoice> GetByKeyWithHttpMessages(this IInvoices operations, string invoiceid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetByKeyWithHttpMessagesAsync(invoiceid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
示例#24
0
 /// <summary>
 /// Get entities from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static InvoicesGetResponseModel Get(this IInvoices operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
示例#25
0
 /// <summary>
 /// Update entity in invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid of invoice
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse UpdateWithHttpMessages(this IInvoices operations, string invoiceid, MicrosoftDynamicsCRMinvoice body, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.UpdateWithHttpMessagesAsync(invoiceid, body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
示例#26
0
 /// <summary>
 /// Add new entity to invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 public static MicrosoftDynamicsCRMinvoice Create(this IInvoices operations, MicrosoftDynamicsCRMinvoice body, string prefer = "return=representation")
 {
     return(operations.CreateAsync(body, prefer).GetAwaiter().GetResult());
 }
示例#27
0
 /// <summary>
 /// Delete entity from invoices
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='invoiceid'>
 /// key: invoiceid of invoice
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse DeleteWithHttpMessages(this IInvoices operations, string invoiceid, string ifMatch = default(string), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.DeleteWithHttpMessagesAsync(invoiceid, ifMatch, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }