private async Task ShouldCreateAndUpdateCustomer() { //Create Customer var request = new CustomerRequest { Email = GenerateRandomEmail(), Name = "Customer", Phone = new Phone { CountryCode = "1", Number = "4155552671" } }; var customerResponse = await DefaultApi.CustomersClient().Create(request); customerResponse.ShouldNotBeNull(); //Edit Customer request.Email = GenerateRandomEmail(); request.Name = "Changed Name"; var customerId = customerResponse.Id; await DefaultApi.CustomersClient().Update(customerId, request); var customerDetails = await DefaultApi.CustomersClient().Get(customerId); customerDetails.ShouldNotBeNull(); customerDetails.Email.ShouldBe(request.Email); customerDetails.Name.ShouldBe(request.Name); }
private async Task <CreateTokenInstrumentResponse> CreateTokenInstrument() { var phone = new Phone { CountryCode = "1", Number = "4155552671" }; var customerRequest = new CustomerRequest { Email = GenerateRandomEmail(), Name = "Testing", Phone = phone }; var customer = await DefaultApi.CustomersClient().Create(customerRequest); customer.ShouldNotBeNull(); return(await CreateTokenInstrument(customer.Id)); }
private async Task ShouldRiskCustomerSource() { var customerRequest = new CustomerRequest() { Email = GenerateRandomEmail(), Name = "Customer" }; var customerResponse = await DefaultApi.CustomersClient().Create(customerRequest); customerRequest.ShouldNotBeNull(); var customerSourcePrism = new CustomerSourcePrism() { Id = customerResponse.Id }; await TestRequestPreAuthenticationRiskScan(customerSourcePrism); await TestPreCaptureAssessmentRequest(customerSourcePrism); }
private async Task ShouldCreateAndDeleteCustomer() { var request = new CustomerRequest { Email = GenerateRandomEmail(), Name = "Customer", Phone = new Phone { CountryCode = "1", Number = "4155552671" } }; var customerResponse = await DefaultApi.CustomersClient().Create(request); customerResponse.ShouldNotBeNull(); var customerId = customerResponse.Id; var emptyResponse = await DefaultApi.CustomersClient().Delete(customerId); emptyResponse.ShouldNotBeNull(); emptyResponse.HttpStatusCode.ShouldNotBeNull(); emptyResponse.ResponseHeaders.ShouldNotBeNull(); await AssertNotFound(DefaultApi.CustomersClient().Get(customerId)); }
private async Task ShouldCreateAndGetCustomer() { var request = new CustomerRequest { Email = GenerateRandomEmail(), Name = "Customer", Phone = new Phone { CountryCode = "1", Number = "4155552671" } }; var customerResponse = await DefaultApi.CustomersClient().Create(request); customerResponse.ShouldNotBeNull(); var customerDetails = await DefaultApi.CustomersClient().Get(customerResponse.Id); customerDetails.ShouldNotBeNull(); customerDetails.Email.ShouldBe(request.Email); customerDetails.Name.ShouldBe(request.Name); customerDetails.Phone.ShouldNotBeNull(); customerDetails.DefaultId.ShouldBeNull(); customerDetails.Instruments.ShouldBeEmpty(); }