public async Task <LetterTemplate> GetTemplate(LetterType type) { return(await _requestProvider.BuildUpon(_url) .Uri($"/api/letter/template/{(int)type}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <LetterTemplate>()); }
public Task <IList <Cluster> > Query() { return(_requestProvider.BuildUpon(_url) .Uri("/api/Cluster/query") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <IList <Cluster> >()); }
public Task <byte[]> Download(Guid guid) { return(_requestProvider.BuildUpon(_url) .Uri($"/api/file/{guid}") .AddInterceptor(new ResponseAsByteInterceptor()) .Execute <byte[]>()); }
public Task <List <Settings> > GetSettings() { return(_requestProvider.BuildUpon(_url) .Uri($"/api/settings") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <List <Settings> >()); }
public async Task <ChecklistHistory> GetByID(long id) { return(await _requestProvider.BuildUpon(_url) .Uri($"/api/checklist/{id}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <ChecklistHistory>()); }
public Task <string> Generate(CodeType type) { return(_requestProvider.BuildUpon(_url) .Uri("/api/code/generate") .AddParam("type", $"{(int)type}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <string>()); }
public async Task <IList <Notification> > List(DateTimeOffset?from) { return(await _requestProvider.BuildUpon(_url) .Uri("/api/notification/list") .AddParam("from", from?.UtcDateTime.ToString()) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <IList <Notification> >()); }
public Task <Person> GetPersonByAltID(string altID) { return(_requestProvider.BuildUpon(_url) .Uri("/api/person/find") .AddParam("altID", altID) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Person>()); }
public async Task <IList <Premise> > List(Guid?customerID) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/premise/query") .AddParam("customerID", $"{customerID.ToString()}") .AddInterceptor(new JsonDeserializerInterceptor()); return(await builder.Execute <IList <Premise> >()); }
public async Task <string> UpdateAll(IList <Menu> menus) { return(await _requestProvider.BuildUpon(_url) .Uri("/api/menu/list") .Method(HttpMethod.Put) .Content(new JsonContent(menus)) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <string>()); }
public Task <Notes> AddNotes(Notes notes) { return(_requestProvider.BuildUpon(_url) .Uri("/api/notes") .Method(HttpMethod.Post) .Content(new JsonContent(notes)) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Notes>()); }
public async Task <EmailTemplate> GetTemplate(EmailTemplateType type) { var a = $"/api/email/template/{(int)type}"; var b = $"/api/email/template/{(int)type}"; return(await _requestProvider.BuildUpon(_url) .Uri($"/api/email/template/{(int)type}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <EmailTemplate>()); }
public Task <Model.Attendee> GetByID(long id) { return(_requestProvider.BuildUpon(_url) .Uri($"/api/attendee/{id}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Model.Attendee>()); }
public Task <IList <Bill> > List(BillFilter filter) { return(_requestProvider.BuildUpon(_url) .Uri("/api/bill/list") .AddParam("id", filter.ID != null ? $"{filter.ID.Value}" : null) .AddParam("requestID", filter.RequestID != null ? $"{filter.RequestID.Value}" : null) .AddParam("refNo", filter.RefNo) .AddParam("invoiceNo", filter.InvoiceNo) .AddParam("refID", filter.RefID) .AddParam("customerName", filter.CustomerName) .AddParam("status", filter.Status != null ? $"{filter.Status}" : null) .AddParam("from", filter.From?.UtcDateTime.ToString()) .AddParam("to", filter.To?.UtcDateTime.ToString()) .AddParam("type", filter.Type != null ? $"{filter.Type}" : null) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <IList <Bill> >()); }
public async Task <IList <Model.Master> > GetMasterList(Model.MasterType type) { return(await _requestProvider.BuildUpon(_url) .Uri($"/api/Master") .AddParam("type", $"{(int)type}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <IList <Model.Master> >()); }
public async Task <AuthResponse> Authenticate(AuthParam param) { return(await _requestProvider.BuildUpon(_url) .Uri("/api/auth") .Method(HttpMethod.Post) .Content(new JsonContent(param)) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <AuthResponse>()); }
public Task <IList <JobOrder> > Query(JobOrderOptions options) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/joborder/query") .AddInterceptor(new JsonDeserializerInterceptor()); if (options.ID > 0L) { builder.AddParam("id", $"{options.ID}"); } if (!string.IsNullOrEmpty(options.Customer?.Trim())) { builder.AddParam("customer", options.Customer.Trim()); } if (!string.IsNullOrEmpty(options.Premise?.Trim())) { builder.AddParam("premise", options.Premise.Trim()); } if (options.Status?.Any() ?? false) { for (int i = 0; i < options.Status.Count; i++) { builder.AddParam($"status[{i}]", $"{(int)options.Status[i]}"); } } if (options.Type?.Any() ?? false) { for (int i = 0; i < options.Type.Count; i++) { builder.AddParam($"type[{i}]", $"{(int)options.Type[i]}"); } } if (options.AssignedTo?.Any() ?? false) { for (int i = 0; i < options.AssignedTo.Count; i++) { builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString()); } } builder.AddParam("from", options.From?.UtcDateTime.ToString()); builder.AddParam("to", options.To?.UtcDateTime.ToString()); return(builder.Execute <IList <JobOrder> >()); }
public Task <IList <CertificateBatch> > GetCertificateBatch(CertificateBatchOptions options, bool full) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/certificate/batch/list") .AddInterceptor(new JsonDeserializerInterceptor()) .AddParam("includeAll", $"{full}") .AddParam("from", options.From.UtcDateTime.ToString()); if (options.Status?.Any() ?? false) { for (int i = 0; i < options.Status.Count; i++) { var status = options.Status[i]; builder.AddParam($"status[{i}]", $"{(int)status}"); } } return(builder.Execute <IList <CertificateBatch> >()); }
public Task <IList <Bank> > List(BankFilter filter) { return(_requestProvider.BuildUpon(_url) .Uri("/api/bank/list") .AddParam("accountName", filter.AccountName) .AddParam("accountNo", filter.AccountNo) .AddParam("branchCode", filter.BranchCode) .AddParam("bankName", filter.BankName) .AddParam("ddaStatus", filter.DDAStatus?.ToString()) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <IList <Bank> >()); }
public Task <IList <StatisticsPerformance> > Performance(IList <string> keys, DateTimeOffset?from = null, DateTimeOffset?to = null) { var builder = _requestProvider.BuildUpon(_url) .Uri($"/api/statistics/performance") .AddInterceptor(new JsonDeserializerInterceptor()) .AddParam("from", from?.UtcDateTime.ToString()) .AddParam("to", to?.UtcDateTime.ToString()); if (keys?.Any() ?? false) { for (int i = 0; i < keys.Count; i++) { string key = keys[i]; builder.AddParam($"keys[{i}]", key); } } return(builder.Execute <IList <StatisticsPerformance> >()); }
public Task <Certificate360> GetByID(long id) { return(_requestProvider.BuildUpon(_url) .Uri($"/api/certificate360/{id}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Certificate360>()); }
public Task <Payment> GetPaymentByID(long id) { return(_requestProvider.BuildUpon(_url) .Uri($"/api/payment/{id}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Payment>()); }
public async Task <Identity> GetIdentityByID(Guid id) { return(await _requestProvider.BuildUpon(_url) .Uri($"/api/identity/{id}") .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Identity>()); }
public Task <IList <TransactionCode> > Query(TransactionCode options) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/TransactionCode/query") .AddInterceptor(new JsonDeserializerInterceptor()); if (!string.IsNullOrEmpty(options.Code?.Trim())) { builder.AddParam("Code", $"{options.Code}"); } if (!string.IsNullOrEmpty(options.GLEntry?.Trim())) { builder.AddParam("GLEntry", options.GLEntry.Trim()); } if (!string.IsNullOrEmpty(options.Text?.Trim())) { builder.AddParam("Text", options.Text.Trim()); } return(builder.Execute <IList <TransactionCode> >()); }
public Task <RFA> Submit(RFA data) { return(_requestProvider.BuildUpon(_url) .Uri("/api/rfa") .Method(HttpMethod.Post) .AddInterceptor(new JsonDeserializerInterceptor()) .Content(new JsonContent(data)) .Execute <RFA>()); }
public Task <IndexModel> Search(HalalLibraryOptions options, int offsetRows, int nextRows) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/ingredient/query") .AddInterceptor(new JsonDeserializerInterceptor()); builder.AddParam("nextRows", $"{nextRows}"); builder.AddParam("offsetRows", $"{offsetRows}"); if (!string.IsNullOrEmpty(options.Name)) { builder.AddParam("Name", options.Name.Trim()); } if (!string.IsNullOrEmpty(options.Brand)) { builder.AddParam("Brand", options.Brand.Trim()); } if (!string.IsNullOrEmpty(options.Supplier)) { builder.AddParam("Supplier", options.Supplier.Trim()); } if (!string.IsNullOrEmpty(options.CertifyingBody)) { builder.AddParam("CertifyingBody", options.CertifyingBody.Trim()); } if (!string.IsNullOrEmpty(options.VerifiedBy)) { builder.AddParam("VerifiedBy", options.VerifiedBy.Trim()); } if (options.Status != null) { builder.AddParam("Status", $"{(int)options.Status}"); } if (options.RiskCategory != null) { builder.AddParam("RiskCategory", $"{(int)options.RiskCategory}"); } return(builder.Execute <IndexModel>()); }
public Task <IList <Request> > Query(RequestOptions options) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/request/query") .AddInterceptor(new JsonDeserializerInterceptor()); if (options.ID > 0L) { builder.AddParam("id", $"{options.ID}"); } if (options.CustomerID.HasValue) { builder.AddParam("customerId", $"{options.CustomerID}"); } if (!string.IsNullOrEmpty(options.RefID?.Trim())) { builder.AddParam("refID", options.RefID.Trim()); } if (!string.IsNullOrEmpty(options.CustomerCode?.Trim())) { builder.AddParam("customerCode", options.CustomerCode.Trim()); } if (!string.IsNullOrEmpty(options.Customer?.Trim())) { builder.AddParam("customer", options.Customer.Trim()); } if (!string.IsNullOrEmpty(options.Premise?.Trim())) { builder.AddParam("premise", options.Premise.Trim()); } if (options.Status?.Any() ?? false) { for (int i = 0; i < options.Status.Count; i++) { builder.AddParam($"status[{i}]", $"{(int)options.Status[i]}"); } } if (options.Type?.Any() ?? false) { for (int i = 0; i < options.Type.Count; i++) { builder.AddParam($"type[{i}]", $"{(int)options.Type[i]}"); } } if (options.RFAStatus != null) { builder.AddParam($"rfaStatus", $"{(int)options.RFAStatus}"); } if (options.AssignedTo?.Any() ?? false) { for (int i = 0; i < options.AssignedTo.Count; i++) { builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString()); } } if (options.EscalateStatus != null) { builder.AddParam($"escalateStatus", $"{(int)options.EscalateStatus}"); } if (options.StatusMinor?.Any() ?? false) { for (int i = 0; i < options.StatusMinor.Count; i++) { builder.AddParam($"statusMinor[{i}]", $"{(int)options.StatusMinor[i]}"); } } builder.AddParam("from", options.From?.UtcDateTime.ToString()) .AddParam("to", options.To?.UtcDateTime.ToString()); return(builder.Execute <IList <Request> >()); }
public Task <Customer> GetCustomerContactInfo(string name, string altID) { return(_requestProvider.BuildUpon(_url) .Uri("/api/customer/find") .AddParam("name", name) .AddParam("altID", altID) .AddInterceptor(new JsonDeserializerInterceptor()) .Execute <Customer>()); }
public Task <IList <Case> > Query(CaseOptions options) { var builder = _requestProvider.BuildUpon(_url) .Uri("/api/case/list") .AddInterceptor(new JsonDeserializerInterceptor()); if (options.ID > 0L) { builder.AddParam("id", $"{options.ID}"); } if (!string.IsNullOrEmpty(options.Source.ToString())) { builder.AddParam("source", options.Source.ToString()); } if (options.OffenceType?.Any() ?? false) { for (int i = 0; i < options.OffenceType.Count; i++) { builder.AddParam($"offenceType[{i}]", options.OffenceType[i].ToString()); } } if (options.ManagedBy?.Any() ?? false) { for (int i = 0; i < options.ManagedBy.Count; i++) { builder.AddParam($"managedBy[{i}]", options.ManagedBy[i].ToString()); } } if (options.AssignedTo?.Any() ?? false) { for (int i = 0; i < options.AssignedTo.Count; i++) { builder.AddParam($"assignedTo[{i}]", options.AssignedTo[i].ToString()); } } if (options.Status?.Any() ?? false) { for (int i = 0; i < options.Status.Count; i++) { builder.AddParam($"status[{i}]", options.Status[i].ToString()); } } builder.AddParam("from", options.From?.UtcDateTime.ToString()) .AddParam("to", options.To?.UtcDateTime.ToString()); return(builder.Execute <IList <Case> >()); }