private string InvoiceMessageAction(InvoiceMessageAction action) { var memberInfo = action.GetType().GetMember(action.ToString()) .FirstOrDefault(); return(((DescriptionAttribute)memberInfo?.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault())?.Description); }
public async Task <bool> MarkInvoiceAsync(long invoiceId, string body, InvoiceMessageAction action, CancellationToken cancellationToken = default(CancellationToken)) { return(await _createInvoiceMessageActionAsync(invoiceId, body, InvoiceMessageAction(action), cancellationToken)); }
public bool MarkInvoice(long invoiceId, string body, InvoiceMessageAction action) { return(_createInvoiceMessageAction(invoiceId, body, InvoiceMessageAction(action))); }