public async Task CreateCustomer() { var originalSquareCustomerReference = CreateSquareCustomerReference.FromTimestamp(GetUniqueNow()); var originalSquareCustomerId = await SquareMicroService.AllocateSquareCustomerAsync(originalSquareCustomerReference); var squareCustomerId = await SquareMicroService.LookupSquareCustomerIdAsync(originalSquareCustomerReference); Assert.AreEqual(originalSquareCustomerId, squareCustomerId); var squareCustomer = await SquareMicroService.GetSquareCustomerAsync(originalSquareCustomerId); Assert.IsNotNull(squareCustomer); Assert.AreEqual(originalSquareCustomerReference, squareCustomer.SquareCustomerReference); }
public async Task <ASquare_Customer> GetCustomerAsync(long squareCustomerId) { using var log = BeginFunction(nameof(SquareAdminService), nameof(GetCustomerAsync), squareCustomerId); try { await Assert(SecurityPolicy.IsPrivileged).ConfigureAwait(false); var mCustomer = await SquareMicroService.GetSquareCustomerAsync(squareCustomerId); var result = new ASquare_Customer() { MCustomer = mCustomer }; log.Result(result); return(result); } catch (Exception ex) { log.Exception(ex); throw; } }