예제 #1
0
        public async Task <PaystackBaseResponse <InitiatePaymentResponse> > InitializePaystackPayment(InitiatePaymentRequest request)
        {
            var token   = _externalAuthService.GetPaystackToken();
            var headers = new Dictionary <string, string> {
                { "Authorization", $"Bearer {token}" }
            };
            var response = await _httpClient.PostAsJsonAsync <PaystackBaseResponse <InitiatePaymentResponse> >
                               (request, $"{_paystackSettings.BaseUrl}{_paystackSettings.InitializeTransactionUrl}", headers);

            return(response);
        }
        public Task <VehicleDetailDto> UpdateVehicleDetail(string regNumber, VehicleDetailDto vehicle)
        {
            var apiMethod = string.Format("NumberPlate/UpdateCarDetails?regNumber={0}", regNumber);

            return(_httpClientWrapper.PostAsJsonAsync <VehicleDetailDto>(apiMethod, vehicle));
        }
예제 #3
0
        public Task <BlogDto> CreateBlog(BlogDto blog)
        {
            var apiMethod = string.Format("Blog/Create");

            return(_httpClientWrapper.PostAsJsonAsync <BlogDto>(apiMethod, blog));
        }
예제 #4
0
        public Task <IEnumerable <CustomerDto> > PostCustomers(IEnumerable <CustomerDto> customers, SortByDto sortBy)
        {
            var apiMethod = string.Format("Sort/GetOrderedCustomerDetails?sortBy={0}", sortBy);

            return(_httpClientWrapper.PostAsJsonAsync <IEnumerable <CustomerDto> >(apiMethod, customers));
        }