private async Task <ValidationResponse <CustomerToBusinessRegisterUrlResponse> > RegisterValidatedUrlAsync( CustomerToBusinessRegisterUrlRequest customerToBusinessRegisterUrlRequest ) { var result = await tokenizedApiCaller.CallEndpoint <CustomerToBusinessRegisterUrlResponse>( "mpesa/c2b/v1/registerurl", HttpMethod.Post, customerToBusinessRegisterUrlRequest ); return(validationResponseHelper.SuccessValue(result)); }
public async Task <ValidationResponse <CustomerToBusinessRegisterUrlResponse> > RegisterUrlAsync( CustomerToBusinessRegisterUrlRequest customerToBusinessRegisterUrlRequest ) { var validationResponse = await new BasicFormValidator <CustomerToBusinessRegisterUrlRequest>() .ValidateAndPackAsync(customerToBusinessRegisterUrlRequest); return(await validationResponseHelper.RouteResponseTypedAsync <CustomerToBusinessRegisterUrlRequest, CustomerToBusinessRegisterUrlResponse>( validationResponse, async (_) => await RegisterValidatedUrlAsync(customerToBusinessRegisterUrlRequest) )); }